from Hacker News

NIST Digital Library of Mathematical Functions

by bnolan001 on 9/4/22, 12:30 PM with 18 comments

  • by somat on 9/6/22, 6:53 AM

    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.

  • by carapace on 9/6/22, 12:15 AM

    See also "The Mathematical Functions Grimoire" (Fungrim) https://www.fungrim.org/
  • by raphlinus on 9/6/22, 4:44 AM

    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.
  • by csdreamer7 on 9/6/22, 2:10 AM

    Is there a way to download this for offline viewing?
  • by deknos on 9/6/22, 6:55 AM

    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.

  • by ThinBold on 9/6/22, 8:50 AM

    Despite all the good contents, calling the inverse function of hyperbolic tangent "arctanh" just makes no sense.
  • by alfiedotwtf on 9/6/22, 8:43 AM

    ... just don't use their random number generator!
  • by tempodox on 9/6/22, 11:20 AM

    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?

  • by madengr on 9/5/22, 11:03 PM

    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.