| Alternative 1 | |
|---|---|
| Accuracy | 86.4% |
| Cost | 20873 |
(FPCore (J K U) :precision binary64 (*.f64 (*.f64 (*.f64 -2 J) (cos.f64 (/.f64 K 2))) (sqrt.f64 (+.f64 1 (pow.f64 (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) 2)))))
(FPCore (J K U)
:precision binary64
(let* ((t_0 (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))))
(t_1 (cos.f64 (*.f64 K 1/2))))
(if (<=.f64 t_0 -100000000)
U
(if (<=.f64 t_0 500000)
(*.f64
J
(*.f64
(*.f64 -2 t_1)
(hypot.f64 1 (*.f64 U (/.f64 (/.f64 1/2 J) t_1)))))
(neg.f64 U)))))\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)
\begin{array}{l}
t_0 := \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\\
t_1 := \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\\
\mathbf{if}\;\mathsf{<=.f64}\left(t_0, -100000000\right):\\
\;\;\;\;U\\
\mathbf{elif}\;\mathsf{<=.f64}\left(t_0, 500000\right):\\
\;\;\;\;\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, t_1\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, J\right), t_1\right)\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{neg.f64}\left(U\right)\\
\end{array}
if (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) < -1e8Initial program 41.1%
Simplified73.6%
[Start]41.1 | \[ \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)
\] |
|---|---|
*-commutative [=>]41.1 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
associate-*l* [=>]41.1 | \[ \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)
\] |
associate-*r* [=>]41.1 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
*-commutative [=>]41.1 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)}
\] |
associate-*l* [=>]41.0 | \[ \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)\right)}
\] |
*-commutative [=>]41.0 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)}\right)\right)
\] |
unpow2 [=>]41.0 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
hypot-1-def [=>]73.6 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \color{blue}{\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)
\] |
*-commutative [=>]73.6 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(J, 2\right)}, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)
\] |
associate-*l* [=>]73.6 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
Taylor expanded in U around -inf 100.0%
if -1e8 < (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) < 5e5Initial program 99.8%
Simplified99.8%
[Start]99.8 | \[ \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)
\] |
|---|---|
*-commutative [=>]99.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
associate-*l* [=>]99.8 | \[ \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)
\] |
associate-*r* [=>]99.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
*-commutative [=>]99.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)}
\] |
associate-*l* [=>]99.8 | \[ \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)\right)}
\] |
*-commutative [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)}\right)\right)
\] |
unpow2 [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
hypot-1-def [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \color{blue}{\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)
\] |
*-commutative [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(J, 2\right)}, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)
\] |
associate-*l* [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
Applied egg-rr99.8%
[Start]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)
\] |
|---|---|
add-log-exp [=>]3.1 | \[ \color{blue}{\mathsf{log.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)}
\] |
*-un-lft-identity [=>]3.1 | \[ \mathsf{log.f64}\left(\color{blue}{\mathsf{*.f64}\left(1, \mathsf{exp.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)}\right)
\] |
log-prod [=>]3.1 | \[ \color{blue}{\mathsf{+.f64}\left(\mathsf{log.f64}\left(1\right), \mathsf{log.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)}
\] |
metadata-eval [=>]3.1 | \[ \mathsf{+.f64}\left(\color{blue}{0}, \mathsf{log.f64}\left(\mathsf{exp.f64}\left(\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)\right)
\] |
add-log-exp [<=]99.8 | \[ \mathsf{+.f64}\left(0, \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)\right)}\right)
\] |
associate-*r* [=>]99.8 | \[ \mathsf{+.f64}\left(0, \mathsf{*.f64}\left(J, \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), -2\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)}\right)\right)
\] |
*-commutative [=>]99.8 | \[ \mathsf{+.f64}\left(0, \mathsf{*.f64}\left(J, \color{blue}{\mathsf{*.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), -2\right)\right)}\right)\right)
\] |
Simplified99.8%
[Start]99.8 | \[ \mathsf{+.f64}\left(0, \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), -2\right)\right)\right)\right)
\] |
|---|---|
+-lft-identity [=>]99.8 | \[ \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right), \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), -2\right)\right)\right)}
\] |
*-commutative [=>]99.8 | \[ \mathsf{*.f64}\left(J, \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), -2\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right)\right)}\right)
\] |
*-commutative [<=]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(\frac{1}{2}, K\right)}\right), -2\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right)\right)\right)
\] |
*-commutative [<=]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right)}, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right)\right)\right)
\] |
*-rgt-identity [<=]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(\color{blue}{\mathsf{*.f64}\left(U, 1\right)}, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right)\right)\right)
\] |
associate-*r/ [<=]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(U, \mathsf{/.f64}\left(1, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right), \mathsf{*.f64}\left(J, 2\right)\right)\right)\right)}\right)\right)\right)
\] |
*-commutative [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, 2\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
associate-/r* [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \mathsf{*.f64}\left(J, 2\right)\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\right)}\right)\right)\right)\right)
\] |
*-commutative [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{/.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(2, J\right)}\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\right)\right)\right)\right)\right)
\] |
associate-/r* [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\color{blue}{\mathsf{/.f64}\left(\mathsf{/.f64}\left(1, 2\right), J\right)}, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\right)\right)\right)\right)\right)
\] |
metadata-eval [=>]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\color{blue}{\frac{1}{2}}, J\right), \mathsf{cos.f64}\left(\mathsf{*.f64}\left(K, \frac{1}{2}\right)\right)\right)\right)\right)\right)\right)
\] |
*-commutative [<=]99.8 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, \mathsf{cos.f64}\left(\mathsf{*.f64}\left(\frac{1}{2}, K\right)\right)\right), \mathsf{hypot.f64}\left(1, \mathsf{*.f64}\left(U, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, J\right), \mathsf{cos.f64}\left(\color{blue}{\mathsf{*.f64}\left(\frac{1}{2}, K\right)}\right)\right)\right)\right)\right)\right)
\] |
if 5e5 < (/.f64 U (*.f64 (*.f64 2 J) (cos.f64 (/.f64 K 2)))) Initial program 43.8%
Simplified74.5%
[Start]43.8 | \[ \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)
\] |
|---|---|
*-commutative [=>]43.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(-2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
associate-*l* [=>]43.8 | \[ \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)
\] |
associate-*r* [=>]43.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right), \mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}
\] |
*-commutative [=>]43.8 | \[ \color{blue}{\mathsf{*.f64}\left(\mathsf{*.f64}\left(J, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)}
\] |
associate-*l* [=>]43.7 | \[ \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right), -2\right)\right)\right)}
\] |
*-commutative [=>]43.7 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \color{blue}{\mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{pow.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), 2\right)\right)\right)\right)}\right)\right)
\] |
unpow2 [=>]43.7 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \color{blue}{\mathsf{*.f64}\left(\mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right), \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
hypot-1-def [=>]74.5 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \color{blue}{\mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(2, J\right), \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)}\right)\right)\right)
\] |
*-commutative [=>]74.5 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \mathsf{*.f64}\left(\color{blue}{\mathsf{*.f64}\left(J, 2\right)}, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)\right)\right)\right)\right)
\] |
associate-*l* [=>]74.5 | \[ \mathsf{*.f64}\left(J, \mathsf{*.f64}\left(\mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right), \mathsf{*.f64}\left(-2, \mathsf{hypot.f64}\left(1, \mathsf{/.f64}\left(U, \color{blue}{\mathsf{*.f64}\left(J, \mathsf{*.f64}\left(2, \mathsf{cos.f64}\left(\mathsf{/.f64}\left(K, 2\right)\right)\right)\right)}\right)\right)\right)\right)\right)
\] |
Taylor expanded in J around 0 99.9%
Simplified99.9%
[Start]99.9 | \[ \mathsf{*.f64}\left(-1, U\right)
\] |
|---|---|
neg-mul-1 [<=]99.9 | \[ \color{blue}{\mathsf{neg.f64}\left(U\right)}
\] |
Final simplification99.9%
| Alternative 1 | |
|---|---|
| Accuracy | 86.4% |
| Cost | 20873 |
| Alternative 2 | |
|---|---|
| Accuracy | 73.9% |
| Cost | 14736 |
| Alternative 3 | |
|---|---|
| Accuracy | 58.9% |
| Cost | 8020 |
| Alternative 4 | |
|---|---|
| Accuracy | 59.5% |
| Cost | 7376 |
| Alternative 5 | |
|---|---|
| Accuracy | 40.9% |
| Cost | 1752 |
| Alternative 6 | |
|---|---|
| Accuracy | 27.1% |
| Cost | 1052 |
| Alternative 7 | |
|---|---|
| Accuracy | 26.5% |
| Cost | 64 |
herbie shell --seed 2023144
(FPCore (J K U)
:name "Maksimov and Kolovsky, Equation (3)"
:precision binary64
(* (* (* -2.0 J) (cos (/ K 2.0))) (sqrt (+ 1.0 (pow (/ U (* (* 2.0 J) (cos (/ K 2.0)))) 2.0)))))