Post Reply 
bc (basic calculator) and libraries of functions
02-09-2018, 03:10 PM (This post was last modified: 02-09-2018 03:11 PM by pier4r.)
Post: #1
bc (basic calculator) and libraries of functions
Follow up of: http://www.hpmuseum.org/forum/thread-101...l#pid90844

In linux, bc is a neat program with arbitrary precision.
https://en.wikipedia.org/wiki/Bc_(programming_language)

The point is that although it seems quite powerful for a possible math programming environment, to my knowledge there is no extensive library of math functions.
https://www.gnu.org/software/bc/manual/h...no/bc.html

Functions:
Quote: 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.

To my little knowledge the best that I found is the following:
http://phodd.net/gnu-bc/
and then
http://phodd.net/gnu-bc/bcfaq.html

it is a nice project in itself to try to make a library module for bc (that I think it will be worth it. Another fun todo).

Anyway, do you know any better collection (or libraries or repositories) of functions for bc? For example a file with many functions inside?

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
bc (basic calculator) and libraries of functions - pier4r - 02-09-2018 03:10 PM



User(s) browsing this thread: 1 Guest(s)