Falkner and Boettcher, Equation (20:1,3)

Percentage Accurate: 99.3% → 98.7%
Time: 3.9s
Alternatives: 5
Speedup: N/A×

Specification

?
\[\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
 (/
  (- 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 5 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.3% accurate, 1.0× speedup?

\[\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
 (/
  (- 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}

Alternative 1: 98.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1}}{t} \end{array} \]
(FPCore (v t) :precision binary64 (/ (pow (* (sqrt 2.0) (PI)) -1.0) t))
\begin{array}{l}

\\
\frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1}}{t}
\end{array}
Derivation
  1. Initial program 99.3%

    \[\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)} \]
  2. Add Preprocessing
  3. Taylor expanded in v around 0

    \[\leadsto \color{blue}{\frac{1}{t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
  4. Step-by-step derivation
    1. inv-powN/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    2. lower-pow.f64N/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    3. *-commutativeN/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    4. lower-*.f64N/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    5. *-commutativeN/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    6. lower-*.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    7. lower-sqrt.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    8. lift-PI.f6499.4

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
  5. Applied rewrites99.4%

    \[\leadsto \color{blue}{{\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1}} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{\color{blue}{-1}} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    3. unpow-prod-downN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
    4. lower-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
    5. lift-PI.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    6. lift-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    7. lift-sqrt.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    8. *-commutativeN/A

      \[\leadsto {\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}^{-1} \cdot {t}^{-1} \]
    9. lower-pow.f64N/A

      \[\leadsto {\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}^{-1} \cdot {\color{blue}{t}}^{-1} \]
    10. *-commutativeN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    11. lift-sqrt.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    12. lift-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    13. lift-PI.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    14. lower-pow.f6499.5

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{\color{blue}{-1}} \]
  7. Applied rewrites99.5%

    \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{\color{blue}{-1}} \]
    2. inv-powN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
    3. lower-/.f6499.5

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
  9. Applied rewrites99.5%

    \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
  10. Step-by-step derivation
    1. lift-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{\frac{1}{t}} \]
    2. lift-/.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
    3. associate-*r/N/A

      \[\leadsto \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot 1}{\color{blue}{t}} \]
    4. lower-/.f64N/A

      \[\leadsto \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot 1}{\color{blue}{t}} \]
    5. lower-*.f6499.8

      \[\leadsto \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot 1}{t} \]
  11. Applied rewrites99.8%

    \[\leadsto \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot 1}{\color{blue}{t}} \]
  12. Final simplification99.8%

    \[\leadsto \frac{{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1}}{t} \]
  13. Add Preprocessing

Alternative 2: 98.4% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \end{array} \]
(FPCore (v t) :precision binary64 (* (/ 1.0 (* (sqrt 2.0) (PI))) (/ 1.0 t)))
\begin{array}{l}

\\
\frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t}
\end{array}
Derivation
  1. Initial program 99.3%

    \[\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)} \]
  2. Add Preprocessing
  3. Taylor expanded in v around 0

    \[\leadsto \color{blue}{\frac{1}{t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
  4. Step-by-step derivation
    1. inv-powN/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    2. lower-pow.f64N/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    3. *-commutativeN/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    4. lower-*.f64N/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    5. *-commutativeN/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    6. lower-*.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    7. lower-sqrt.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    8. lift-PI.f6499.4

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
  5. Applied rewrites99.4%

    \[\leadsto \color{blue}{{\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1}} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{\color{blue}{-1}} \]
    2. lift-*.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    3. unpow-prod-downN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
    4. lower-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
    5. lift-PI.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    6. lift-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    7. lift-sqrt.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    8. *-commutativeN/A

      \[\leadsto {\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}^{-1} \cdot {t}^{-1} \]
    9. lower-pow.f64N/A

      \[\leadsto {\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}^{-1} \cdot {\color{blue}{t}}^{-1} \]
    10. *-commutativeN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    11. lift-sqrt.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    12. lift-*.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    13. lift-PI.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{-1} \]
    14. lower-pow.f6499.5

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{\color{blue}{-1}} \]
  7. Applied rewrites99.5%

    \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \color{blue}{{t}^{-1}} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot {t}^{\color{blue}{-1}} \]
    2. inv-powN/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
    3. lower-/.f6499.5

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
  9. Applied rewrites99.5%

    \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{1}{\color{blue}{t}} \]
  10. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right)}^{-1} \cdot \frac{\color{blue}{1}}{t} \]
    2. unpow-1N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1}}{t} \]
    3. lift-PI.f64N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    4. lift-*.f64N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    5. lift-sqrt.f64N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    6. *-commutativeN/A

      \[\leadsto \frac{1}{\mathsf{PI}\left(\right) \cdot \sqrt{2}} \cdot \frac{1}{t} \]
    7. lower-/.f64N/A

      \[\leadsto \frac{1}{\mathsf{PI}\left(\right) \cdot \sqrt{2}} \cdot \frac{\color{blue}{1}}{t} \]
    8. *-commutativeN/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    9. lift-sqrt.f64N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    10. lift-*.f64N/A

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
    11. lift-PI.f6499.5

      \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{1}{t} \]
  11. Applied rewrites99.5%

    \[\leadsto \frac{1}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \cdot \frac{\color{blue}{1}}{t} \]
  12. Add Preprocessing

Alternative 3: 98.4% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{1}{t}}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \end{array} \]
(FPCore (v t) :precision binary64 (/ (/ 1.0 t) (* (sqrt 2.0) (PI))))
\begin{array}{l}

\\
\frac{\frac{1}{t}}{\sqrt{2} \cdot \mathsf{PI}\left(\right)}
\end{array}
Derivation
  1. Initial program 99.3%

    \[\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)} \]
  2. Add Preprocessing
  3. Taylor expanded in v around 0

    \[\leadsto \color{blue}{\frac{1}{t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
  4. Step-by-step derivation
    1. inv-powN/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    2. lower-pow.f64N/A

      \[\leadsto {\left(t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)\right)}^{\color{blue}{-1}} \]
    3. *-commutativeN/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    4. lower-*.f64N/A

      \[\leadsto {\left(\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t\right)}^{-1} \]
    5. *-commutativeN/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    6. lower-*.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    7. lower-sqrt.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
    8. lift-PI.f6499.4

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1} \]
  5. Applied rewrites99.4%

    \[\leadsto \color{blue}{{\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{-1}} \]
  6. Step-by-step derivation
    1. lift-pow.f64N/A

      \[\leadsto {\left(\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t\right)}^{\color{blue}{-1}} \]
    2. unpow-1N/A

      \[\leadsto \frac{1}{\color{blue}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t}} \]
    3. lift-*.f64N/A

      \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{t}} \]
    4. lift-PI.f64N/A

      \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    5. lift-*.f64N/A

      \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    6. lift-sqrt.f64N/A

      \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    7. *-commutativeN/A

      \[\leadsto \frac{1}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot t} \]
    8. *-commutativeN/A

      \[\leadsto \frac{1}{t \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
    9. associate-/r*N/A

      \[\leadsto \frac{\frac{1}{t}}{\color{blue}{\mathsf{PI}\left(\right) \cdot \sqrt{2}}} \]
    10. lower-/.f64N/A

      \[\leadsto \frac{\frac{1}{t}}{\color{blue}{\mathsf{PI}\left(\right) \cdot \sqrt{2}}} \]
    11. lower-/.f64N/A

      \[\leadsto \frac{\frac{1}{t}}{\color{blue}{\mathsf{PI}\left(\right)} \cdot \sqrt{2}} \]
    12. *-commutativeN/A

      \[\leadsto \frac{\frac{1}{t}}{\sqrt{2} \cdot \color{blue}{\mathsf{PI}\left(\right)}} \]
    13. lift-sqrt.f64N/A

      \[\leadsto \frac{\frac{1}{t}}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \]
    14. lift-*.f64N/A

      \[\leadsto \frac{\frac{1}{t}}{\sqrt{2} \cdot \color{blue}{\mathsf{PI}\left(\right)}} \]
    15. lift-PI.f6499.5

      \[\leadsto \frac{\frac{1}{t}}{\sqrt{2} \cdot \mathsf{PI}\left(\right)} \]
  7. Applied rewrites99.5%

    \[\leadsto \frac{\frac{1}{t}}{\color{blue}{\sqrt{2} \cdot \mathsf{PI}\left(\right)}} \]
  8. Add Preprocessing

Alternative 4: 98.3% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \end{array} \]
(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}
Derivation
  1. Initial program 99.3%

    \[\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)} \]
  2. Add Preprocessing
  3. Taylor expanded in v around 0

    \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\color{blue}{t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
  4. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot \color{blue}{t}} \]
    2. lower-*.f64N/A

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot \color{blue}{t}} \]
    3. *-commutativeN/A

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    4. lower-*.f64N/A

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    5. lower-sqrt.f64N/A

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    6. lift-PI.f6499.4

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
  5. Applied rewrites99.4%

    \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\color{blue}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t}} \]
  6. Taylor expanded in v around 0

    \[\leadsto \frac{\color{blue}{1}}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
  7. Step-by-step derivation
    1. Applied rewrites99.4%

      \[\leadsto \frac{\color{blue}{1}}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    2. Add Preprocessing

    Alternative 5: 98.2% accurate, 2.4× speedup?

    \[\begin{array}{l} \\ \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{2}} \end{array} \]
    (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}
    
    Derivation
    1. Initial program 99.3%

      \[\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)} \]
    2. Add Preprocessing
    3. Taylor expanded in v around 0

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\color{blue}{t \cdot \left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right)}} \]
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot \color{blue}{t}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\mathsf{PI}\left(\right) \cdot \sqrt{2}\right) \cdot \color{blue}{t}} \]
      3. *-commutativeN/A

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
      4. lower-*.f64N/A

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
      5. lower-sqrt.f64N/A

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
      6. lift-PI.f6499.4

        \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    5. Applied rewrites99.4%

      \[\leadsto \frac{1 - 5 \cdot \left(v \cdot v\right)}{\color{blue}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t}} \]
    6. Taylor expanded in v around 0

      \[\leadsto \frac{\color{blue}{1}}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
    7. Step-by-step derivation
      1. Applied rewrites99.4%

        \[\leadsto \frac{\color{blue}{1}}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
      2. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{t}} \]
        2. lift-PI.f64N/A

          \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
        3. lift-*.f64N/A

          \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
        4. lift-sqrt.f64N/A

          \[\leadsto \frac{1}{\left(\sqrt{2} \cdot \mathsf{PI}\left(\right)\right) \cdot t} \]
        5. associate-*l*N/A

          \[\leadsto \frac{1}{\sqrt{2} \cdot \color{blue}{\left(\mathsf{PI}\left(\right) \cdot t\right)}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{1}{\sqrt{2} \cdot \left(t \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)} \]
        7. *-commutativeN/A

          \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{2}}} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{\color{blue}{2}}} \]
        9. lift-PI.f64N/A

          \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{2}} \]
        10. lift-sqrt.f64N/A

          \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \sqrt{2}} \]
        11. lift-*.f6499.3

          \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{2}}} \]
      3. Applied rewrites99.3%

        \[\leadsto \frac{1}{\left(t \cdot \mathsf{PI}\left(\right)\right) \cdot \color{blue}{\sqrt{2}}} \]
      4. Add Preprocessing

      Reproduce

      ?
      herbie shell --seed 2025037 
      (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)))))