bc (basic calculator) and libraries of functions

02092018, 03:10 PM
(This post was last modified: 02092018 03:11 PM by pier4r.)
Post: #1




bc (basic calculator) and libraries of functions
Follow up of: http://www.hpmuseum.org/forum/thread101...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: To my little knowledge the best that I found is the following: http://phodd.net/gnubc/ and then http://phodd.net/gnubc/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 :) 

02092018, 03:21 PM
Post: #2




RE: bc (basic calculator) and libraries of functions
Hello!
I vaguely remember "bc" from my unix days (ca. 19892000). BTW: Not only Linux has one on board, but every Macintosh running OS X as well. In one of your linked articles I instantly found this droll piece of explanation: "bc was preceded by dc, an earlier arbitraryprecision calculator written by the same authors. dc could do arbitraryprecision calculations, but its reverse Polish notation (RPN) syntax was inconvenient for users". Saluti Max 

02102018, 03:01 AM
Post: #3




RE: bc (basic calculator) and libraries of functions
(02092018 03:10 PM)pier4r Wrote: Follow up of: http://www.hpmuseum.org/forum/thread101...l#pid90844 bc is also available for Windows: http://gnuwin32.sourceforge.net/packages/bc.htm Does anyone know if there is a way to save and load files from the interactive mode? Right now, I'm pasting text into the bc window. Tom L DM42 SN: 00025 (Beta) SN: 00221 (Production) 

02102018, 09:39 AM
(This post was last modified: 02102018 09:42 AM by Massimo Gnerucci.)
Post: #4




RE: bc (basic calculator) and libraries of functions
(02102018 03:01 AM)toml_12953 Wrote:(02092018 03:10 PM)pier4r Wrote: Follow up of: http://www.hpmuseum.org/forum/thread101...l#pid90844 Of course it is; yesterday I used the 1.07 version (bc + dc) available here. (02102018 03:01 AM)toml_12953 Wrote: Does anyone know if there is a way to save and load files from the interactive mode? Right now, I'm pasting text into the bc window. I could not find a way from the interactive mode either. Greetings, Massimo +×÷ ↔ left is right and right is wrong 

02102018, 10:15 AM
Post: #5




RE: bc (basic calculator) and libraries of functions
(02102018 09:39 AM)Massimo Gnerucci Wrote:(02102018 03:01 AM)toml_12953 Wrote: bc is also available for Windows: Thanks for the tip on the newer version! The site I mentioned has great docs for 1.06 included in the file so it's worth it to me to use those with the newer bc from your site. 1.06 doesn't seem too different from 1.07.1 so most of the information applies. I do notice the transcendental functions s(x), c(x), a(x), etc. are much faster in 1.07. Tom L DM42 SN: 00025 (Beta) SN: 00221 (Production) 

« Next Oldest  Next Newest »

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