[CSI] sqrt() and rand() implementations
Mikhail Nesterenko
mikhail at cs.kent.edu
Wed Sep 12 10:35:59 EDT 2018
For the curious,
Here is an explanation of
https://www.codeproject.com/Articles/570700/SquareplusRootplusalgorithmplusforplusC
and implementation of sqrt()
http://www.netlib.org/fdlibm/e_sqrt.c
Here is the explanation of rand() algorithm
https://en.wikipedia.org/wiki/Linear_congruential_generator
and its implementation:
https://sourceware.org/git/?p=glibc.git;a=blob;f=stdlib/random_r.c;hb=glibc-2.15
Thanks,
--
Mikhail
More information about the cs13001
mailing list