math: fix pure v math.pow (#19287)

This commit is contained in:
Leo Developer 2023-09-06 20:41:15 +02:00 committed by GitHub
parent c790afabdc
commit 43ccba3713
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,7 +145,7 @@ pub fn pow(x f64, y f64) f64 {
if y > 0 {
return result
}
return copysign(1, x) / abs(result)
return 1 / result
}
// ans = a1 * 2**ae (= 1 for now).