Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
NIST Digital Library of Mathematical Functions (nist.gov)
108 points by bnolan001 on Sept 5, 2022 | hide | past | favorite | 18 comments


I used the nist function library once to make a trig library on an ibm mainframe. long nights mounting tapes and running jobs, It used the vms/esa os with something called cms as the interactive shell. cms used rexx as the scripting language, I was trying to learn rexx on cms and wanted to make a screen saver, at this point those of you who know anything about the 3270 terminals used on mainframes can now start snickering. you see a 3270 terminal is more like a html form than the vt terminals grid of charactors, so it is easy to make a form, but very hard to make a event loop style game. I never did figure out a good async method of getting keypresses, so games were out. but I did find a trick for automaticly updating the screen, so I settled on a screen saver.

After making a nice matrix style rain, my next mission was an analog clock, but it turns out that rexx on cms had no trig library for the hands, so I found an algorithm for sin and friends at nists function library, this algorithm requires the power function and guess what rexx was also missing, that's right, the power function, so had to do that as well, after some very dubious power and sin code there it was, the finest analog clock on 3270 terminal ever made.

sigh, fond memories.

sadly I lost that code when I changed jobs.

But huge respect to nist for taking the time to document these important functions.


See also "The Mathematical Functions Grimoire" (Fungrim) https://www.fungrim.org/



Wolfram also has Functions:

https://functions.wolfram.com


Ah, my good friends the Fresnel integrals (functions plotting the Euler spiral, also known as clothoid and Cornu spiral) are there in Chapter 7. One of the things I'm proud of is having better techniques for evaluating short sections of that spiral than just computing the functions a la Abramowitz and Stegun (also with good implementations in the cephes library), though of course that does work.


Is there a way to download this for offline viewing?


This website began as an online copy of Abramowitz and Stegun's book [1]. It's not hard to find high quality downloads of that book, e.g. [2].

[1]: https://en.wikipedia.org/wiki/Abramowitz_and_Stegun [2]: https://www.cs.bham.ac.uk/~aps/research/projects/as/


I wish there was not only a library, but also like a table for this functions, where the value and the bitlength of input and output was written.

So that we have a clear table of functions where implementations could test against.


Ah, For that you will be wanting the The On-Line Encyclopedia of Integer Sequences.

https://oeis.org/

hashtag: only_half_joking.


well, but not only for integer, but also for rational and real numbers (and there also the error margin)


Despite all the good contents, calling the inverse function of hyperbolic tangent "arctanh" just makes no sense.


Isn't that the normal "math" name though? tan <-> arctan, tanh <-> arctanh ? What would you have called it? harctan?


For the hyperbolic version area is the correct counterpart of arc-length. See the wikipedia for a picture. So only "ar-" and "a-" make sense. Blindly using "arc-" is like saying non-invertible matrices are "vertible" because "in-" negates the meaning of a word.


Isn't that how it's done in NumPy?


It probably inherits the name from other languages that get it wrong.


... just don't use their random number generator!


Looking into “Zeta Functions for Complex Arguments” all I found was Elsevier paywalls. Curse them.

Does anyone know of an open-source C or Fortran implementation?


I had on original “Big Red” from my grandfather, which unfortunately someone walked-off with. That book saved my butt in school several times, especially with the Laplace transform tables.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: