From 774f44723485e4afd392082bbcff73f2707c83a2 Mon Sep 17 00:00:00 2001 From: Ian Briggs Date: Mon, 10 Jul 2023 16:14:18 -0600 Subject: [PATCH] Reorder expression of better accuracy --- include/sincos.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sincos.h b/include/sincos.h index 563ae93..a9bc187 100644 --- a/include/sincos.h +++ b/include/sincos.h @@ -120,7 +120,7 @@ inline void fast_sincos_m45_45( const double z, double & s, double &c ) { double zz = z * z; s = z + z * zz * get_sin_px(zz); - c = 1.0 - zz * .5 + zz * zz * get_cos_px(zz); + c = 1.0 + zz * (-.5 + zz * get_cos_px(zz)); }