bc: A Handy Utility
In my opinion, bc is a real find: it is small, efficient, self-contained and an extremely useful utility. It is not to be considered a replacement for a good fast programming language such as C, C++ or FORTRAN. But as a means for quickly prototyping numerical algorithms before coding them in a high-level language, it is excellent.

Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Designing Electronics with Linux | May 22, 2013 |
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
- Linux Systems Administrator
- New Products
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Web & UI Developer (JavaScript & j Query)
- Designing Electronics with Linux
- Dynamic DNS—an Object Lesson in Problem Solving
- Using Salt Stack and Vagrant for Drupal Development
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Favorite (and easily brute-forced) pw's
44 min 28 sec ago - Have you tried Boxen? It's a
6 hours 36 min ago - seo services in india
11 hours 7 min ago - For KDE install kio-mtp
11 hours 8 min ago - Evernote is much more...
13 hours 8 min ago - Reply to comment | Linux Journal
21 hours 54 min ago - Dynamic DNS
22 hours 28 min ago - Reply to comment | Linux Journal
23 hours 26 min ago - Reply to comment | Linux Journal
1 day 16 min ago - Not free anymore
1 day 4 hours ago




Comments
If you are running the
If you are running the "Hofstadter's chaotic function" with the remainder part, please notice that the BC-utility has a bug with the -l option. It works fine if you use only "bc"-command, instead of "bc -l".
Tested on Ubuntu 9.04.
Clarification about "bc -l"
If you try the code with "bc -l", please note that you must set "scale=0". Otherwise, things such as modulo may seem to work unexpectedly. More here, accessed 28th August 2009 10:14, http://en.wikipedia.org/wiki/Bc_programming_language#Standard_library_fu....
Small notice. When you
Small notice.
When you copy-paste the amicable-code, remove the enter like:
define amicable(m) {
for (j=1;j<=m;j++)
if (sf(sf(j))==j && sf(j)!=j && j
Small error in the code: for
Small error in the code:
for (i=1; i<=100; i++) {
print h[i]," ";
if (i%10==0) print "\n;"
}
The "\n;" should be "\n"; .