1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

math: rename small to small_ to prevent C errors (workaround unescaped C labels) (#12796)

This commit is contained in:
Wertzui123
2021-12-11 18:35:40 +01:00
committed by GitHub
parent 24bc2ae406
commit 9e68a03f94
2 changed files with 5 additions and 5 deletions

View File

@@ -164,7 +164,7 @@ const (
pub fn erf(a f64) f64 {
mut x := a
very_tiny := 2.848094538889218e-306 // 0x0080000000000000
small := 1.0 / f64(u64(1) << 28) // 2**-28
small_ := 1.0 / f64(u64(1) << 28) // 2**-28
if is_nan(x) {
return nan()
}
@@ -181,7 +181,7 @@ pub fn erf(a f64) f64 {
}
if x < 0.84375 { // |x| < 0.84375
mut temp := 0.0
if x < small { // |x| < 2**-28
if x < small_ { // |x| < 2**-28
if x < very_tiny {
temp = 0.125 * (8.0 * x + math.efx8 * x) // avoid underflow
} else {