]> git.nega.tv - josh/narcissus/commitdiff
narcissus-math: Update sin-pi error bounds main
authorJosh Simmons <josh@nega.tv>
Sun, 6 Apr 2025 05:11:56 +0000 (07:11 +0200)
committerJosh Simmons <josh@nega.tv>
Sun, 6 Apr 2025 05:11:56 +0000 (07:11 +0200)
engine/narcissus-maths/src/sin_cos_pi.rs
engine/narcissus-maths/tests/exhaustive_f32.rs

index b3cc41673474a42e99b0eae259080e5c0dddd5d2..e28e9f8b6eacddbef4e8eb447e1defd492fc5587 100644 (file)
@@ -25,7 +25,7 @@ const F32_COS_PI_8_K: [f32; 4] = unsafe {
 /// Simultaneously computes the sine and cosine of `a` expressed in multiples of
 /// *pi* radians, or half-turns.
 ///
-/// Sin error <= 0.96563 ulp.
+/// Sin error <= 0.96441 ulp.
 /// Cos error <= 0.96677 ulp.
 ///
 /// Returns `(sin(a * pi), cos(a * pi))`
index 46e96e8d7196d9648ad3111d78273363f2b7f1cf..b0e3d7365edd6c61e53d22041e7ea152570f9eaf 100644 (file)
@@ -438,7 +438,7 @@ pub fn exhaustive_sin_pi() {
     let errors = check_exhaustive_f32(ref_sin_pi_f32, |a| sin_cos_pi_f32(a).0, false);
     println!("SIN: {errors:?}");
     assert_eq!(errors.max_error_ulp, 1);
-    assert_eq!(errors.num_errors, 55_943_962);
+    assert_eq!(errors.num_errors, 55_931_154);
 }
 
 #[test]