mruby-math: use erfc(x) instead of 1.0 - erf(x)

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-01-09 08:01:28 +09:00
parent 51c4c4716a
commit af3482d562
+1 -1
View File
@@ -139,7 +139,7 @@ erfc(double x)
double n = 1.0;
if (fabs(x) < 2.2) {
return 1.0 - erf(x);
return erfc(x);
}
if (x < 0.0) { /*signbit(x)*/
return 2.0 - erfc(-x);