Allow acos(0)

pull/13877/head
Kyle Pritchard 2022-03-30 16:42:32 +01:00
parent 61f078664c
commit 108881b9b8
1 changed files with 0 additions and 3 deletions

View File

@ -206,9 +206,6 @@ pub fn acos(x f64) f64 {
if (x < -1.0) || (x > 1.0) { if (x < -1.0) || (x > 1.0) {
return nan() return nan()
} }
if x == 0.0 {
return nan()
}
if x > 0.5 { if x > 0.5 {
return f64(2.0) * asin(sqrt(0.5 - 0.5 * x)) return f64(2.0) * asin(sqrt(0.5 - 0.5 * x))
} }