
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 76.3%
associate-*r/76.3%
*-commutative76.3%
+-commutative76.3%
Simplified76.3%
cos-sum99.5%
*-un-lft-identity99.5%
*-un-lft-identity99.5%
prod-diff99.5%
Applied egg-rr99.5%
*-rgt-identity99.5%
*-commutative99.5%
distribute-lft-neg-in99.5%
*-commutative99.5%
fma-udef99.5%
*-rgt-identity99.5%
distribute-lft-neg-in99.5%
*-rgt-identity99.5%
fma-udef99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in b around inf 99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
Final simplification99.5%
Initial program 76.3%
+-commutative76.3%
Simplified76.3%
cos-sum99.5%
cancel-sign-sub-inv99.5%
fma-def99.5%
Applied egg-rr99.5%
Final simplification99.5%
Initial program 76.3%
associate-*r/76.3%
*-commutative76.3%
+-commutative76.3%
Simplified76.3%
cos-sum99.5%
Applied egg-rr99.5%
Final simplification99.5%
Initial program 76.3%
associate-*r/76.3%
*-commutative76.3%
+-commutative76.3%
Simplified76.3%
cos-sum99.5%
*-un-lft-identity99.5%
*-un-lft-identity99.5%
prod-diff99.5%
Applied egg-rr99.5%
*-rgt-identity99.5%
*-commutative99.5%
distribute-lft-neg-in99.5%
*-commutative99.5%
fma-udef99.5%
*-rgt-identity99.5%
distribute-lft-neg-in99.5%
*-rgt-identity99.5%
fma-udef99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in b around inf 99.5%
fma-def99.5%
fma-def99.5%
Simplified99.5%
fma-udef99.5%
*-commutative99.5%
fma-udef99.5%
cos-diff77.1%
Applied egg-rr77.1%
Final simplification77.1%
if a < -1.6e-7 or 3.19999999999999981e-10 < a Initial program 53.4%
associate-*r/53.5%
*-commutative53.5%
+-commutative53.5%
Simplified53.5%
Taylor expanded in b around 0 52.8%
if -1.6e-7 < a < 3.19999999999999981e-10Initial program 99.6%
associate-/l*99.5%
+-commutative99.5%
Simplified99.5%
Taylor expanded in a around 0 99.5%
mul-1-neg99.5%
unsub-neg99.5%
Simplified99.5%
div-inv99.6%
clear-num99.6%
quot-tan99.7%
Applied egg-rr99.7%
Final simplification76.1%
if b < -7.50000000000000019e-6 or 2.35000000000000007e-20 < b Initial program 57.4%
associate-*r/57.4%
*-commutative57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in a around 0 57.7%
if -7.50000000000000019e-6 < b < 2.35000000000000007e-20Initial program 99.2%
+-commutative99.2%
Simplified99.2%
cos-sum99.7%
cancel-sign-sub-inv99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in b around 0 99.2%
*-commutative99.2%
associate-/l*99.0%
associate-/r/99.3%
Simplified99.3%
Final simplification76.5%
if b < -3.60000000000000009e-5Initial program 47.1%
associate-*r/47.1%
*-commutative47.1%
+-commutative47.1%
Simplified47.1%
Taylor expanded in a around 0 47.8%
if -3.60000000000000009e-5 < b < 4.10000000000000036e-15Initial program 99.2%
+-commutative99.2%
Simplified99.2%
cos-sum99.7%
cancel-sign-sub-inv99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in b around 0 99.2%
*-commutative99.2%
associate-/l*99.1%
associate-/r/99.3%
Simplified99.3%
if 4.10000000000000036e-15 < b Initial program 64.7%
associate-/l*64.8%
+-commutative64.8%
Simplified64.8%
Taylor expanded in a around 0 64.7%
Final simplification76.5%
Initial program 76.3%
associate-/l*76.3%
+-commutative76.3%
Simplified76.3%
associate-/r/76.4%
Applied egg-rr76.4%
Final simplification76.4%
if b < -1.9000000000000001e-4 or 2.35000000000000007e-20 < b Initial program 57.4%
associate-/l*57.4%
+-commutative57.4%
Simplified57.4%
Taylor expanded in a around 0 53.5%
mul-1-neg53.5%
unsub-neg53.5%
Simplified53.5%
div-inv53.4%
clear-num53.4%
quot-tan53.5%
Applied egg-rr53.5%
if -1.9000000000000001e-4 < b < 2.35000000000000007e-20Initial program 99.2%
+-commutative99.2%
Simplified99.2%
cos-sum99.7%
cancel-sign-sub-inv99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in b around 0 99.2%
*-commutative99.2%
associate-/l*99.0%
associate-/r/99.3%
Simplified99.3%
Final simplification74.3%
if b < -1.05e-4 or 4.10000000000000036e-15 < b Initial program 56.8%
associate-/l*56.8%
+-commutative56.8%
Simplified56.8%
Taylor expanded in a around 0 52.8%
mul-1-neg52.8%
unsub-neg52.8%
Simplified52.8%
expm1-log1p-u40.6%
expm1-udef40.2%
clear-num40.3%
quot-tan40.3%
Applied egg-rr40.3%
expm1-def40.6%
expm1-log1p52.8%
Simplified52.8%
if -1.05e-4 < b < 4.10000000000000036e-15Initial program 99.2%
+-commutative99.2%
Simplified99.2%
cos-sum99.7%
cancel-sign-sub-inv99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in b around 0 99.2%
*-commutative99.2%
associate-/l*99.1%
associate-/r/99.3%
Simplified99.3%
Final simplification74.2%
if b < -54000 or 8.8e10 < b Initial program 55.1%
+-commutative55.1%
Simplified55.1%
Taylor expanded in b around 0 12.6%
Taylor expanded in a around 0 12.6%
if -54000 < b < 8.8e10Initial program 98.2%
associate-*r/98.2%
*-commutative98.2%
+-commutative98.2%
Simplified98.2%
Taylor expanded in b around 0 95.6%
Final simplification53.5%
if b < -54000 or 8.8e10 < b Initial program 55.1%
+-commutative55.1%
Simplified55.1%
Taylor expanded in b around 0 12.6%
Taylor expanded in a around 0 12.6%
if -54000 < b < 8.8e10Initial program 98.2%
+-commutative98.2%
Simplified98.2%
cos-sum99.7%
cancel-sign-sub-inv99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in b around 0 95.5%
*-commutative95.5%
associate-/l*95.4%
associate-/r/95.7%
Simplified95.7%
Final simplification53.5%
Initial program 76.3%
+-commutative76.3%
Simplified76.3%
Taylor expanded in b around 0 53.2%
Taylor expanded in a around 0 37.4%
Final simplification37.4%
Initial program 76.3%
associate-*r/76.3%
*-commutative76.3%
+-commutative76.3%
Simplified76.3%
Taylor expanded in b around 0 48.9%
Taylor expanded in a around 0 33.0%
Final simplification33.0%
herbie shell --seed 2023166
(FPCore (r a b)
:name "rsin A (should all be same)"
:precision binary64
(/ (* r (sin b)) (cos (+ a b))))