bc argument

Bas Wijnen wijnen at debian.org
Wed Jan 19 05:53:46 EST 2011


Hi,

I've installed openwrt on my NanoNote now, so I can actually use it
apart from writing Iris. :-)

I'd like to use it as a calculator first. bc is what I normally use for
this, so I'm happy to see it installed. However, if it is started
without arguments, it uses 0 digit precision. That's not very nice.
That's why I always start it with -l:

       If  bc  is  invoked with the -l option, a math library is
preloaded and
       the default scale is set to 20.   The  math  functions  will
calculate
       their  results  to  the  scale set at the time of their call.
The math
       library defines the following functions:

       s (x)  The sine of x, x is in radians.

       c (x)  The cosine of x, x is in radians.

       a (x)  The arctangent of x, arctangent returns radians.

       l (x)  The natural logarithm of x.

       e (x)  The exponential function of raising e to the value x.

       j (n,x)
              The Bessel function of integer order n of x.

Especially the setting of the scale to 20 (giving 20 fractional digits
instead of 0) is something I don't want to do every time I start it. So
I changed /usr/share/gmenu2x/sections/applications/bc and added:
params=-l
Please consider doing this in the image as well.

Thanks,
Bas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20110119/d88c0ac0/attachment.pgp>


More information about the discussion mailing list


interactive