
(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 11 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
(let* ((t_1 (* (sqrt 2.0) (PI))))
(*
(/ (/ (fma (* v v) -5.0 1.0) t) (fma (* (- v) v) t_1 t_1))
(sqrt (pow (fma (* v v) -3.0 1.0) -1.0)))))\begin{array}{l}
\\
\begin{array}{l}
t_1 := \sqrt{2} \cdot \mathsf{PI}\left(\right)\\
\frac{\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{t}}{\mathsf{fma}\left(\left(-v\right) \cdot v, t\_1, t\_1\right)} \cdot \sqrt{{\left(\mathsf{fma}\left(v \cdot v, -3, 1\right)\right)}^{-1}}
\end{array}
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lower-sqrt.f64N/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6499.2
Applied rewrites99.2%
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-*.f6499.2
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites99.5%
Taylor expanded in v around 0
associate-*r*N/A
mul-1-negN/A
lower-fma.f64N/A
lower-neg.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-PI.f6499.5
Applied rewrites99.5%
Final simplification99.5%
(FPCore (v t) :precision binary64 (* (/ (/ (fma (* v v) -5.0 1.0) t) (* (* (sqrt 2.0) (PI)) (- 1.0 (* v v)))) (sqrt (pow (fma (* v v) -3.0 1.0) -1.0))))
\begin{array}{l}
\\
\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)} \cdot \sqrt{{\left(\mathsf{fma}\left(v \cdot v, -3, 1\right)\right)}^{-1}}
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lower-sqrt.f64N/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6499.2
Applied rewrites99.2%
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-*.f6499.2
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites99.5%
(FPCore (v t) :precision binary64 (/ (fma (* v v) -5.0 1.0) (* (* (sqrt (fma -3.0 (* v v) 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(\sqrt{\mathsf{fma}\left(-3, v \cdot v, 1\right)} \cdot \left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lower-sqrt.f64N/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6499.2
Applied rewrites99.2%
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-*.f6499.2
Applied rewrites99.2%
(FPCore (v t) :precision binary64 (/ (fma -5.0 (* v v) 1.0) (* (- 1.0 (* v v)) (* (sqrt (* (fma -3.0 (* v v) 1.0) 2.0)) (* (PI) t)))))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(-5, v \cdot v, 1\right)}{\left(1 - v \cdot v\right) \cdot \left(\sqrt{\mathsf{fma}\left(-3, v \cdot v, 1\right) \cdot 2} \cdot \left(\mathsf{PI}\left(\right) \cdot t\right)\right)}
\end{array}
Initial program 99.1%
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.2
lift-*.f64N/A
Applied rewrites99.2%
(FPCore (v t) :precision binary64 (/ (- 1.0 (* 5.0 (* v v))) (* (* (* (PI) t) (sqrt (fma -6.0 (* v v) 2.0))) (- 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{\mathsf{fma}\left(-6, v \cdot v, 2\right)}\right) \cdot \left(1 - v \cdot v\right)}
\end{array}
Initial program 99.1%
Taylor expanded in v around 0
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.1
Applied rewrites99.1%
(FPCore (v t) :precision binary64 (/ (fma (* v v) -5.0 1.0) (* (* t (PI)) (* (sqrt (fma (* v v) -6.0 2.0)) (- 1.0 (* v v))))))
\begin{array}{l}
\\
\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \left(\sqrt{\mathsf{fma}\left(v \cdot v, -6, 2\right)} \cdot \left(1 - v \cdot v\right)\right)}
\end{array}
Initial program 99.1%
Taylor expanded in v around 0
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f6499.1
Applied rewrites99.1%
lift--.f64N/A
lift-*.f64N/A
lift-*.f64N/A
pow2N/A
metadata-evalN/A
fp-cancel-sign-sub-invN/A
*-commutativeN/A
pow2N/A
lift-*.f64N/A
+-commutativeN/A
lift-fma.f6499.2
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
lower-*.f64N/A
Applied rewrites99.1%
(FPCore (v t) :precision binary64 (* (/ (/ (fma (* v v) -5.0 1.0) t) (* (* (sqrt 2.0) (PI)) (- 1.0 (* v v)))) 1.0))
\begin{array}{l}
\\
\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)} \cdot 1
\end{array}
Initial program 99.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lower-sqrt.f64N/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6499.2
Applied rewrites99.2%
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-*.f6499.2
Applied rewrites99.2%
Taylor expanded in t around 0
Applied rewrites99.5%
Taylor expanded in v around 0
Applied rewrites97.6%
(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.1%
Taylor expanded in t around 0
*-commutativeN/A
lower-*.f64N/A
pow2N/A
lower-sqrt.f64N/A
pow2N/A
fp-cancel-sub-sign-invN/A
metadata-evalN/A
+-commutativeN/A
lower-fma.f64N/A
pow2N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6499.2
Applied rewrites99.2%
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-*.f6499.2
Applied rewrites99.2%
Taylor expanded in v around 0
*-commutativeN/A
*-commutativeN/A
lift-sqrt.f64N/A
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f6497.3
Applied rewrites97.3%
(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.1%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6497.3
Applied rewrites97.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-*.f6497.3
Applied rewrites97.3%
(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.1%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6497.3
Applied rewrites97.3%
Taylor expanded in v around 0
Applied rewrites97.3%
(FPCore (v t) :precision binary64 (/ 1.0 (* (* t (PI)) (sqrt 2.0))))
\begin{array}{l}
\\
\frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{2}}
\end{array}
Initial program 99.1%
Taylor expanded in v around 0
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-sqrt.f64N/A
lift-PI.f6497.3
Applied rewrites97.3%
Taylor expanded in v around 0
Applied rewrites97.3%
lift-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
lift-sqrt.f64N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
lift-*.f64N/A
lift-PI.f64N/A
lower-*.f64N/A
lift-PI.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-PI.f64N/A
lift-sqrt.f6497.2
Applied rewrites97.2%
herbie shell --seed 2025040
(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)))))