NMSE Section 6.1 mentioned, B

Percentage Accurate: 78.9% → 99.6%
Time: 4.9s
Alternatives: 8
Speedup: 1.8×

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.9% 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.7× speedup?

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

\\
\frac{\mathsf{PI}\left(\right)}{2 \cdot \left(a + b\right)} \cdot \frac{1}{b \cdot a}
\end{array}
Derivation
  1. Initial program 77.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(\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) \]
    3. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 94.1% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{PI}\left(\right) \cdot b\\ t_1 := \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \mathbf{if}\;b \leq -3.1 \cdot 10^{+139}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\ \;\;\;\;\frac{t\_0}{\left(\left(\left(a \cdot 2\right) \cdot b\right) \cdot b\right) \cdot \left(b + a\right)}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{t\_0}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (let* ((t_0 (* (PI) b)) (t_1 (* (/ (PI) (* b (* b a))) 0.5)))
   (if (<= b -3.1e+139)
     t_1
     (if (<= b -6.4e-157)
       (/ t_0 (* (* (* (* a 2.0) b) b) (+ b a)))
       (if (<= b 4e-220)
         (* (/ (PI) (* a (* a b))) 0.5)
         (if (<= b 2.2e+75) (/ t_0 (* (* a b) (* 2.0 (* (+ b a) b)))) t_1))))))
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \mathsf{PI}\left(\right) \cdot b\\
t_1 := \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\
\;\;\;\;\frac{t\_0}{\left(\left(\left(a \cdot 2\right) \cdot b\right) \cdot b\right) \cdot \left(b + a\right)}\\

\mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\
\;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\

\mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\
\;\;\;\;\frac{t\_0}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -3.1e139 or 2.20000000000000012e75 < b

    1. Initial program 58.7%

      \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
      2. lower-*.f64N/A

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

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

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

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
      6. pow2N/A

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
      7. lift-*.f6448.7

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

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

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

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

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

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
      5. lift-*.f6448.8

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

      \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
    8. Taylor expanded in a around 0

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

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

        \[\leadsto \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \]
      3. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot \frac{1}{2} \]
      7. lift-*.f6498.9

        \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5 \]
    12. Applied rewrites98.9%

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

    if -3.1e139 < b < -6.40000000000000041e-157

    1. Initial program 94.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-PI.f64N/A

        \[\leadsto \left(\frac{\color{blue}{\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. 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) \]
      5. 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) \]
      6. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.40000000000000041e-157 < b < 3.99999999999999997e-220

      1. Initial program 64.9%

        \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
        2. lower-*.f64N/A

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

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

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

          \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
        6. pow2N/A

          \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
        7. lift-*.f6481.2

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

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

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

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

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

          \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
        5. lift-*.f6499.6

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

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

      if 3.99999999999999997e-220 < b < 2.20000000000000012e75

      1. Initial program 96.4%

        \[\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-PI.f64N/A

          \[\leadsto \left(\frac{\color{blue}{\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. 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) \]
        5. 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) \]
        6. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot \color{blue}{b}\right)\right)} \]
      10. Recombined 4 regimes into one program.
      11. Final simplification96.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -3.1 \cdot 10^{+139}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot b}{\left(\left(\left(a \cdot 2\right) \cdot b\right) \cdot b\right) \cdot \left(b + a\right)}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \end{array} \]
      12. Add Preprocessing

      Alternative 3: 94.5% accurate, 1.1× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\ t_1 := \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \mathbf{if}\;b \leq -2.55 \cdot 10^{+73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (a b)
       :precision binary64
       (let* ((t_0 (/ (* (PI) b) (* (* a b) (* 2.0 (* (+ b a) b)))))
              (t_1 (* (/ (PI) (* b (* b a))) 0.5)))
         (if (<= b -2.55e+73)
           t_1
           (if (<= b -6.4e-157)
             t_0
             (if (<= b 4e-220)
               (* (/ (PI) (* a (* a b))) 0.5)
               (if (<= b 2.2e+75) t_0 t_1))))))
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\
      t_1 := \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\
      \mathbf{if}\;b \leq -2.55 \cdot 10^{+73}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\
      \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\
      
      \mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if b < -2.55000000000000012e73 or 2.20000000000000012e75 < b

        1. Initial program 64.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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
          2. lower-*.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
          6. pow2N/A

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
          7. lift-*.f6451.2

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

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

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
          5. lift-*.f6451.3

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

          \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
        8. Taylor expanded in a around 0

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

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

            \[\leadsto \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \]
          3. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot \frac{1}{2} \]
          7. lift-*.f6499.0

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5 \]
        12. Applied rewrites99.0%

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

        if -2.55000000000000012e73 < b < -6.40000000000000041e-157 or 3.99999999999999997e-220 < b < 2.20000000000000012e75

        1. Initial program 94.4%

          \[\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-PI.f64N/A

            \[\leadsto \left(\frac{\color{blue}{\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. 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) \]
          5. 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) \]
          6. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.40000000000000041e-157 < b < 3.99999999999999997e-220

          1. Initial program 64.9%

            \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6481.2

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6499.6

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
        10. Recombined 3 regimes into one program.
        11. Final simplification96.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq -6.4 \cdot 10^{-157}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\ \mathbf{elif}\;b \leq 4 \cdot 10^{-220}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \mathbf{elif}\;b \leq 2.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right) \cdot b}{\left(a \cdot b\right) \cdot \left(2 \cdot \left(\left(b + a\right) \cdot b\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \end{array} \]
        12. Add Preprocessing

        Alternative 4: 85.7% accurate, 1.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{a}}{b \cdot a} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \end{array} \end{array} \]
        (FPCore (a b)
         :precision binary64
         (if (or (<= a -6e-20) (not (<= a 8.8e-73)))
           (* (/ (/ (PI) a) (* b a)) 0.5)
           (* (/ (PI) (* b (* b a))) 0.5)))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\
        \;\;\;\;\frac{\frac{\mathsf{PI}\left(\right)}{a}}{b \cdot a} \cdot 0.5\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -6.00000000000000057e-20 or 8.8000000000000001e-73 < a

          1. Initial program 77.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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6479.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6488.6

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -6.00000000000000057e-20 < a < 8.8000000000000001e-73

          1. Initial program 76.7%

            \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6432.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6432.6

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
          8. Taylor expanded in a around 0

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

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

              \[\leadsto \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \]
            3. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \cdot \color{blue}{\frac{1}{2}} \]
          10. Applied rewrites75.3%

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot \frac{1}{2} \]
            7. lift-*.f6488.9

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

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

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

        Alternative 5: 85.7% accurate, 1.6× speedup?

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

          1. Initial program 81.9%

            \[\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{\frac{-1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a} + \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{b}}{{a}^{2}}} \]
          4. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{PI}\left(\right)}{b}, \frac{1}{2}, \frac{\mathsf{PI}\left(\right)}{a} \cdot \frac{-1}{2}\right)}{{a}^{2}} \]
            11. pow2N/A

              \[\leadsto \frac{\mathsf{fma}\left(\frac{\mathsf{PI}\left(\right)}{b}, \frac{1}{2}, \frac{\mathsf{PI}\left(\right)}{a} \cdot \frac{-1}{2}\right)}{a \cdot \color{blue}{a}} \]
            12. lift-*.f6480.4

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{\mathsf{PI}\left(\right)}{b} \cdot \frac{1}{2} + \frac{\mathsf{PI}\left(\right)}{a} \cdot \frac{-1}{2}}{a \cdot a} \]
          7. Applied rewrites86.0%

            \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(\frac{\mathsf{PI}\left(\right)}{a}, -0.5, \frac{\mathsf{PI}\left(\right)}{b} \cdot 0.5\right)}{a}}{a}} \]
          8. Taylor expanded in a around inf

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

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

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

              \[\leadsto \frac{\frac{\frac{\mathsf{PI}\left(\right)}{b} \cdot \frac{1}{2}}{a}}{a} \]
            4. lift-*.f6492.7

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

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

          if -6.00000000000000057e-20 < a < 8.8000000000000001e-73

          1. Initial program 76.7%

            \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6432.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6432.6

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
          8. Taylor expanded in a around 0

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

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

              \[\leadsto \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \]
            3. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \cdot \color{blue}{\frac{1}{2}} \]
          10. Applied rewrites75.3%

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot \frac{1}{2} \]
            7. lift-*.f6488.9

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

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

          if 8.8000000000000001e-73 < a

          1. Initial program 74.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. 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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6473.6

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6486.5

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{\mathsf{PI}\left(\right)}{a}}{b \cdot a} \cdot 0.5 \]
          9. Applied rewrites87.8%

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

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

        Alternative 6: 85.5% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\ \end{array} \end{array} \]
        (FPCore (a b)
         :precision binary64
         (if (or (<= a -6e-20) (not (<= a 8.8e-73)))
           (* (/ (PI) (* a (* a b))) 0.5)
           (* (/ (PI) (* b (* b a))) 0.5)))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\
        \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot 0.5\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if a < -6.00000000000000057e-20 or 8.8000000000000001e-73 < a

          1. Initial program 77.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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6479.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6488.6

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

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

          if -6.00000000000000057e-20 < a < 8.8000000000000001e-73

          1. Initial program 76.7%

            \[\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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6432.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6432.6

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
          8. Taylor expanded in a around 0

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

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

              \[\leadsto \frac{1}{2} \cdot \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \]
            3. difference-of-squares-revN/A

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \cdot \color{blue}{\frac{1}{2}} \]
          10. Applied rewrites75.3%

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{b \cdot \left(b \cdot a\right)} \cdot \frac{1}{2} \]
            7. lift-*.f6488.9

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

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

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

        Alternative 7: 80.5% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\ \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\ \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 (or (<= a -6e-20) (not (<= a 8.8e-73)))
           (* (/ (PI) (* a (* a b))) 0.5)
           (* (/ (PI) (* (* b b) a)) 0.5)))
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a \leq -6 \cdot 10^{-20} \lor \neg \left(a \leq 8.8 \cdot 10^{-73}\right):\\
        \;\;\;\;\frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5\\
        
        \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 < -6.00000000000000057e-20 or 8.8000000000000001e-73 < a

          1. Initial program 77.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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
            6. pow2N/A

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
            7. lift-*.f6479.5

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
            5. lift-*.f6488.6

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

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

          if -6.00000000000000057e-20 < a < 8.8000000000000001e-73

          1. Initial program 76.7%

            \[\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 \frac{\mathsf{PI}\left(\right)}{a \cdot {b}^{2}} \cdot \color{blue}{\frac{1}{2}} \]
            2. lower-*.f64N/A

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

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

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

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

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

              \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(b \cdot b\right) \cdot a} \cdot \frac{1}{2} \]
            8. lift-*.f6475.3

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

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

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

        Alternative 8: 63.0% accurate, 2.6× speedup?

        \[\begin{array}{l} \\ \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \end{array} \]
        (FPCore (a b) :precision binary64 (* (/ (PI) (* a (* a b))) 0.5))
        \begin{array}{l}
        
        \\
        \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5
        \end{array}
        
        Derivation
        1. Initial program 77.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. 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 \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \color{blue}{\frac{1}{2}} \]
          2. lower-*.f64N/A

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{{a}^{2} \cdot b} \cdot \frac{1}{2} \]
          6. pow2N/A

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{\left(a \cdot a\right) \cdot b} \cdot \frac{1}{2} \]
          7. lift-*.f6460.6

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

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

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

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

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

            \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot \frac{1}{2} \]
          5. lift-*.f6466.0

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

          \[\leadsto \frac{\mathsf{PI}\left(\right)}{a \cdot \left(a \cdot b\right)} \cdot 0.5 \]
        8. Final simplification66.0%

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

        Reproduce

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