Gamma / Error-Funktion für C++
-
Ich suche nach einer Implemetierung der Errorfunction für C++.
Gefunden habe ich den Link
www.momonga.t.u-tokyo.ac.jp/~ooura/gamerf.htmlder auch auf Mathtools verlinkt ist, allerdings ist die Webseite down.
Kennt jemand eine Implementierung dieser Mathematischen Funktion die idealerweise kostenlos und frei verfügbar ist - und auch unter Windows läuft ?
Matthias
-
-
versuchs mal damit:
double erf(double x) { double y = 1.0 / ( 1.0 + 0.3275911 * x); return 1 - ((((( + 1.061405429 * y - 1.453152027) * y + 1.421413741) * y - 0.284496736) * y + 0.254829592) * y) * exp(-x*x); }Diese Approximation findest du im Abramowitz/Stegun. Der max. Fehler ist 1.5*10^-7.
Irgendwo habe ich noch eine genauere rumliegen.
vg, tesu