
(FPCore (v t) :precision binary64 (/ (- 1.0 (* 5.0 (* v v))) (* (* (* (PI) t) (sqrt (* 2.0 (- 1.0 (* 3.0 (* v v)))))) (- 1.0 (* v v)))))
\begin{array}{l}
\\
\frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\left(\mathsf{PI}\left(\right) \cdot t\right) \cdot \sqrt{2 \cdot \left(1 - 3 \cdot \left(v \cdot v\right)\right)}\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (v t) :precision binary64 (/ (- 1.0 (* 5.0 (* v v))) (* (* (* (PI) t) (sqrt (* 2.0 (- 1.0 (* 3.0 (* v v)))))) (- 1.0 (* v v)))))
\begin{array}{l}
\\
\frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\left(\mathsf{PI}\left(\right) \cdot t\right) \cdot \sqrt{2 \cdot \left(1 - 3 \cdot \left(v \cdot v\right)\right)}\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
(FPCore (v t) :precision binary64 (* (/ (fma -5.0 (* v v) 1.0) t) (pow (* (* (PI) (- 1.0 (* v v))) (sqrt (fma -6.0 (* v v) 2.0))) -1.0)))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{t} \cdot {\left(\left(\mathsf{PI}\left(\right) \cdot \left(1 - v \cdot v\right)\right) \cdot \sqrt{\mathsf{fma}\left(-6, v \cdot v, 2\right)}\right)}^{-1}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-rgt-identityN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
times-fracN/A
Applied rewrites99.5%
Final simplification99.5%
(FPCore (v t) :precision binary64 (* (/ (fma -5.0 (* v v) 1.0) t) (pow (* (PI) (sqrt 2.0)) -1.0)))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{t} \cdot {\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}^{-1}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-rgt-identityN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
times-fracN/A
Applied rewrites99.5%
Taylor expanded in v around 0
lower-PI.f6498.6
Applied rewrites98.6%
Taylor expanded in v around 0
lower-sqrt.f6498.6
Applied rewrites98.6%
Final simplification98.6%
(FPCore (v t) :precision binary64 (pow (* (* (sqrt 2.0) (PI)) t) -1.0))
\begin{array}{l}
\\
{\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1}
\end{array}
Initial program 99.4%
Taylor expanded in v around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-PI.f6498.5
Applied rewrites98.5%
Final simplification98.5%
(FPCore (v t) :precision binary64 (pow (* (* (PI) t) (sqrt 2.0)) -1.0))
\begin{array}{l}
\\
{\left(\left(\mathsf{PI}\left(\right) \cdot t\right) \cdot \sqrt{2}\right)}^{-1}
\end{array}
Initial program 99.4%
Taylor expanded in v around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lower-PI.f6498.5
Applied rewrites98.5%
Applied rewrites98.5%
Final simplification98.5%
(FPCore (v t) :precision binary64 (/ (/ (fma -5.0 (* v v) 1.0) (* t (PI))) (* (- 1.0 (* v v)) (sqrt (fma -6.0 (* v v) 2.0)))))
\begin{array}{l}
\\
\frac{\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{t \cdot \mathsf{PI}\left(\right)}}{\left(1 - v \cdot v\right) \cdot \sqrt{\mathsf{fma}\left(-6, v \cdot v, 2\right)}}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
associate-/r*N/A
lower-/.f64N/A
Applied rewrites99.5%
(FPCore (v t) :precision binary64 (/ (fma -5.0 (* v v) 1.0) (* (* (* (- 1.0 (* v v)) (PI)) t) (sqrt (fma -6.0 (* v v) 2.0)))))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{\left(\left(\left(1 - v \cdot v\right) \cdot \mathsf{PI}\left(\right)\right) \cdot t\right) \cdot \sqrt{\mathsf{fma}\left(-6, v \cdot v, 2\right)}}
\end{array}
Initial program 99.4%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-*.f64N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
metadata-eval99.4
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-*.f64N/A
Applied rewrites99.5%
(FPCore (v t) :precision binary64 (/ (/ (fma -5.0 (* v v) 1.0) (* (PI) (sqrt (fma -6.0 (* v v) 2.0)))) t))
\begin{array}{l}
\\
\frac{\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{fma}\left(-6, v \cdot v, 2\right)}}}{t}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-rgt-identityN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
times-fracN/A
Applied rewrites99.5%
Taylor expanded in v around 0
lower-PI.f6498.6
Applied rewrites98.6%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
lower-/.f64N/A
Applied rewrites98.9%
(FPCore (v t) :precision binary64 (/ (/ (fma -5.0 (* v v) 1.0) t) (* (PI) (sqrt (fma -6.0 (* v v) 2.0)))))
\begin{array}{l}
\\
\frac{\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{t}}{\mathsf{PI}\left(\right) \cdot \sqrt{\mathsf{fma}\left(-6, v \cdot v, 2\right)}}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-rgt-identityN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
times-fracN/A
Applied rewrites99.5%
Taylor expanded in v around 0
lower-PI.f6498.6
Applied rewrites98.6%
lift-*.f64N/A
lift-/.f64N/A
un-div-invN/A
lower-/.f6498.6
Applied rewrites98.6%
(FPCore (v t) :precision binary64 (/ (sqrt 0.5) (* t (PI))))
\begin{array}{l}
\\
\frac{\sqrt{0.5}}{t \cdot \mathsf{PI}\left(\right)}
\end{array}
Initial program 99.4%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-rgt-identityN/A
lift-*.f64N/A
*-commutativeN/A
associate-*l*N/A
times-fracN/A
Applied rewrites99.5%
Taylor expanded in v around 0
associate-/r*N/A
lower-/.f64N/A
lower-/.f64N/A
lower-sqrt.f64N/A
lower-PI.f6498.0
Applied rewrites98.0%
Applied rewrites98.0%
herbie shell --seed 2024323
(FPCore (v t)
:name "Falkner and Boettcher, Equation (20:1,3)"
:precision binary64
(/ (- 1.0 (* 5.0 (* v v))) (* (* (* (PI) t) (sqrt (* 2.0 (- 1.0 (* 3.0 (* v v)))))) (- 1.0 (* v v)))))