
(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 7 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 (* v v) -5.0 1.0) (PI)) (* (* t (- 1.0 (* v v))) (sqrt (fma (* v v) -6.0 2.0)))))
\begin{array}{l}
\\
\frac{\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\mathsf{PI}\left(\right)}}{\left(t \cdot \left(1 - v \cdot v\right)\right) \cdot \sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)}}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
Applied rewrites99.0%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites99.1%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f6499.1
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.1%
Applied rewrites99.5%
(FPCore (v t) :precision binary64 (/ (fma -5.0 (* v v) 1.0) (* (PI) (* t (* (- 1.0 (* v v)) (sqrt (fma (* v v) -6.0 2.0)))))))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{\mathsf{PI}\left(\right) \cdot \left(t \cdot \left(\left(1 - v \cdot v\right) \cdot \sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)}\right)\right)}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
Applied rewrites99.0%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites99.1%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
lower-*.f6499.1
lift-*.f64N/A
lift--.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites99.1%
(FPCore (v t) :precision binary64 (* 1.0 (/ (/ (fma (* v v) -5.0 1.0) t) (* (* (sqrt 2.0) (PI)) (- 1.0 (* v v))))))
\begin{array}{l}
\\
1 \cdot \frac{\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{t}}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
Applied rewrites99.0%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.0
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites99.1%
Taylor expanded in t around 0
Applied rewrites99.5%
Taylor expanded in v around 0
Applied rewrites98.8%
(FPCore (v t) :precision binary64 (/ (fma (* v v) -5.0 1.0) (* (* (* (sqrt 2.0) (PI)) t) (- 1.0 (* v v)))))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
Applied rewrites98.3%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6498.3
Applied rewrites98.3%
Taylor expanded in v around 0
*-commutativeN/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
pow2N/A
associate-*r*N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
Applied rewrites98.4%
(FPCore (v t) :precision binary64 (/ (fma (* v v) -5.0 1.0) (* (* (sqrt 2.0) (PI)) t)))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6498.4
Applied rewrites98.4%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6498.4
Applied rewrites98.4%
(FPCore (v t) :precision binary64 (/ 1.0 (* (* (sqrt 2.0) (PI)) t)))
\begin{array}{l}
\\
\frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6498.4
Applied rewrites98.4%
Taylor expanded in v around 0
Applied rewrites98.4%
(FPCore (v t) :precision binary64 (/ 1.0 (* (PI) (* (sqrt 2.0) t))))
\begin{array}{l}
\\
\frac{1}{\mathsf{PI}\left(\right) \cdot \left(\sqrt{2} \cdot t\right)}
\end{array}
Initial program 99.0%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6498.4
Applied rewrites98.4%
Taylor expanded in v around 0
Applied rewrites98.4%
lift-*.f64N/A
*-commutativeN/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lift-sqrt.f6498.3
Applied rewrites98.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
associate-*l*N/A
lower-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-*.f6498.3
Applied rewrites98.3%
herbie shell --seed 2025051
(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)))))