From 6137ce23c0d3c20e76f0b8d6ff191957aedcce20 Mon Sep 17 00:00:00 2001 From: kylepritchard Date: Wed, 30 Mar 2022 19:36:50 +0100 Subject: [PATCH] math: allow `acos(0)` (fix #13876) (#13877) --- vlib/math/invtrig.v | 3 --- 1 file changed, 3 deletions(-) diff --git a/vlib/math/invtrig.v b/vlib/math/invtrig.v index c40d87f8d2..f49dd43be6 100644 --- a/vlib/math/invtrig.v +++ b/vlib/math/invtrig.v @@ -206,9 +206,6 @@ pub fn acos(x f64) f64 { if (x < -1.0) || (x > 1.0) { return nan() } - if x == 0.0 { - return nan() - } if x > 0.5 { return f64(2.0) * asin(sqrt(0.5 - 0.5 * x)) }