
Results
Herbie found 5 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 78.3%
tan-sum99.7%
div-inv99.7%
Applied egg-rr99.7%
associate-*r/99.7%
*-rgt-identity99.7%
Simplified99.7%
Final simplification99.7%
if a < -3.5e-12Initial program 80.3%
+-commutative80.3%
associate-+l-80.5%
Applied egg-rr80.5%
add-log-exp80.5%
Applied egg-rr80.5%
if -3.5e-12 < a < 4.8000000000000002e-26Initial program 76.2%
+-commutative76.2%
associate-+l-76.2%
Applied egg-rr76.2%
Taylor expanded in a around 0 76.2%
neg-mul-176.2%
Simplified76.2%
sub-neg76.2%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.1%
add-sqr-sqrt3.1%
add-sqr-sqrt0.0%
sqrt-unprod76.2%
sqr-neg76.2%
sqrt-unprod75.7%
add-sqr-sqrt76.2%
+-commutative76.2%
Applied egg-rr76.2%
tan-sum99.9%
tan-quot99.8%
*-commutative99.8%
div-inv99.8%
tan-quot99.8%
+-commutative99.8%
Applied egg-rr99.8%
associate-*r/99.9%
*-rgt-identity99.9%
Simplified99.9%
if 4.8000000000000002e-26 < a Initial program 79.9%
add-cbrt-cube79.9%
pow379.9%
Applied egg-rr79.9%
Final simplification89.0%
Initial program 78.3%
Final simplification78.3%
Initial program 78.3%
+-commutative78.3%
associate-+l-78.3%
Applied egg-rr78.3%
Taylor expanded in a around 0 48.6%
neg-mul-148.6%
Simplified48.6%
sub-neg48.6%
add-sqr-sqrt0.0%
sqrt-unprod3.4%
sqr-neg3.4%
sqrt-unprod3.4%
add-sqr-sqrt3.4%
add-sqr-sqrt0.0%
sqrt-unprod48.6%
sqr-neg48.6%
sqrt-unprod48.3%
add-sqr-sqrt48.6%
+-commutative48.6%
Applied egg-rr48.6%
Final simplification48.6%
Initial program 78.3%
Taylor expanded in x around inf 30.9%
Final simplification30.9%
herbie shell --seed 2023166
(FPCore (x y z a)
:name "tan-example (used to crash)"
:precision binary64
:pre (and (and (and (or (== x 0.0) (and (<= 0.5884142 x) (<= x 505.5909))) (or (and (<= -1.796658e+308 y) (<= y -9.425585e-310)) (and (<= 1.284938e-309 y) (<= y 1.751224e+308)))) (or (and (<= -1.776707e+308 z) (<= z -8.599796e-310)) (and (<= 3.293145e-311 z) (<= z 1.725154e+308)))) (or (and (<= -1.796658e+308 a) (<= a -9.425585e-310)) (and (<= 1.284938e-309 a) (<= a 1.751224e+308))))
(+ x (- (tan (+ y z)) (tan a))))