
Results
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 89.5% |
|---|---|
| Target | 99.5% |
| Herbie | 96.4% |
if (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < -0.0050000000000000001Initial program 76.6%
*-commutative76.6%
Simplified76.6%
Taylor expanded in y around inf 76.4%
*-commutative76.4%
*-commutative76.4%
times-frac94.9%
+-commutative94.9%
*-commutative94.9%
Simplified94.9%
if -0.0050000000000000001 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) < 1e266Initial program 97.9%
if 1e266 < (/.f64 (+.f64 x (/.f64 (-.f64 (*.f64 y z) x) (-.f64 (*.f64 t z) x))) (+.f64 x 1)) Initial program 18.6%
*-commutative18.6%
Simplified18.6%
Taylor expanded in z around inf 81.3%
Final simplification96.2%
if x < -1.25e-39 or 1.05e-95 < x < 2.6e-75 or 1.79999999999999987e-20 < x Initial program 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around inf 66.8%
Taylor expanded in x around inf 84.2%
if -1.25e-39 < x < 1.05e-95Initial program 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in z around inf 77.9%
Taylor expanded in x around 0 64.2%
if 2.6e-75 < x < 1.79999999999999987e-20Initial program 83.5%
*-commutative83.5%
Simplified83.5%
Taylor expanded in y around inf 67.4%
times-frac67.7%
+-commutative67.7%
Simplified67.7%
Taylor expanded in x around 0 67.7%
Final simplification75.8%
if t < -9.30000000000000052e-138 or 7.0000000000000004e-98 < t Initial program 87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in z around inf 84.3%
if -9.30000000000000052e-138 < t < 7.0000000000000004e-98Initial program 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around -inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
distribute-rgt-out--62.6%
unpow262.6%
times-frac70.1%
Simplified70.1%
*-commutative70.1%
clear-num70.2%
frac-2neg70.2%
frac-times70.2%
*-un-lft-identity70.2%
Applied egg-rr70.2%
*-commutative70.2%
associate-*r/70.2%
associate-/l*62.6%
*-commutative62.6%
associate-/l*70.2%
*-commutative70.2%
Simplified70.2%
Final simplification80.1%
if t < -6.20000000000000029e-105 or 8.00000000000000041e-101 < t Initial program 86.8%
*-commutative86.8%
Simplified86.8%
Taylor expanded in z around inf 84.0%
if -6.20000000000000029e-105 < t < 8.00000000000000041e-101Initial program 92.7%
*-commutative92.7%
Simplified92.7%
Taylor expanded in t around 0 81.7%
+-commutative81.7%
mul-1-neg81.7%
unsub-neg81.7%
associate-/l*85.3%
+-commutative85.3%
Simplified85.3%
Final simplification84.4%
if t < -1.30000000000000002e-135 or 9.20000000000000002e-98 < t Initial program 87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in z around inf 84.3%
if -1.30000000000000002e-135 < t < 9.20000000000000002e-98Initial program 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around -inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
distribute-rgt-out--62.6%
unpow262.6%
times-frac70.1%
Simplified70.1%
clear-num70.2%
frac-times70.2%
*-un-lft-identity70.2%
Applied egg-rr70.2%
Final simplification80.1%
if t < -1.85000000000000003e-139 or 4.9999999999999995e-97 < t Initial program 87.1%
*-commutative87.1%
Simplified87.1%
Taylor expanded in z around inf 84.3%
if -1.85000000000000003e-139 < t < 4.9999999999999995e-97Initial program 92.3%
*-commutative92.3%
Simplified92.3%
Taylor expanded in x around -inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
distribute-rgt-out--62.6%
unpow262.6%
times-frac70.1%
Simplified70.1%
Taylor expanded in y around inf 70.1%
Taylor expanded in z around 0 62.6%
*-commutative62.6%
unpow262.6%
associate-*l/70.2%
*-commutative70.2%
Simplified70.2%
clear-num70.2%
un-div-inv70.2%
Applied egg-rr70.2%
Final simplification80.1%
if x < -1.04999999999999997e-39 or 9e-103 < x < 2.45e-83 or 4.49999999999999968e-21 < x Initial program 89.5%
*-commutative89.5%
Simplified89.5%
Taylor expanded in z around inf 66.8%
Taylor expanded in x around inf 84.2%
if -1.04999999999999997e-39 < x < 9e-103 or 2.45e-83 < x < 4.49999999999999968e-21Initial program 87.5%
*-commutative87.5%
Simplified87.5%
Taylor expanded in z around inf 74.9%
Taylor expanded in x around 0 62.7%
Final simplification75.1%
if x < -4.50000000000000008e-138 or 6.20000000000000004e-97 < x Initial program 88.9%
*-commutative88.9%
Simplified88.9%
Taylor expanded in z around inf 65.4%
Taylor expanded in x around inf 69.9%
if -4.50000000000000008e-138 < x < 6.20000000000000004e-97Initial program 88.0%
*-commutative88.0%
Simplified88.0%
Taylor expanded in t around inf 18.7%
+-commutative18.7%
Simplified18.7%
Taylor expanded in x around 0 18.7%
Final simplification55.3%
Initial program 88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in z around inf 70.3%
Taylor expanded in x around inf 51.1%
Final simplification51.1%
herbie shell --seed 2023166
(FPCore (x y z t)
:name "Diagrams.Trail:splitAtParam from diagrams-lib-1.3.0.3, A"
:precision binary64
:herbie-target
(/ (+ x (- (/ y (- t (/ x z))) (/ x (- (* t z) x)))) (+ x 1.0))
(/ (+ x (/ (- (* y z) x) (- (* t z) x))) (+ x 1.0)))