Skip to content

Instantly share code, notes, and snippets.

View k3kaimu's full-sized avatar

Kazuki Komatsu k3kaimu

  • Toyohashi University of Technology
  • X @k3k0ma
View GitHub Profile
@bellbind
bellbind / erf.js
Last active June 23, 2024 07:03
[javascript] erfinv(x) implementations (and erf(x)/erfc(x) implementations ported from cephes)
// erf(x): error function (see: https://en.wikipedia.org/wiki/Error_function)
// by https://github.com/jeremybarnes/cephes/blob/master/cprob/ndtr.c
const P = [
2.46196981473530512524E-10,
5.64189564831068821977E-1,
7.46321056442269912687E0,
4.86371970985681366614E1,
1.96520832956077098242E2,
5.26445194995477358631E2,