mruby-math: reduce the scope of a local variable

This commit is contained in:
Yukihiro "Matz" Matsumoto
2024-01-09 07:47:57 +09:00
parent c1fc3219db
commit 8a2e88390b
+2 -2
View File
@@ -137,7 +137,7 @@ erfc(double x)
double q1;
double q2 = b/d;
double n = 1.0;
double t;
if (fabs(x) < 2.2) {
return 1.0 - erf(x);
}
@@ -145,7 +145,7 @@ erfc(double x)
return 2.0 - erfc(-x);
}
do {
t = a*n+b*x;
double t = a*n+b*x;
a = b;
b = t;
t = c*n+d*x;