
Results
Herbie found 4 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 88.8%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Final simplification100.0%
if y < -1 or 1.30000000000000004 < y Initial program 77.2%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 99.0%
+-commutative99.0%
mul-1-neg99.0%
unsub-neg99.0%
Simplified99.0%
if -1 < y < 1.30000000000000004Initial program 99.9%
associate-*r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 97.7%
Final simplification98.4%
if y < -1 or 1 < y Initial program 77.2%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 98.4%
if -1 < y < 1Initial program 99.9%
associate-*r/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 97.7%
Final simplification98.1%
Initial program 88.8%
associate-*r/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 51.0%
Final simplification51.0%
herbie shell --seed 2023167
(FPCore (x y)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, B"
:precision binary64
:herbie-target
(if (< y -3693.8482788297247) (- (/ x (* y y)) (- (/ x y) x)) (if (< y 6799310503.41891) (/ (* x y) (+ y 1.0)) (- (/ x (* y y)) (- (/ x y) x))))
(/ (* x y) (+ y 1.0)))