| Alternative 1 | |
|---|---|
| Accuracy | 69.8% |
| Cost | 2529 |
(FPCore (x y z t a) :precision binary64 (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))))
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (-.f64 (*.f64 a z) t))
(t_2 (-.f64 (*.f64 z (/.f64 y t_1)) (/.f64 x t_1))))
(if (<=.f64
(*.f64 a z)
-200000000000000009655823040897755724991688492844686312786150858374325529235015311074428291647705988527319131870906741220999075456086329715600792597832264821896052782616171141921272736618612235758357506491949112630604620500944543457696353904452597448704)
(/.f64 (-.f64 y (/.f64 x z)) a)
(if (<=.f64 (*.f64 a z) -6189700196426901/1237940039285380274899124224)
t_2
(if (<=.f64
(*.f64 a z)
5000000000000000073153476153374365154850214939323275296393053935848981821255741079552)
(/.f64 (-.f64 x (*.f64 z y)) (-.f64 t (*.f64 a z)))
(if (<=.f64
(*.f64 a z)
500000000000000028237705510260420707420313190991529187350282582077728281983789098594609880794729991489884084673768181048282990322303461938652580072801639889709891970152031159909282119041295638459799794152650876636200924348147564544)
t_2
(-.f64 (/.f64 y a) (/.f64 (/.f64 x a) z))))))))\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(a, z\right)\right)\right)
\begin{array}{l}
t_1 := \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\\
t_2 := \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, \mathsf{/.f64}\left(y, t_1\right)\right), \mathsf{/.f64}\left(x, t_1\right)\right)\\
\mathbf{if}\;\mathsf{<=.f64}\left(\mathsf{*.f64}\left(a, z\right), -200000000000000009655823040897755724991688492844686312786150858374325529235015311074428291647705988527319131870906741220999075456086329715600792597832264821896052782616171141921272736618612235758357506491949112630604620500944543457696353904452597448704\right):\\
\;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right)\\
\mathbf{elif}\;\mathsf{<=.f64}\left(\mathsf{*.f64}\left(a, z\right), \frac{-6189700196426901}{1237940039285380274899124224}\right):\\
\;\;\;\;t_2\\
\mathbf{elif}\;\mathsf{<=.f64}\left(\mathsf{*.f64}\left(a, z\right), 5000000000000000073153476153374365154850214939323275296393053935848981821255741079552\right):\\
\;\;\;\;\mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, y\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(a, z\right)\right)\right)\\
\mathbf{elif}\;\mathsf{<=.f64}\left(\mathsf{*.f64}\left(a, z\right), 500000000000000028237705510260420707420313190991529187350282582077728281983789098594609880794729991489884084673768181048282990322303461938652580072801639889709891970152031159909282119041295638459799794152650876636200924348147564544\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\mathsf{\_.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(x, a\right), z\right)\right)\\
\end{array}
| Original | 83.0% |
|---|---|
| Target | 96.8% |
| Herbie | 96.8% |
if (*.f64 a z) < -2.0000000000000001e251Initial program 39.1%
Simplified39.1%
[Start]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(a, z\right)\right)\right)
\] |
|---|---|
sub-neg [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(t, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right)\right)}\right)
\] |
+-commutative [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right), t\right)}\right)
\] |
neg-sub0 [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, z\right)\right)}, t\right)\right)
\] |
associate-+l- [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub0-neg [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
neg-mul-1 [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub-neg [=>]39.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(x, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
+-commutative [=>]39.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right), x\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-sub0 [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right)}, x\right), \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
associate-+l- [=>]39.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
sub0-neg [=>]39.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-mul-1 [=>]39.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
times-frac [=>]39.1 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)}
\] |
metadata-eval [=>]39.1 | \[ \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
*-lft-identity [=>]39.1 | \[ \color{blue}{\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}
\] |
*-commutative [=>]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(z, a\right)}, t\right)\right)
\] |
Applied egg-rr46.9%
[Start]39.1 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)
\] |
|---|---|
div-sub [=>]39.1 | \[ \color{blue}{\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)}
\] |
associate-/l* [=>]46.9 | \[ \mathsf{\_.f64}\left(\color{blue}{\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right), z\right)\right)}, \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)
\] |
Taylor expanded in a around inf 98.7%
if -2.0000000000000001e251 < (*.f64 a z) < -4.9999999999999997e-12 or 5.0000000000000001e84 < (*.f64 a z) < 5.0000000000000003e230Initial program 87.7%
Simplified87.7%
[Start]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(a, z\right)\right)\right)
\] |
|---|---|
sub-neg [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(t, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right)\right)}\right)
\] |
+-commutative [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right), t\right)}\right)
\] |
neg-sub0 [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, z\right)\right)}, t\right)\right)
\] |
associate-+l- [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub0-neg [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
neg-mul-1 [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub-neg [=>]87.7 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(x, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
+-commutative [=>]87.7 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right), x\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-sub0 [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right)}, x\right), \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
associate-+l- [=>]87.7 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
sub0-neg [=>]87.7 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-mul-1 [=>]87.7 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
times-frac [=>]87.7 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)}
\] |
metadata-eval [=>]87.7 | \[ \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
*-lft-identity [=>]87.7 | \[ \color{blue}{\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}
\] |
*-commutative [=>]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(z, a\right)}, t\right)\right)
\] |
Applied egg-rr98.3%
[Start]87.7 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)
\] |
|---|---|
div-sub [=>]87.7 | \[ \color{blue}{\mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y, z\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)}
\] |
associate-/l* [=>]98.3 | \[ \mathsf{\_.f64}\left(\color{blue}{\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right), z\right)\right)}, \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)
\] |
Applied egg-rr94.6%
[Start]98.3 | \[ \mathsf{\_.f64}\left(\mathsf{/.f64}\left(y, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right), z\right)\right), \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)
\] |
|---|---|
associate-/r/ [=>]94.6 | \[ \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right), z\right)}, \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(z, a\right), t\right)\right)\right)
\] |
if -4.9999999999999997e-12 < (*.f64 a z) < 5.0000000000000001e84Initial program 97.5%
if 5.0000000000000003e230 < (*.f64 a z) Initial program 40.5%
Simplified40.5%
[Start]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(a, z\right)\right)\right)
\] |
|---|---|
sub-neg [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(t, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right)\right)}\right)
\] |
+-commutative [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(a, z\right)\right), t\right)}\right)
\] |
neg-sub0 [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(a, z\right)\right)}, t\right)\right)
\] |
associate-+l- [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub0-neg [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
neg-mul-1 [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}\right)
\] |
sub-neg [=>]40.5 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(x, \mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
+-commutative [=>]40.5 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{neg.f64}\left(\mathsf{*.f64}\left(y, z\right)\right), x\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-sub0 [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{*.f64}\left(y, z\right)\right)}, x\right), \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
associate-+l- [=>]40.5 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{\_.f64}\left(0, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
sub0-neg [=>]40.5 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{neg.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
neg-mul-1 [=>]40.5 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
times-frac [=>]40.5 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(-1, -1\right), \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)}
\] |
metadata-eval [=>]40.5 | \[ \mathsf{*.f64}\left(\color{blue}{1}, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)\right)
\] |
*-lft-identity [=>]40.5 | \[ \color{blue}{\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\mathsf{*.f64}\left(a, z\right), t\right)\right)}
\] |
*-commutative [=>]40.5 | \[ \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(y, z\right), x\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{*.f64}\left(z, a\right)}, t\right)\right)
\] |
Taylor expanded in z around inf 73.5%
Simplified95.7%
[Start]73.5 | \[ \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(x, \mathsf{*.f64}\left(a, z\right)\right)\right), \mathsf{/.f64}\left(y, a\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)
\] |
|---|---|
mul-1-neg [=>]73.5 | \[ \mathsf{\_.f64}\left(\mathsf{+.f64}\left(\color{blue}{\mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(a, z\right)\right)\right)}, \mathsf{/.f64}\left(y, a\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)
\] |
+-commutative [=>]73.5 | \[ \mathsf{\_.f64}\left(\color{blue}{\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(a, z\right)\right)\right)\right)}, \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)
\] |
associate--l+ [=>]73.5 | \[ \color{blue}{\mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(a, z\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)\right)}
\] |
associate-/r* [=>]85.9 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\mathsf{neg.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(x, a\right), z\right)}\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)\right)
\] |
distribute-neg-frac [=>]85.9 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{neg.f64}\left(\mathsf{/.f64}\left(x, a\right)\right), z\right)}, \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)\right)
\] |
mul-1-neg [<=]85.9 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(x, a\right)\right)}, z\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(a, 2\right), z\right)\right)\right)\right)\right)
\] |
associate-/r* [=>]85.8 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(x, a\right)\right), z\right), \mathsf{*.f64}\left(-1, \color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{pow.f64}\left(a, 2\right)\right), z\right)}\right)\right)\right)
\] |
associate-*r/ [=>]85.8 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(x, a\right)\right), z\right), \color{blue}{\mathsf{/.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), z\right)}\right)\right)
\] |
div-sub [<=]85.8 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \color{blue}{\mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(x, a\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right)\right), z\right)}\right)
\] |
distribute-lft-out-- [=>]85.8 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(-1, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, a\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right)\right)}, z\right)\right)
\] |
associate-*r/ [<=]85.8 | \[ \mathsf{+.f64}\left(\mathsf{/.f64}\left(y, a\right), \color{blue}{\mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, a\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(y, t\right), \mathsf{pow.f64}\left(a, 2\right)\right)\right), z\right)\right)}\right)
\] |
Taylor expanded in x around inf 96.9%
Final simplification96.8%
| Alternative 1 | |
|---|---|
| Accuracy | 69.8% |
| Cost | 2529 |
| Alternative 2 | |
|---|---|
| Accuracy | 55.1% |
| Cost | 2272 |
| Alternative 3 | |
|---|---|
| Accuracy | 54.8% |
| Cost | 2272 |
| Alternative 4 | |
|---|---|
| Accuracy | 92.3% |
| Cost | 2248 |
| Alternative 5 | |
|---|---|
| Accuracy | 78.6% |
| Cost | 1616 |
| Alternative 6 | |
|---|---|
| Accuracy | 97.5% |
| Cost | 1609 |
| Alternative 7 | |
|---|---|
| Accuracy | 78.9% |
| Cost | 1488 |
| Alternative 8 | |
|---|---|
| Accuracy | 73.1% |
| Cost | 969 |
| Alternative 9 | |
|---|---|
| Accuracy | 68.8% |
| Cost | 968 |
| Alternative 10 | |
|---|---|
| Accuracy | 53.9% |
| Cost | 712 |
| Alternative 11 | |
|---|---|
| Accuracy | 34.6% |
| Cost | 192 |
herbie shell --seed 2023144
(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))))