From af3482d562111cb5705485c97713949d73c4b9a5 Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Tue, 9 Jan 2024 08:01:28 +0900 Subject: [PATCH] mruby-math: use `erfc(x)` instead of `1.0 - erf(x)` --- mrbgems/mruby-math/src/math.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrbgems/mruby-math/src/math.c b/mrbgems/mruby-math/src/math.c index 76ee57481..0d2f4cc48 100644 --- a/mrbgems/mruby-math/src/math.c +++ b/mrbgems/mruby-math/src/math.c @@ -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);