NMSE Section 6.1 mentioned, B

Percentage Accurate: 78.0% → 99.6%
Time: 8.8s
Alternatives: 8
Speedup: 2.4×

Specification

?
\[\begin{array}{l} \\ \left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \end{array} \]
(FPCore (a b)
 :precision binary64
 (* (* (/ (PI) 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))
\begin{array}{l}

\\
\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\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 8 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: 78.0% accurate, 1.0× speedup?

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

\\
\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right)
\end{array}

Alternative 1: 99.6% accurate, 1.5× speedup?

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

\\
\frac{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}{\left(b \cdot a\right) \cdot 2}
\end{array}
Derivation
  1. Initial program 82.0%

    \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

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

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

      \[\leadsto \left(\color{blue}{\frac{\mathsf{PI}\left(\right)}{2}} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
    4. associate-*l/N/A

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

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

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

      \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \left(\frac{1}{a} - \color{blue}{\frac{1}{b}}\right) \]
    8. frac-subN/A

      \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \color{blue}{\frac{1 \cdot b - a \cdot 1}{a \cdot b}} \]
    9. frac-timesN/A

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

      \[\leadsto \color{blue}{\frac{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)}{2 \cdot \left(a \cdot b\right)}} \]
  4. Applied rewrites90.2%

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

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    2. lift-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)}} \cdot \left(b - a\right)}{2 \cdot \left(a \cdot b\right)} \]
    3. associate-*l/N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\left(a + b\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    4. lift-*.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(a + b\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    5. lift-+.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    6. +-commutativeN/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    7. lift--.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    8. difference-of-squaresN/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{b \cdot b - a \cdot a}}}{2 \cdot \left(a \cdot b\right)} \]
    9. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{b \cdot b - a \cdot a}}}{2 \cdot \left(a \cdot b\right)} \]
    10. *-commutativeN/A

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

      \[\leadsto \frac{\frac{\color{blue}{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}}{b \cdot b - a \cdot a}}{2 \cdot \left(a \cdot b\right)} \]
    12. difference-of-squaresN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b + a\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    14. lift-+.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    15. lift--.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    16. *-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    17. lower-*.f6490.3

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    18. lift-+.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    19. +-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    20. lower-+.f6490.3

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
  6. Applied rewrites90.3%

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

      \[\leadsto \frac{\color{blue}{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    2. lift-*.f64N/A

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

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    4. times-fracN/A

      \[\leadsto \frac{\color{blue}{\frac{b - a}{b - a} \cdot \frac{\mathsf{PI}\left(\right)}{b + a}}}{2 \cdot \left(a \cdot b\right)} \]
    5. clear-numN/A

      \[\leadsto \frac{\frac{b - a}{b - a} \cdot \color{blue}{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    6. un-div-invN/A

      \[\leadsto \frac{\color{blue}{\frac{\frac{b - a}{b - a}}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    7. *-inversesN/A

      \[\leadsto \frac{\frac{\color{blue}{1}}{\frac{b + a}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    8. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    9. lower-/.f6499.7

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

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{b + a}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    11. +-commutativeN/A

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{a + b}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    12. lower-+.f6499.7

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{a + b}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
  8. Applied rewrites99.7%

    \[\leadsto \frac{\color{blue}{\frac{1}{\frac{a + b}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
  9. Final simplification99.7%

    \[\leadsto \frac{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}{\left(b \cdot a\right) \cdot 2} \]
  10. Add Preprocessing

Alternative 2: 99.6% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \frac{\frac{0.5}{b \cdot a} \cdot \mathsf{PI}\left(\right)}{b + a} \end{array} \]
(FPCore (a b) :precision binary64 (/ (* (/ 0.5 (* b a)) (PI)) (+ b a)))
\begin{array}{l}

\\
\frac{\frac{0.5}{b \cdot a} \cdot \mathsf{PI}\left(\right)}{b + a}
\end{array}
Derivation
  1. Initial program 82.0%

    \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-*.f64N/A

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

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

      \[\leadsto \left(\color{blue}{\frac{\mathsf{PI}\left(\right)}{2}} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
    4. associate-*l/N/A

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

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

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

      \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \left(\frac{1}{a} - \color{blue}{\frac{1}{b}}\right) \]
    8. frac-subN/A

      \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \color{blue}{\frac{1 \cdot b - a \cdot 1}{a \cdot b}} \]
    9. frac-timesN/A

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

      \[\leadsto \color{blue}{\frac{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)}{2 \cdot \left(a \cdot b\right)}} \]
  4. Applied rewrites90.2%

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

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    2. lift-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)}} \cdot \left(b - a\right)}{2 \cdot \left(a \cdot b\right)} \]
    3. associate-*l/N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\left(a + b\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    4. lift-*.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(a + b\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    5. lift-+.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    6. +-commutativeN/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{\left(b + a\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    7. lift--.f64N/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\left(b + a\right) \cdot \color{blue}{\left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    8. difference-of-squaresN/A

      \[\leadsto \frac{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{\color{blue}{b \cdot b - a \cdot a}}}{2 \cdot \left(a \cdot b\right)} \]
    9. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(b - a\right)}{b \cdot b - a \cdot a}}}{2 \cdot \left(a \cdot b\right)} \]
    10. *-commutativeN/A

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

      \[\leadsto \frac{\frac{\color{blue}{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}}{b \cdot b - a \cdot a}}{2 \cdot \left(a \cdot b\right)} \]
    12. difference-of-squaresN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b + a\right) \cdot \left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    13. +-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    14. lift-+.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(a + b\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
    15. lift--.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \color{blue}{\left(b - a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    16. *-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    17. lower-*.f6490.3

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    18. lift-+.f64N/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(a + b\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    19. +-commutativeN/A

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    20. lower-+.f6490.3

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \color{blue}{\left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
  6. Applied rewrites90.3%

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

      \[\leadsto \frac{\color{blue}{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\left(b - a\right) \cdot \left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    2. lift-*.f64N/A

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

      \[\leadsto \frac{\frac{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}{\color{blue}{\left(b - a\right) \cdot \left(b + a\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    4. times-fracN/A

      \[\leadsto \frac{\color{blue}{\frac{b - a}{b - a} \cdot \frac{\mathsf{PI}\left(\right)}{b + a}}}{2 \cdot \left(a \cdot b\right)} \]
    5. clear-numN/A

      \[\leadsto \frac{\frac{b - a}{b - a} \cdot \color{blue}{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    6. un-div-invN/A

      \[\leadsto \frac{\color{blue}{\frac{\frac{b - a}{b - a}}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    7. *-inversesN/A

      \[\leadsto \frac{\frac{\color{blue}{1}}{\frac{b + a}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    8. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{1}{\frac{b + a}{\mathsf{PI}\left(\right)}}}}{2 \cdot \left(a \cdot b\right)} \]
    9. lower-/.f6499.7

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

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{b + a}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    11. +-commutativeN/A

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{a + b}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
    12. lower-+.f6499.7

      \[\leadsto \frac{\frac{1}{\frac{\color{blue}{a + b}}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)} \]
  8. Applied rewrites99.7%

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

      \[\leadsto \color{blue}{\frac{\frac{1}{\frac{a + b}{\mathsf{PI}\left(\right)}}}{2 \cdot \left(a \cdot b\right)}} \]
    2. div-invN/A

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

      \[\leadsto \color{blue}{\frac{1}{\frac{a + b}{\mathsf{PI}\left(\right)}}} \cdot \frac{1}{2 \cdot \left(a \cdot b\right)} \]
    4. associate-*l/N/A

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

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\color{blue}{\frac{a + b}{\mathsf{PI}\left(\right)}}} \]
    6. clear-numN/A

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\color{blue}{\frac{1}{\frac{\mathsf{PI}\left(\right)}{a + b}}}} \]
    7. div-invN/A

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\color{blue}{1 \cdot \frac{1}{\frac{\mathsf{PI}\left(\right)}{a + b}}}} \]
    8. *-inversesN/A

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\color{blue}{\frac{b - a}{b - a}} \cdot \frac{1}{\frac{\mathsf{PI}\left(\right)}{a + b}}} \]
    9. clear-numN/A

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\frac{b - a}{b - a} \cdot \color{blue}{\frac{a + b}{\mathsf{PI}\left(\right)}}} \]
    10. times-fracN/A

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

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

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

      \[\leadsto \frac{1 \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}}{\frac{\left(b - a\right) \cdot \left(b + a\right)}{\left(b - a\right) \cdot \color{blue}{\mathsf{PI}\left(\right)}}} \]
    14. associate-*l/N/A

      \[\leadsto \color{blue}{\frac{1}{\frac{\left(b - a\right) \cdot \left(b + a\right)}{\left(b - a\right) \cdot \mathsf{PI}\left(\right)}} \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}} \]
  10. Applied rewrites99.6%

    \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \frac{0.5}{b \cdot a}}{b + a}} \]
  11. Final simplification99.6%

    \[\leadsto \frac{\frac{0.5}{b \cdot a} \cdot \mathsf{PI}\left(\right)}{b + a} \]
  12. Add Preprocessing

Alternative 3: 75.1% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -0.105:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot b} \cdot 0.5\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (<= a -0.105)
   (* (/ 0.5 (* (* b a) a)) (PI))
   (* (/ (PI) (* (* b a) b)) 0.5)))
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.105:\\
\;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot b} \cdot 0.5\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -0.104999999999999996

    1. Initial program 87.0%

      \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

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

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
      7. unpow2N/A

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot \frac{1}{2} \]
      8. lower-*.f6487.3

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot 0.5 \]
    5. Applied rewrites87.3%

      \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{b \cdot \left(a \cdot a\right)} \cdot 0.5} \]
    6. Step-by-step derivation
      1. Applied rewrites87.3%

        \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(a \cdot a\right) \cdot b}} \]
      2. Step-by-step derivation
        1. Applied rewrites95.1%

          \[\leadsto \mathsf{PI}\left(\right) \cdot \frac{0.5}{\left(a \cdot b\right) \cdot \color{blue}{a}} \]

        if -0.104999999999999996 < a

        1. Initial program 80.5%

          \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f64N/A

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

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

            \[\leadsto \left(\color{blue}{\frac{\mathsf{PI}\left(\right)}{2}} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
          4. associate-*l/N/A

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \left(\frac{1}{a} - \color{blue}{\frac{1}{b}}\right) \]
          8. frac-subN/A

            \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \color{blue}{\frac{1 \cdot b - a \cdot 1}{a \cdot b}} \]
          9. frac-timesN/A

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

            \[\leadsto \color{blue}{\frac{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)}{2 \cdot \left(a \cdot b\right)}} \]
        4. Applied rewrites90.2%

          \[\leadsto \color{blue}{\frac{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}{2 \cdot \left(a \cdot b\right)}} \]
        5. Taylor expanded in b around inf

          \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}}} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

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

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{a \cdot {b}^{2}} \cdot \frac{1}{2} \]
          5. unpow2N/A

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(a \cdot b\right) \cdot b}} \cdot \frac{1}{2} \]
          7. lower-*.f64N/A

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot a\right)} \cdot b} \cdot \frac{1}{2} \]
          9. lower-*.f6471.2

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot a\right)} \cdot b} \cdot 0.5 \]
        7. Applied rewrites71.2%

          \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot b} \cdot 0.5} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification76.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -0.105:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot b} \cdot 0.5\\ \end{array} \]
      5. Add Preprocessing

      Alternative 4: 74.8% accurate, 2.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right)\\ \end{array} \end{array} \]
      (FPCore (a b)
       :precision binary64
       (if (<= a -1.12e-39)
         (* (/ 0.5 (* (* b a) a)) (PI))
         (* (/ 0.5 (* (* b a) b)) (PI))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\
      \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if a < -1.12e-39

        1. Initial program 88.0%

          \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
        2. Add Preprocessing
        3. Taylor expanded in b around 0

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

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

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

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

            \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
          5. *-commutativeN/A

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
          7. unpow2N/A

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot \frac{1}{2} \]
          8. lower-*.f6483.8

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot 0.5 \]
        5. Applied rewrites83.8%

          \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{b \cdot \left(a \cdot a\right)} \cdot 0.5} \]
        6. Step-by-step derivation
          1. Applied rewrites83.8%

            \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(a \cdot a\right) \cdot b}} \]
          2. Step-by-step derivation
            1. Applied rewrites91.0%

              \[\leadsto \mathsf{PI}\left(\right) \cdot \frac{0.5}{\left(a \cdot b\right) \cdot \color{blue}{a}} \]

            if -1.12e-39 < a

            1. Initial program 80.1%

              \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

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

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

                \[\leadsto \left(\color{blue}{\frac{\mathsf{PI}\left(\right)}{2}} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
              4. associate-*l/N/A

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

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

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

                \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \left(\frac{1}{a} - \color{blue}{\frac{1}{b}}\right) \]
              8. frac-subN/A

                \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \color{blue}{\frac{1 \cdot b - a \cdot 1}{a \cdot b}} \]
              9. frac-timesN/A

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

                \[\leadsto \color{blue}{\frac{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)}{2 \cdot \left(a \cdot b\right)}} \]
            4. Applied rewrites89.9%

              \[\leadsto \color{blue}{\frac{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}{2 \cdot \left(a \cdot b\right)}} \]
            5. Taylor expanded in b around inf

              \[\leadsto \color{blue}{\frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

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

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

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

                \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{a \cdot {b}^{2}} \cdot \frac{1}{2} \]
              5. unpow2N/A

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

                \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(a \cdot b\right) \cdot b}} \cdot \frac{1}{2} \]
              7. lower-*.f64N/A

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

                \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot a\right)} \cdot b} \cdot \frac{1}{2} \]
              9. lower-*.f6471.4

                \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot a\right)} \cdot b} \cdot 0.5 \]
            7. Applied rewrites71.4%

              \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot b} \cdot 0.5} \]
            8. Step-by-step derivation
              1. Applied rewrites71.4%

                \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(b \cdot a\right) \cdot b}} \]
            9. Recombined 2 regimes into one program.
            10. Final simplification76.3%

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right)\\ \end{array} \]
            11. Add Preprocessing

            Alternative 5: 68.8% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \end{array} \end{array} \]
            (FPCore (a b)
             :precision binary64
             (if (<= a -1.12e-39)
               (* (/ 0.5 (* (* b a) a)) (PI))
               (* (/ (PI) (* (* b b) a)) 0.5)))
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\
            \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if a < -1.12e-39

              1. Initial program 88.0%

                \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
              2. Add Preprocessing
              3. Taylor expanded in b around 0

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

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

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

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

                  \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
                5. *-commutativeN/A

                  \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                6. lower-*.f64N/A

                  \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                7. unpow2N/A

                  \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot \frac{1}{2} \]
                8. lower-*.f6483.8

                  \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot 0.5 \]
              5. Applied rewrites83.8%

                \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{b \cdot \left(a \cdot a\right)} \cdot 0.5} \]
              6. Step-by-step derivation
                1. Applied rewrites83.8%

                  \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(a \cdot a\right) \cdot b}} \]
                2. Step-by-step derivation
                  1. Applied rewrites91.0%

                    \[\leadsto \mathsf{PI}\left(\right) \cdot \frac{0.5}{\left(a \cdot b\right) \cdot \color{blue}{a}} \]

                  if -1.12e-39 < a

                  1. Initial program 80.1%

                    \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in b around inf

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

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

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

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

                      \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{a \cdot {b}^{2}} \cdot \frac{1}{2} \]
                    5. *-commutativeN/A

                      \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{{b}^{2} \cdot a}} \cdot \frac{1}{2} \]
                    6. lower-*.f64N/A

                      \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{{b}^{2} \cdot a}} \cdot \frac{1}{2} \]
                    7. unpow2N/A

                      \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot b\right)} \cdot a} \cdot \frac{1}{2} \]
                    8. lower-*.f6465.6

                      \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(b \cdot b\right)} \cdot a} \cdot 0.5 \]
                  5. Applied rewrites65.6%

                    \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5} \]
                3. Recombined 2 regimes into one program.
                4. Final simplification72.0%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.12 \cdot 10^{-39}:\\ \;\;\;\;\frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \end{array} \]
                5. Add Preprocessing

                Alternative 6: 99.1% accurate, 2.4× speedup?

                \[\begin{array}{l} \\ \frac{0.5 \cdot \mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot \left(b + a\right)} \end{array} \]
                (FPCore (a b) :precision binary64 (/ (* 0.5 (PI)) (* (* b a) (+ b a))))
                \begin{array}{l}
                
                \\
                \frac{0.5 \cdot \mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot \left(b + a\right)}
                \end{array}
                
                Derivation
                1. Initial program 82.0%

                  \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift-*.f64N/A

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

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

                    \[\leadsto \left(\color{blue}{\frac{\mathsf{PI}\left(\right)}{2}} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
                  4. associate-*l/N/A

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

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

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

                    \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \left(\frac{1}{a} - \color{blue}{\frac{1}{b}}\right) \]
                  8. frac-subN/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}}{2} \cdot \color{blue}{\frac{1 \cdot b - a \cdot 1}{a \cdot b}} \]
                  9. frac-timesN/A

                    \[\leadsto \color{blue}{\frac{\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)}{2 \cdot \left(a \cdot b\right)}} \]
                  10. div-invN/A

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

                    \[\leadsto \color{blue}{\left(\left(\mathsf{PI}\left(\right) \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(1 \cdot b - a \cdot 1\right)\right) \cdot \frac{1}{2 \cdot \left(a \cdot b\right)}} \]
                4. Applied rewrites90.2%

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

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

                    \[\leadsto \left(\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)\right) \cdot \color{blue}{\frac{1}{2 \cdot \left(a \cdot b\right)}} \]
                  3. div-invN/A

                    \[\leadsto \color{blue}{\frac{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}{2 \cdot \left(a \cdot b\right)}} \]
                  4. lift-*.f64N/A

                    \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \left(b - a\right)}}{2 \cdot \left(a \cdot b\right)} \]
                  5. associate-/l*N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)} \cdot \frac{b - a}{2 \cdot \left(a \cdot b\right)}} \]
                  6. lift-/.f64N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(b - a\right)}} \cdot \frac{b - a}{2 \cdot \left(a \cdot b\right)} \]
                  7. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{\left(a + b\right) \cdot \left(b - a\right)}} \cdot \frac{b - a}{2 \cdot \left(a \cdot b\right)} \]
                  8. associate-/r*N/A

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

                    \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{a + b}}}{b - a} \cdot \frac{b - a}{2 \cdot \left(a \cdot b\right)} \]
                  10. associate-*l/N/A

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

                    \[\leadsto \color{blue}{\frac{\frac{\mathsf{PI}\left(\right)}{a + b} \cdot \frac{b - a}{2 \cdot \left(a \cdot b\right)}}{b - a}} \]
                6. Applied rewrites99.6%

                  \[\leadsto \color{blue}{\frac{\frac{\mathsf{PI}\left(\right)}{b + a} \cdot \left(\frac{\frac{0.5}{b}}{a} \cdot \left(b - a\right)\right)}{b - a}} \]
                7. Step-by-step derivation
                  1. lift-/.f64N/A

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

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

                    \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right)}{b + a}} \cdot \left(\frac{\frac{\frac{1}{2}}{b}}{a} \cdot \left(b - a\right)\right)}{b - a} \]
                  4. associate-*l/N/A

                    \[\leadsto \frac{\color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(\frac{\frac{\frac{1}{2}}{b}}{a} \cdot \left(b - a\right)\right)}{b + a}}}{b - a} \]
                  5. associate-/l/N/A

                    \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right) \cdot \left(\frac{\frac{\frac{1}{2}}{b}}{a} \cdot \left(b - a\right)\right)}{\left(b - a\right) \cdot \left(b + a\right)}} \]
                  6. lift-*.f64N/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot \left(\frac{\frac{\frac{1}{2}}{b}}{a} \cdot \left(b - a\right)\right)}{\color{blue}{\left(b - a\right) \cdot \left(b + a\right)}} \]
                8. Applied rewrites99.4%

                  \[\leadsto \color{blue}{\frac{0.5 \cdot \mathsf{PI}\left(\right)}{\left(a + b\right) \cdot \left(a \cdot b\right)}} \]
                9. Final simplification99.4%

                  \[\leadsto \frac{0.5 \cdot \mathsf{PI}\left(\right)}{\left(b \cdot a\right) \cdot \left(b + a\right)} \]
                10. Add Preprocessing

                Alternative 7: 63.2% accurate, 2.6× speedup?

                \[\begin{array}{l} \\ \frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right) \end{array} \]
                (FPCore (a b) :precision binary64 (* (/ 0.5 (* (* b a) a)) (PI)))
                \begin{array}{l}
                
                \\
                \frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right)
                \end{array}
                
                Derivation
                1. Initial program 82.0%

                  \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
                2. Add Preprocessing
                3. Taylor expanded in b around 0

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

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

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

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

                    \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
                  5. *-commutativeN/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                  6. lower-*.f64N/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                  7. unpow2N/A

                    \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot \frac{1}{2} \]
                  8. lower-*.f6461.4

                    \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot 0.5 \]
                5. Applied rewrites61.4%

                  \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{b \cdot \left(a \cdot a\right)} \cdot 0.5} \]
                6. Step-by-step derivation
                  1. Applied rewrites61.4%

                    \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(a \cdot a\right) \cdot b}} \]
                  2. Step-by-step derivation
                    1. Applied rewrites66.1%

                      \[\leadsto \mathsf{PI}\left(\right) \cdot \frac{0.5}{\left(a \cdot b\right) \cdot \color{blue}{a}} \]
                    2. Final simplification66.1%

                      \[\leadsto \frac{0.5}{\left(b \cdot a\right) \cdot a} \cdot \mathsf{PI}\left(\right) \]
                    3. Add Preprocessing

                    Alternative 8: 57.5% accurate, 2.6× speedup?

                    \[\begin{array}{l} \\ \frac{0.5}{\left(a \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right) \end{array} \]
                    (FPCore (a b) :precision binary64 (* (/ 0.5 (* (* a a) b)) (PI)))
                    \begin{array}{l}
                    
                    \\
                    \frac{0.5}{\left(a \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right)
                    \end{array}
                    
                    Derivation
                    1. Initial program 82.0%

                      \[\left(\frac{\mathsf{PI}\left(\right)}{2} \cdot \frac{1}{b \cdot b - a \cdot a}\right) \cdot \left(\frac{1}{a} - \frac{1}{b}\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in b around 0

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

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

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

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

                        \[\leadsto \frac{\color{blue}{\mathsf{PI}\left(\right)}}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
                      5. *-commutativeN/A

                        \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                      6. lower-*.f64N/A

                        \[\leadsto \frac{\mathsf{PI}\left(\right)}{\color{blue}{b \cdot {a}^{2}}} \cdot \frac{1}{2} \]
                      7. unpow2N/A

                        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot \frac{1}{2} \]
                      8. lower-*.f6461.4

                        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \color{blue}{\left(a \cdot a\right)}} \cdot 0.5 \]
                    5. Applied rewrites61.4%

                      \[\leadsto \color{blue}{\frac{\mathsf{PI}\left(\right)}{b \cdot \left(a \cdot a\right)} \cdot 0.5} \]
                    6. Step-by-step derivation
                      1. Applied rewrites61.4%

                        \[\leadsto \mathsf{PI}\left(\right) \cdot \color{blue}{\frac{0.5}{\left(a \cdot a\right) \cdot b}} \]
                      2. Final simplification61.4%

                        \[\leadsto \frac{0.5}{\left(a \cdot a\right) \cdot b} \cdot \mathsf{PI}\left(\right) \]
                      3. Add Preprocessing

                      Reproduce

                      ?
                      herbie shell --seed 2024254 
                      (FPCore (a b)
                        :name "NMSE Section 6.1 mentioned, B"
                        :precision binary64
                        (* (* (/ (PI) 2.0) (/ 1.0 (- (* b b) (* a a)))) (- (/ 1.0 a) (/ 1.0 b))))