NMSE Section 6.1 mentioned, B

Percentage Accurate: 78.4% → 99.7%
Time: 7.0s
Alternatives: 9
Speedup: 2.0×

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 9 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.4% 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.7% accurate, 2.0× speedup?

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

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

    \[\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.3%

    \[\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 \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)}} \]
    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 \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)}} \]
    4. 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)} \]
    5. 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)} \]
    6. 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)} \]
    7. 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}} \]
  6. Applied rewrites86.0%

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

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

Alternative 2: 86.8% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b}}{2 \cdot \left(a \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{0.5 \cdot \mathsf{PI}\left(\right)}{b \cdot a}}{a}\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (or (<= b -4.5e+15) (not (<= b 3.1e+18)))
   (/ (/ (PI) b) (* 2.0 (* a b)))
   (/ (/ (* 0.5 (PI)) (* b a)) a)))
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b}}{2 \cdot \left(a \cdot b\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.5e15 or 3.1e18 < b

    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 rewrites92.8%

      \[\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 a around 0

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

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

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

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

    if -4.5e15 < b < 3.1e18

    1. Initial program 85.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 a around inf

      \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b}}{2 \cdot \left(a \cdot b\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{0.5 \cdot \mathsf{PI}\left(\right)}{b \cdot a}}{a}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 3: 80.6% accurate, 1.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot a} \cdot \frac{0.5}{a}\\ \end{array} \end{array} \]
      (FPCore (a b)
       :precision binary64
       (if (or (<= b -3.5e+15) (not (<= b 3.1e+18)))
         (* (/ (PI) (* (* b b) a)) 0.5)
         (* (/ (PI) (* b a)) (/ 0.5 a))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\
      \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\
      
      \mathbf{else}:\\
      \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot a} \cdot \frac{0.5}{a}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < -3.5e15 or 3.1e18 < b

        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 \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) \]
          3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\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. *-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-*.f6488.7

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

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

        if -3.5e15 < b < 3.1e18

        1. Initial program 85.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 a around inf

          \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot a} \cdot \frac{0.5}{a}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 4: 80.6% accurate, 1.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\frac{0.5 \cdot \mathsf{PI}\left(\right)}{b \cdot a}}{a}\\ \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 (<= b -4.5e+15)
             (* (/ (/ (PI) (* b b)) a) 0.5)
             (if (<= b 3.1e+18)
               (/ (/ (* 0.5 (PI)) (* b a)) a)
               (* (/ (PI) (* (* b b) a)) 0.5))))
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\
          \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\
          
          \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\
          \;\;\;\;\frac{\frac{0.5 \cdot \mathsf{PI}\left(\right)}{b \cdot a}}{a}\\
          
          \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 3 regimes
          2. if b < -4.5e15

            1. Initial program 83.8%

              \[\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 a around 0

              \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

            if -4.5e15 < b < 3.1e18

            1. Initial program 85.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 a around inf

              \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                if 3.1e18 < b

                1. Initial program 80.2%

                  \[\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 \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) \]
                  3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\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. *-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-*.f6490.8

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

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

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

              Alternative 5: 80.6% accurate, 1.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{a} \cdot 0.5}{b \cdot a}\\ \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 (<= b -4.5e+15)
                 (* (/ (/ (PI) (* b b)) a) 0.5)
                 (if (<= b 3.1e+18)
                   (/ (* (/ (PI) a) 0.5) (* b a))
                   (* (/ (PI) (* (* b b) a)) 0.5))))
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\
              \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\
              
              \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\
              \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{a} \cdot 0.5}{b \cdot a}\\
              
              \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 3 regimes
              2. if b < -4.5e15

                1. Initial program 83.8%

                  \[\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 a around 0

                  \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

                if -4.5e15 < b < 3.1e18

                1. Initial program 85.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 a around inf

                  \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

                  if 3.1e18 < b

                  1. Initial program 80.2%

                    \[\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 \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) \]
                    3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\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. *-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-*.f6490.8

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

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

                  \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{a} \cdot 0.5}{b \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \end{array} \]
                9. Add Preprocessing

                Alternative 6: 80.6% accurate, 1.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\ \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot a} \cdot \frac{0.5}{a}\\ \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 (<= b -4.5e+15)
                   (* (/ (/ (PI) (* b b)) a) 0.5)
                   (if (<= b 3.1e+18)
                     (* (/ (PI) (* b a)) (/ 0.5 a))
                     (* (/ (PI) (* (* b b) a)) 0.5))))
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;b \leq -4.5 \cdot 10^{+15}:\\
                \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{b \cdot b}}{a} \cdot 0.5\\
                
                \mathbf{elif}\;b \leq 3.1 \cdot 10^{+18}:\\
                \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot a} \cdot \frac{0.5}{a}\\
                
                \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 3 regimes
                2. if b < -4.5e15

                  1. Initial program 83.8%

                    \[\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 a around 0

                    \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

                  if -4.5e15 < b < 3.1e18

                  1. Initial program 85.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 a around inf

                    \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                      if 3.1e18 < b

                      1. Initial program 80.2%

                        \[\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 \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) \]
                        3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\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. *-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-*.f6490.8

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

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

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

                    Alternative 7: 80.4% accurate, 1.8× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot 0.5}{\left(b \cdot a\right) \cdot a}\\ \end{array} \end{array} \]
                    (FPCore (a b)
                     :precision binary64
                     (if (or (<= b -3.5e+15) (not (<= b 3.1e+18)))
                       (* (/ (PI) (* (* b b) a)) 0.5)
                       (/ (* (PI) 0.5) (* (* b a) a))))
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\
                    \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot 0.5}{\left(b \cdot a\right) \cdot a}\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < -3.5e15 or 3.1e18 < b

                      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 \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) \]
                        3. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\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. *-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-*.f6488.7

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

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

                      if -3.5e15 < b < 3.1e18

                      1. Initial program 85.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 a around inf

                        \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.5 \cdot 10^{+15} \lor \neg \left(b \leq 3.1 \cdot 10^{+18}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot 0.5}{\left(b \cdot a\right) \cdot a}\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 8: 62.3% accurate, 2.6× speedup?

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

                          \[\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 a around inf

                          \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

                            Alternative 9: 62.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 83.6%

                              \[\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 a around inf

                              \[\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. associate-/r*N/A

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

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

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

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

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

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

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

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

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

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

                                Reproduce

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