
Results
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 85.0% |
|---|---|
| Target | 97.3% |
| Herbie | 90.2% |
if z < -7.20000000000000016e202 or 6.9999999999999997e75 < z Initial program 59.2%
sub-neg59.2%
+-commutative59.2%
neg-sub059.2%
associate-+l-59.2%
sub0-neg59.2%
neg-mul-159.2%
sub-neg59.2%
+-commutative59.2%
neg-sub059.2%
associate-+l-59.2%
sub0-neg59.2%
neg-mul-159.2%
times-frac59.2%
metadata-eval59.2%
*-lft-identity59.2%
*-commutative59.2%
Simplified59.2%
Taylor expanded in y around inf 48.9%
associate-/l*64.2%
Simplified64.2%
Taylor expanded in a around 0 86.5%
mul-1-neg86.5%
unsub-neg86.5%
Simplified86.5%
if -7.20000000000000016e202 < z < 6.9999999999999997e75Initial program 98.3%
Final simplification95.0%
if z < -1.01999999999999995e143 or -5.40000000000000003e109 < z < -9.19999999999999993e-14 or 1.65e10 < z < 8.99999999999999953e120 or 3.00000000000000016e178 < z Initial program 75.0%
sub-neg75.0%
+-commutative75.0%
neg-sub075.0%
associate-+l-75.0%
sub0-neg75.0%
neg-mul-175.0%
sub-neg75.0%
+-commutative75.0%
neg-sub075.0%
associate-+l-75.0%
sub0-neg75.0%
neg-mul-175.0%
times-frac75.0%
metadata-eval75.0%
*-lft-identity75.0%
*-commutative75.0%
Simplified75.0%
Taylor expanded in y around inf 60.7%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in a around 0 84.3%
mul-1-neg84.3%
unsub-neg84.3%
Simplified84.3%
if -1.01999999999999995e143 < z < -5.40000000000000003e109 or -9.19999999999999993e-14 < z < 1.65e10Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 77.5%
neg-mul-177.5%
Simplified77.5%
if 8.99999999999999953e120 < z < 3.00000000000000016e178Initial program 53.1%
sub-neg53.1%
+-commutative53.1%
neg-sub053.1%
associate-+l-53.1%
sub0-neg53.1%
neg-mul-153.1%
sub-neg53.1%
+-commutative53.1%
neg-sub053.1%
associate-+l-53.1%
sub0-neg53.1%
neg-mul-153.1%
times-frac53.1%
metadata-eval53.1%
*-lft-identity53.1%
*-commutative53.1%
Simplified53.1%
Taylor expanded in a around inf 50.8%
+-commutative50.8%
associate--l+50.8%
associate-/l*59.9%
*-commutative59.9%
unpow259.9%
unpow259.9%
swap-sqr59.8%
unpow259.8%
associate-/r/59.8%
*-commutative59.8%
*-commutative59.8%
*-commutative59.8%
associate-/r*75.1%
Simplified75.1%
Taylor expanded in t around 0 76.5%
associate-/l/91.8%
div-sub91.7%
Simplified91.7%
Final simplification81.0%
if z < -6.19999999999999987e-37 or 4.8e10 < z Initial program 75.4%
sub-neg75.4%
+-commutative75.4%
neg-sub075.4%
associate-+l-75.4%
sub0-neg75.4%
neg-mul-175.4%
sub-neg75.4%
+-commutative75.4%
neg-sub075.4%
associate-+l-75.4%
sub0-neg75.4%
neg-mul-175.4%
times-frac75.4%
metadata-eval75.4%
*-lft-identity75.4%
*-commutative75.4%
Simplified75.4%
Taylor expanded in y around inf 55.2%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in a around 0 77.2%
mul-1-neg77.2%
unsub-neg77.2%
Simplified77.2%
if -6.19999999999999987e-37 < z < -2.2000000000000001e-137Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around inf 68.4%
+-commutative68.4%
associate--l+68.4%
associate-/l*65.1%
*-commutative65.1%
unpow265.1%
unpow265.1%
swap-sqr65.1%
unpow265.1%
associate-/r/68.4%
*-commutative68.4%
*-commutative68.4%
*-commutative68.4%
associate-/r*64.6%
Simplified64.6%
Taylor expanded in t around 0 72.6%
associate-/l/68.8%
div-sub68.8%
Simplified68.8%
if -2.2000000000000001e-137 < z < 4.8e10Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 69.2%
associate-*r/69.2%
neg-mul-169.2%
neg-sub069.2%
sub-neg69.2%
+-commutative69.2%
associate--r+69.2%
neg-sub069.2%
remove-double-neg69.2%
*-commutative69.2%
Simplified69.2%
Final simplification73.2%
if z < -1.3e22 or -3.5e-126 < z < -2.2000000000000001e-137 or 7.0000000000000002e32 < z Initial program 74.4%
sub-neg74.4%
+-commutative74.4%
neg-sub074.4%
associate-+l-74.4%
sub0-neg74.4%
neg-mul-174.4%
sub-neg74.4%
+-commutative74.4%
neg-sub074.4%
associate-+l-74.4%
sub0-neg74.4%
neg-mul-174.4%
times-frac74.4%
metadata-eval74.4%
*-lft-identity74.4%
*-commutative74.4%
Simplified74.4%
Taylor expanded in z around inf 53.6%
if -1.3e22 < z < -3.5e-126 or -2.2000000000000001e-137 < z < 7.0000000000000002e32Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 50.8%
Final simplification52.2%
if z < -1.25000000000000001e-151 or 5.5999999999999998e-89 < z Initial program 81.7%
sub-neg81.7%
+-commutative81.7%
neg-sub081.7%
associate-+l-81.7%
sub0-neg81.7%
neg-mul-181.7%
sub-neg81.7%
+-commutative81.7%
neg-sub081.7%
associate-+l-81.7%
sub0-neg81.7%
neg-mul-181.7%
times-frac81.7%
metadata-eval81.7%
*-lft-identity81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in y around inf 51.3%
associate-/l*58.5%
Simplified58.5%
Taylor expanded in a around 0 67.6%
mul-1-neg67.6%
unsub-neg67.6%
Simplified67.6%
if -1.25000000000000001e-151 < z < 5.5999999999999998e-89Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
sub-neg99.9%
+-commutative99.9%
neg-sub099.9%
associate-+l-99.9%
sub0-neg99.9%
neg-mul-199.9%
times-frac99.9%
metadata-eval99.9%
*-lft-identity99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 59.5%
Final simplification65.0%
if z < -1.25000000000000001e-151 or 2.2e9 < z Initial program 79.6%
sub-neg79.6%
+-commutative79.6%
neg-sub079.6%
associate-+l-79.6%
sub0-neg79.6%
neg-mul-179.6%
sub-neg79.6%
+-commutative79.6%
neg-sub079.6%
associate-+l-79.6%
sub0-neg79.6%
neg-mul-179.6%
times-frac79.6%
metadata-eval79.6%
*-lft-identity79.6%
*-commutative79.6%
Simplified79.6%
Taylor expanded in y around inf 53.6%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in a around 0 71.9%
mul-1-neg71.9%
unsub-neg71.9%
Simplified71.9%
if -1.25000000000000001e-151 < z < 2.2e9Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in a around 0 69.5%
associate-*r/69.5%
neg-mul-169.5%
neg-sub069.5%
sub-neg69.5%
+-commutative69.5%
associate--r+69.5%
neg-sub069.5%
remove-double-neg69.5%
*-commutative69.5%
Simplified69.5%
Final simplification71.0%
if z < -9.80000000000000042e231 or 2.7499999999999998e34 < z Initial program 63.3%
sub-neg63.3%
+-commutative63.3%
neg-sub063.3%
associate-+l-63.3%
sub0-neg63.3%
neg-mul-163.3%
sub-neg63.3%
+-commutative63.3%
neg-sub063.3%
associate-+l-63.3%
sub0-neg63.3%
neg-mul-163.3%
times-frac63.3%
metadata-eval63.3%
*-lft-identity63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in z around inf 66.9%
if -9.80000000000000042e231 < z < -1.21999999999999996e-29Initial program 89.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
times-frac89.2%
metadata-eval89.2%
*-lft-identity89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
associate-*r/64.9%
*-commutative64.9%
fma-neg64.9%
Simplified64.9%
Taylor expanded in z around 0 43.7%
associate-*r/43.7%
neg-mul-143.7%
Simplified43.7%
if -1.21999999999999996e-29 < z < 2.7499999999999998e34Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 49.4%
Final simplification53.0%
if z < -9.80000000000000042e231 or 1.99999999999999988e39 < z Initial program 63.3%
sub-neg63.3%
+-commutative63.3%
neg-sub063.3%
associate-+l-63.3%
sub0-neg63.3%
neg-mul-163.3%
sub-neg63.3%
+-commutative63.3%
neg-sub063.3%
associate-+l-63.3%
sub0-neg63.3%
neg-mul-163.3%
times-frac63.3%
metadata-eval63.3%
*-lft-identity63.3%
*-commutative63.3%
Simplified63.3%
Taylor expanded in z around inf 66.9%
if -9.80000000000000042e231 < z < -2.2999999999999998e-22Initial program 89.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
sub-neg89.2%
+-commutative89.2%
neg-sub089.2%
associate-+l-89.2%
sub0-neg89.2%
neg-mul-189.2%
times-frac89.2%
metadata-eval89.2%
*-lft-identity89.2%
*-commutative89.2%
Simplified89.2%
Taylor expanded in y around inf 56.1%
associate-/l*64.8%
Simplified64.8%
Taylor expanded in a around 0 43.7%
associate-*r/43.7%
neg-mul-143.7%
Simplified43.7%
if -2.2999999999999998e-22 < z < 1.99999999999999988e39Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
sub-neg99.8%
+-commutative99.8%
neg-sub099.8%
associate-+l-99.8%
sub0-neg99.8%
neg-mul-199.8%
times-frac99.8%
metadata-eval99.8%
*-lft-identity99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in z around 0 49.4%
Final simplification53.0%
Initial program 87.4%
sub-neg87.4%
+-commutative87.4%
neg-sub087.4%
associate-+l-87.4%
sub0-neg87.4%
neg-mul-187.4%
sub-neg87.4%
+-commutative87.4%
neg-sub087.4%
associate-+l-87.4%
sub0-neg87.4%
neg-mul-187.4%
times-frac87.4%
metadata-eval87.4%
*-lft-identity87.4%
*-commutative87.4%
Simplified87.4%
Taylor expanded in z around 0 33.2%
Final simplification33.2%
herbie shell --seed 2023166
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))
(/ (- x (* y z)) (- t (* a z))))