| Alternative 1 | |
|---|---|
| Accuracy | 67.2% |
| Cost | 1736 |
(FPCore (c0 w h D d M)
:precision binary64
(*.f64
(/.f64 c0 (*.f64 2 w))
(+.f64
(/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))
(sqrt.f64
(-.f64
(*.f64
(/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))
(/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))))
(*.f64 M M))))))(FPCore (c0 w h D d M)
:precision binary64
(let* ((t_0 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))))
(if (or (<=.f64 t_0 0) (not (<=.f64 t_0 +inf.0)))
(*.f64 1/4 (*.f64 (/.f64 D (/.f64 d M)) (*.f64 h (*.f64 D (/.f64 M d)))))
(*.f64
(/.f64 (*.f64 c0 d) (*.f64 w D))
(/.f64 (*.f64 c0 d) (*.f64 (*.f64 w h) D))))))\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\begin{array}{l}
t_0 := \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\\
\mathbf{if}\;\mathsf{<=.f64}\left(t_0, 0\right) \lor \neg \mathsf{<=.f64}\left(t_0, +\infty\right):\\
\;\;\;\;\mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(M, d\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(w, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), D\right)\right)\right)\\
\end{array}
if (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) < -0.0 or +inf.0 < (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) Initial program 3.6%
Simplified1.6%
[Start]3.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
|---|---|
associate-*l/ [<=]2.9 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{*.f64}\left(d, d\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
*-commutative [=>]2.9 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
fma-def [=>]2.0 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)}\right)
\] |
associate-*l* [=>]1.7 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \color{blue}{\mathsf{*.f64}\left(w, \mathsf{*.f64}\left(h, \mathsf{*.f64}\left(D, D\right)\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
*-commutative [=>]1.7 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(D, D\right)\right), w\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
associate-*r* [=>]1.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), D\right)}, w\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
associate-*l* [=>]1.7 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \mathsf{*.f64}\left(D, w\right)\right)}\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
*-commutative [<=]1.7 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, D\right), \color{blue}{\mathsf{*.f64}\left(w, D\right)}\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
Taylor expanded in c0 around -inf 6.3%
Simplified51.9%
[Start]6.3 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(M, 2\right), h\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(d, 2\right), c0\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, h\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, h\right)\right)\right)\right)\right), c0\right)\right)\right)\right)
\] |
|---|---|
fma-def [=>]6.3 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\mathsf{fma.f64}\left(\frac{1}{2}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(M, 2\right), h\right)\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(d, 2\right), c0\right)\right), \mathsf{*.f64}\left(-1, \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, h\right)\right)\right), \mathsf{*.f64}\left(-1, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(w, h\right)\right)\right)\right)\right), c0\right)\right)\right)}\right)
\] |
Taylor expanded in c0 around 0 50.2%
Simplified53.4%
[Start]50.2 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(M, 2\right), h\right)\right), \mathsf{pow.f64}\left(d, 2\right)\right)\right)
\] |
|---|---|
unpow2 [=>]50.2 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(M, M\right)}, h\right)\right), \mathsf{pow.f64}\left(d, 2\right)\right)\right)
\] |
associate-*r* [<=]53.6 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \color{blue}{\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right)}\right), \mathsf{pow.f64}\left(d, 2\right)\right)\right)
\] |
associate-/l* [=>]53.4 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\mathsf{/.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)}\right)
\] |
unpow2 [=>]53.4 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(D, D\right)}, \mathsf{/.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right)
\] |
unpow2 [=>]53.4 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(d, d\right)}, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right)
\] |
Applied egg-rr77.6%
[Start]53.4 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right)
\] |
|---|---|
times-frac [=>]64.5 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(d, M\right), \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, h\right)\right)\right)}\right)\right)
\] |
times-frac [=>]77.6 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)}\right)
\] |
Applied egg-rr85.3%
[Start]77.6 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(M, h\right)\right)\right)\right)\right)
\] |
|---|---|
associate-/r* [=>]82.1 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{/.f64}\left(D, \color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(d, M\right), h\right)}\right)\right)\right)
\] |
associate-/r/ [=>]85.5 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), h\right)}\right)\right)
\] |
div-inv [=>]85.3 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(d, M\right)\right)\right)}, h\right)\right)\right)
\] |
clear-num [<=]85.3 | \[ \mathsf{*.f64}\left(\frac{1}{4}, \mathsf{*.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(d, M\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, \color{blue}{\mathsf{/.f64}\left(M, d\right)}\right), h\right)\right)\right)
\] |
if -0.0 < (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) < +inf.0Initial program 25.9%
Simplified26.3%
[Start]25.9 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
|---|---|
times-frac [=>]22.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{+.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(D, D\right)\right)\right)}, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
fma-def [=>]22.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \color{blue}{\mathsf{fma.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)}\right)
\] |
associate-/r* [=>]22.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), \color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), D\right), D\right)}, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right)\right), \mathsf{*.f64}\left(M, M\right)\right)\right)\right)\right)
\] |
difference-of-squares [=>]22.6 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(2, w\right)\right), \mathsf{fma.f64}\left(\mathsf{/.f64}\left(c0, \mathsf{*.f64}\left(w, h\right)\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(d, d\right), D\right), D\right), \mathsf{sqrt.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), M\right), \mathsf{\_.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, \mathsf{*.f64}\left(d, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(w, h\right), \mathsf{*.f64}\left(D, D\right)\right)\right), M\right)\right)}\right)\right)\right)
\] |
Taylor expanded in c0 around inf 15.1%
Simplified49.4%
[Start]15.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(d, 2\right), \mathsf{pow.f64}\left(c0, 2\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(w, 2\right), h\right)\right)\right)
\] |
|---|---|
*-commutative [=>]15.1 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{pow.f64}\left(c0, 2\right), \mathsf{pow.f64}\left(d, 2\right)\right)}, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(w, 2\right), h\right)\right)\right)
\] |
unpow2 [=>]15.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(c0, c0\right)}, \mathsf{pow.f64}\left(d, 2\right)\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(w, 2\right), h\right)\right)\right)
\] |
unpow2 [=>]15.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, c0\right), \color{blue}{\mathsf{*.f64}\left(d, d\right)}\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(w, 2\right), h\right)\right)\right)
\] |
unswap-sqr [=>]30.8 | \[ \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right)}, \mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{*.f64}\left(\mathsf{pow.f64}\left(w, 2\right), h\right)\right)\right)
\] |
associate-*r* [=>]30.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{pow.f64}\left(D, 2\right), \mathsf{pow.f64}\left(w, 2\right)\right), h\right)}\right)
\] |
unpow2 [=>]30.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(D, D\right)}, \mathsf{pow.f64}\left(w, 2\right)\right), h\right)\right)
\] |
unpow2 [=>]30.1 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \color{blue}{\mathsf{*.f64}\left(w, w\right)}\right), h\right)\right)
\] |
unswap-sqr [=>]49.4 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, w\right), \mathsf{*.f64}\left(D, w\right)\right)}, h\right)\right)
\] |
Applied egg-rr85.9%
[Start]49.4 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, w\right), \mathsf{*.f64}\left(D, w\right)\right), h\right)\right)
\] |
|---|---|
associate-*l* [=>]59.4 | \[ \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(c0, d\right)\right), \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, w\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, w\right), h\right)\right)}\right)
\] |
times-frac [=>]86.9 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, w\right), h\right)\right)\right)}
\] |
associate-*l* [=>]85.9 | \[ \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \mathsf{*.f64}\left(D, w\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c0, d\right), \color{blue}{\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(w, h\right)\right)}\right)\right)
\] |
Final simplification85.4%
| Alternative 1 | |
|---|---|
| Accuracy | 67.2% |
| Cost | 1736 |
| Alternative 2 | |
|---|---|
| Accuracy | 67.0% |
| Cost | 1348 |
| Alternative 3 | |
|---|---|
| Accuracy | 65.9% |
| Cost | 1225 |
| Alternative 4 | |
|---|---|
| Accuracy | 67.2% |
| Cost | 1225 |
| Alternative 5 | |
|---|---|
| Accuracy | 66.2% |
| Cost | 1220 |
| Alternative 6 | |
|---|---|
| Accuracy | 62.9% |
| Cost | 960 |
| Alternative 7 | |
|---|---|
| Accuracy | 64.5% |
| Cost | 960 |
| Alternative 8 | |
|---|---|
| Accuracy | 74.1% |
| Cost | 960 |
| Alternative 9 | |
|---|---|
| Accuracy | 50.5% |
| Cost | 64 |
herbie shell --seed 2023144
(FPCore (c0 w h D d M)
:name "Henrywood and Agarwal, Equation (13)"
:precision binary64
(* (/ c0 (* 2.0 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))