Bouland and Aaronson, Equation (26)

Percentage Accurate: 99.9% → 99.9%
Time: 6.4s
Alternatives: 9
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1 \end{array} \]
(FPCore (a b)
 :precision binary64
 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
double code(double a, double b) {
	return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (b * b))) - 1.0d0
end function
public static double code(double a, double b) {
	return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
def code(a, b):
	return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0
function code(a, b)
	return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(b * b))) - 1.0)
end
function tmp = code(a, b)
	tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (b * b))) - 1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}

\\
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1 \end{array} \]
(FPCore (a b)
 :precision binary64
 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
double code(double a, double b) {
	return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (b * b))) - 1.0d0
end function
public static double code(double a, double b) {
	return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
def code(a, b):
	return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0
function code(a, b)
	return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(b * b))) - 1.0)
end
function tmp = code(a, b)
	tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (b * b))) - 1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}

\\
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
\end{array}

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1 \end{array} \]
(FPCore (a b)
 :precision binary64
 (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))
double code(double a, double b) {
	return (pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = ((((a * a) + (b * b)) ** 2.0d0) + (4.0d0 * (b * b))) - 1.0d0
end function
public static double code(double a, double b) {
	return (Math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0;
}
def code(a, b):
	return (math.pow(((a * a) + (b * b)), 2.0) + (4.0 * (b * b))) - 1.0
function code(a, b)
	return Float64(Float64((Float64(Float64(a * a) + Float64(b * b)) ^ 2.0) + Float64(4.0 * Float64(b * b))) - 1.0)
end
function tmp = code(a, b)
	tmp = ((((a * a) + (b * b)) ^ 2.0) + (4.0 * (b * b))) - 1.0;
end
code[a_, b_] := N[(N[(N[Power[N[(N[(a * a), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] + N[(4.0 * N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]
\begin{array}{l}

\\
\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left({\left(a \cdot a + b \cdot b\right)}^{2} + 4 \cdot \left(b \cdot b\right)\right) - 1 \]
  2. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 84.0% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 21500:\\ \;\;\;\;{a}^{4} - 1\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b - 1\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (<= b 21500.0)
   (- (pow a 4.0) 1.0)
   (- (* (* (fma b b (fma (* a a) 2.0 4.0)) b) b) 1.0)))
double code(double a, double b) {
	double tmp;
	if (b <= 21500.0) {
		tmp = pow(a, 4.0) - 1.0;
	} else {
		tmp = ((fma(b, b, fma((a * a), 2.0, 4.0)) * b) * b) - 1.0;
	}
	return tmp;
}
function code(a, b)
	tmp = 0.0
	if (b <= 21500.0)
		tmp = Float64((a ^ 4.0) - 1.0);
	else
		tmp = Float64(Float64(Float64(fma(b, b, fma(Float64(a * a), 2.0, 4.0)) * b) * b) - 1.0);
	end
	return tmp
end
code[a_, b_] := If[LessEqual[b, 21500.0], N[(N[Power[a, 4.0], $MachinePrecision] - 1.0), $MachinePrecision], N[(N[(N[(N[(b * b + N[(N[(a * a), $MachinePrecision] * 2.0 + 4.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision] - 1.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 21500:\\
\;\;\;\;{a}^{4} - 1\\

\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b - 1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 21500

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{{a}^{4} - 1} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{{a}^{4} - 1} \]
      2. lower-pow.f6479.0

        \[\leadsto \color{blue}{{a}^{4}} - 1 \]
    5. Applied rewrites79.0%

      \[\leadsto \color{blue}{{a}^{4} - 1} \]

    if 21500 < b

    1. Initial program 99.9%

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

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

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

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

        \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + \left({b}^{4} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
      4. metadata-evalN/A

        \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{\color{blue}{\left(2 \cdot 2\right)}} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
      5. pow-sqrN/A

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

        \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{2} \cdot {b}^{2} + \color{blue}{\left(2 \cdot {a}^{2}\right) \cdot {b}^{2}}\right)\right) - 1 \]
      7. distribute-rgt-inN/A

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

        \[\leadsto \left({b}^{2} \cdot 4 + {b}^{2} \cdot \color{blue}{\left(2 \cdot {a}^{2} + {b}^{2}\right)}\right) - 1 \]
      9. distribute-lft-inN/A

        \[\leadsto \color{blue}{{b}^{2} \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)} - 1 \]
      10. unpow2N/A

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

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

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

        \[\leadsto \color{blue}{\left(b \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)\right) \cdot b} - 1 \]
    5. Applied rewrites98.6%

      \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b} - 1 \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 3: 84.0% accurate, 3.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 21500:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b - 1\\ \end{array} \end{array} \]
(FPCore (a b)
 :precision binary64
 (if (<= b 21500.0)
   (fma (* a a) (* a a) -1.0)
   (- (* (* (fma b b (fma (* a a) 2.0 4.0)) b) b) 1.0)))
double code(double a, double b) {
	double tmp;
	if (b <= 21500.0) {
		tmp = fma((a * a), (a * a), -1.0);
	} else {
		tmp = ((fma(b, b, fma((a * a), 2.0, 4.0)) * b) * b) - 1.0;
	}
	return tmp;
}
function code(a, b)
	tmp = 0.0
	if (b <= 21500.0)
		tmp = fma(Float64(a * a), Float64(a * a), -1.0);
	else
		tmp = Float64(Float64(Float64(fma(b, b, fma(Float64(a * a), 2.0, 4.0)) * b) * b) - 1.0);
	end
	return tmp
end
code[a_, b_] := If[LessEqual[b, 21500.0], N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(N[(N[(b * b + N[(N[(a * a), $MachinePrecision] * 2.0 + 4.0), $MachinePrecision]), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision] - 1.0), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq 21500:\\
\;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\

\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b - 1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 21500

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{{a}^{4} - 1} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

        \[\leadsto \color{blue}{{a}^{4} - 1} \]
      2. lower-pow.f6479.0

        \[\leadsto \color{blue}{{a}^{4}} - 1 \]
    5. Applied rewrites79.0%

      \[\leadsto \color{blue}{{a}^{4} - 1} \]
    6. Step-by-step derivation
      1. Applied rewrites78.9%

        \[\leadsto \left(a \cdot a\right) \cdot \left(a \cdot a\right) - 1 \]
      2. Step-by-step derivation
        1. Applied rewrites78.9%

          \[\leadsto \mathsf{fma}\left(a \cdot a, \color{blue}{a \cdot a}, -1\right) \]

        if 21500 < b

        1. Initial program 99.9%

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

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

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

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

            \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + \left({b}^{4} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
          4. metadata-evalN/A

            \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{\color{blue}{\left(2 \cdot 2\right)}} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
          5. pow-sqrN/A

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

            \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{2} \cdot {b}^{2} + \color{blue}{\left(2 \cdot {a}^{2}\right) \cdot {b}^{2}}\right)\right) - 1 \]
          7. distribute-rgt-inN/A

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

            \[\leadsto \left({b}^{2} \cdot 4 + {b}^{2} \cdot \color{blue}{\left(2 \cdot {a}^{2} + {b}^{2}\right)}\right) - 1 \]
          9. distribute-lft-inN/A

            \[\leadsto \color{blue}{{b}^{2} \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)} - 1 \]
          10. unpow2N/A

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

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

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

            \[\leadsto \color{blue}{\left(b \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)\right) \cdot b} - 1 \]
        5. Applied rewrites98.6%

          \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b} - 1 \]
      3. Recombined 2 regimes into one program.
      4. Add Preprocessing

      Alternative 4: 82.3% accurate, 5.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 31500:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\mathsf{fma}\left(b, b, 4\right) \cdot b\right) \cdot b - 1\\ \end{array} \end{array} \]
      (FPCore (a b)
       :precision binary64
       (if (<= b 31500.0)
         (fma (* a a) (* a a) -1.0)
         (- (* (* (fma b b 4.0) b) b) 1.0)))
      double code(double a, double b) {
      	double tmp;
      	if (b <= 31500.0) {
      		tmp = fma((a * a), (a * a), -1.0);
      	} else {
      		tmp = ((fma(b, b, 4.0) * b) * b) - 1.0;
      	}
      	return tmp;
      }
      
      function code(a, b)
      	tmp = 0.0
      	if (b <= 31500.0)
      		tmp = fma(Float64(a * a), Float64(a * a), -1.0);
      	else
      		tmp = Float64(Float64(Float64(fma(b, b, 4.0) * b) * b) - 1.0);
      	end
      	return tmp
      end
      
      code[a_, b_] := If[LessEqual[b, 31500.0], N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(N[(N[(b * b + 4.0), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision] - 1.0), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;b \leq 31500:\\
      \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(\mathsf{fma}\left(b, b, 4\right) \cdot b\right) \cdot b - 1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if b < 31500

        1. Initial program 99.9%

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

          \[\leadsto \color{blue}{{a}^{4} - 1} \]
        4. Step-by-step derivation
          1. lower--.f64N/A

            \[\leadsto \color{blue}{{a}^{4} - 1} \]
          2. lower-pow.f6479.0

            \[\leadsto \color{blue}{{a}^{4}} - 1 \]
        5. Applied rewrites79.0%

          \[\leadsto \color{blue}{{a}^{4} - 1} \]
        6. Step-by-step derivation
          1. Applied rewrites78.9%

            \[\leadsto \left(a \cdot a\right) \cdot \left(a \cdot a\right) - 1 \]
          2. Step-by-step derivation
            1. Applied rewrites78.9%

              \[\leadsto \mathsf{fma}\left(a \cdot a, \color{blue}{a \cdot a}, -1\right) \]

            if 31500 < b

            1. Initial program 99.9%

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

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

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

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

                \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + \left({b}^{4} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
              4. metadata-evalN/A

                \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{\color{blue}{\left(2 \cdot 2\right)}} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
              5. pow-sqrN/A

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

                \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{2} \cdot {b}^{2} + \color{blue}{\left(2 \cdot {a}^{2}\right) \cdot {b}^{2}}\right)\right) - 1 \]
              7. distribute-rgt-inN/A

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

                \[\leadsto \left({b}^{2} \cdot 4 + {b}^{2} \cdot \color{blue}{\left(2 \cdot {a}^{2} + {b}^{2}\right)}\right) - 1 \]
              9. distribute-lft-inN/A

                \[\leadsto \color{blue}{{b}^{2} \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)} - 1 \]
              10. unpow2N/A

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

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

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

                \[\leadsto \color{blue}{\left(b \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)\right) \cdot b} - 1 \]
            5. Applied rewrites98.6%

              \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b} - 1 \]
            6. Taylor expanded in a around 0

              \[\leadsto \left(\mathsf{fma}\left(b, b, 4\right) \cdot b\right) \cdot b - 1 \]
            7. Step-by-step derivation
              1. Applied rewrites90.4%

                \[\leadsto \left(\mathsf{fma}\left(b, b, 4\right) \cdot b\right) \cdot b - 1 \]
            8. Recombined 2 regimes into one program.
            9. Add Preprocessing

            Alternative 5: 82.2% accurate, 5.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 85000:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\left(b \cdot b\right) \cdot b\right) \cdot b - 1\\ \end{array} \end{array} \]
            (FPCore (a b)
             :precision binary64
             (if (<= b 85000.0) (fma (* a a) (* a a) -1.0) (- (* (* (* b b) b) b) 1.0)))
            double code(double a, double b) {
            	double tmp;
            	if (b <= 85000.0) {
            		tmp = fma((a * a), (a * a), -1.0);
            	} else {
            		tmp = (((b * b) * b) * b) - 1.0;
            	}
            	return tmp;
            }
            
            function code(a, b)
            	tmp = 0.0
            	if (b <= 85000.0)
            		tmp = fma(Float64(a * a), Float64(a * a), -1.0);
            	else
            		tmp = Float64(Float64(Float64(Float64(b * b) * b) * b) - 1.0);
            	end
            	return tmp
            end
            
            code[a_, b_] := If[LessEqual[b, 85000.0], N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(N[(N[(b * b), $MachinePrecision] * b), $MachinePrecision] * b), $MachinePrecision] - 1.0), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;b \leq 85000:\\
            \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(b \cdot b\right) \cdot b\right) \cdot b - 1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if b < 85000

              1. Initial program 99.9%

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

                \[\leadsto \color{blue}{{a}^{4} - 1} \]
              4. Step-by-step derivation
                1. lower--.f64N/A

                  \[\leadsto \color{blue}{{a}^{4} - 1} \]
                2. lower-pow.f6479.0

                  \[\leadsto \color{blue}{{a}^{4}} - 1 \]
              5. Applied rewrites79.0%

                \[\leadsto \color{blue}{{a}^{4} - 1} \]
              6. Step-by-step derivation
                1. Applied rewrites78.9%

                  \[\leadsto \left(a \cdot a\right) \cdot \left(a \cdot a\right) - 1 \]
                2. Step-by-step derivation
                  1. Applied rewrites78.9%

                    \[\leadsto \mathsf{fma}\left(a \cdot a, \color{blue}{a \cdot a}, -1\right) \]

                  if 85000 < b

                  1. Initial program 99.9%

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

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

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

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

                      \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + \left({b}^{4} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
                    4. metadata-evalN/A

                      \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{\color{blue}{\left(2 \cdot 2\right)}} + 2 \cdot \left({a}^{2} \cdot {b}^{2}\right)\right)\right) - 1 \]
                    5. pow-sqrN/A

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

                      \[\leadsto \left({b}^{2} \cdot 4 + \left({b}^{2} \cdot {b}^{2} + \color{blue}{\left(2 \cdot {a}^{2}\right) \cdot {b}^{2}}\right)\right) - 1 \]
                    7. distribute-rgt-inN/A

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

                      \[\leadsto \left({b}^{2} \cdot 4 + {b}^{2} \cdot \color{blue}{\left(2 \cdot {a}^{2} + {b}^{2}\right)}\right) - 1 \]
                    9. distribute-lft-inN/A

                      \[\leadsto \color{blue}{{b}^{2} \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)} - 1 \]
                    10. unpow2N/A

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

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

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

                      \[\leadsto \color{blue}{\left(b \cdot \left(4 + \left(2 \cdot {a}^{2} + {b}^{2}\right)\right)\right) \cdot b} - 1 \]
                  5. Applied rewrites98.6%

                    \[\leadsto \color{blue}{\left(\mathsf{fma}\left(b, b, \mathsf{fma}\left(a \cdot a, 2, 4\right)\right) \cdot b\right) \cdot b} - 1 \]
                  6. Taylor expanded in b around inf

                    \[\leadsto {b}^{3} \cdot b - 1 \]
                  7. Step-by-step derivation
                    1. Applied rewrites89.9%

                      \[\leadsto {b}^{3} \cdot b - 1 \]
                    2. Step-by-step derivation
                      1. Applied rewrites89.9%

                        \[\leadsto \left(\left(b \cdot b\right) \cdot b\right) \cdot b - 1 \]
                    3. Recombined 2 regimes into one program.
                    4. Add Preprocessing

                    Alternative 6: 77.3% accurate, 5.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq 6 \cdot 10^{+150}:\\ \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\ \mathbf{else}:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4 - 1\\ \end{array} \end{array} \]
                    (FPCore (a b)
                     :precision binary64
                     (if (<= b 6e+150) (fma (* a a) (* a a) -1.0) (- (* (* b b) 4.0) 1.0)))
                    double code(double a, double b) {
                    	double tmp;
                    	if (b <= 6e+150) {
                    		tmp = fma((a * a), (a * a), -1.0);
                    	} else {
                    		tmp = ((b * b) * 4.0) - 1.0;
                    	}
                    	return tmp;
                    }
                    
                    function code(a, b)
                    	tmp = 0.0
                    	if (b <= 6e+150)
                    		tmp = fma(Float64(a * a), Float64(a * a), -1.0);
                    	else
                    		tmp = Float64(Float64(Float64(b * b) * 4.0) - 1.0);
                    	end
                    	return tmp
                    end
                    
                    code[a_, b_] := If[LessEqual[b, 6e+150], N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision] + -1.0), $MachinePrecision], N[(N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision] - 1.0), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;b \leq 6 \cdot 10^{+150}:\\
                    \;\;\;\;\mathsf{fma}\left(a \cdot a, a \cdot a, -1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;\left(b \cdot b\right) \cdot 4 - 1\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if b < 6.00000000000000025e150

                      1. Initial program 99.9%

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

                        \[\leadsto \color{blue}{{a}^{4} - 1} \]
                      4. Step-by-step derivation
                        1. lower--.f64N/A

                          \[\leadsto \color{blue}{{a}^{4} - 1} \]
                        2. lower-pow.f6474.5

                          \[\leadsto \color{blue}{{a}^{4}} - 1 \]
                      5. Applied rewrites74.5%

                        \[\leadsto \color{blue}{{a}^{4} - 1} \]
                      6. Step-by-step derivation
                        1. Applied rewrites74.4%

                          \[\leadsto \left(a \cdot a\right) \cdot \left(a \cdot a\right) - 1 \]
                        2. Step-by-step derivation
                          1. Applied rewrites74.4%

                            \[\leadsto \mathsf{fma}\left(a \cdot a, \color{blue}{a \cdot a}, -1\right) \]

                          if 6.00000000000000025e150 < b

                          1. Initial program 100.0%

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

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

                              \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + {b}^{4}\right) - 1 \]
                            2. unpow2N/A

                              \[\leadsto \left(\color{blue}{\left(b \cdot b\right)} \cdot 4 + {b}^{4}\right) - 1 \]
                            3. associate-*l*N/A

                              \[\leadsto \left(\color{blue}{b \cdot \left(b \cdot 4\right)} + {b}^{4}\right) - 1 \]
                            4. metadata-evalN/A

                              \[\leadsto \left(b \cdot \left(b \cdot 4\right) + {b}^{\color{blue}{\left(2 \cdot 2\right)}}\right) - 1 \]
                            5. pow-sqrN/A

                              \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{{b}^{2} \cdot {b}^{2}}\right) - 1 \]
                            6. unpow2N/A

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

                              \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{b \cdot \left(b \cdot {b}^{2}\right)}\right) - 1 \]
                            8. distribute-lft-outN/A

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

                              \[\leadsto b \cdot \left(\color{blue}{4 \cdot b} + b \cdot {b}^{2}\right) - 1 \]
                            10. distribute-rgt-outN/A

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

                              \[\leadsto \left(\color{blue}{4 \cdot \left(b \cdot b\right)} + \left(b \cdot {b}^{2}\right) \cdot b\right) - 1 \]
                            12. unpow2N/A

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

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

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

                              \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{\left(b \cdot b\right) \cdot {b}^{2}}\right) - 1 \]
                            16. unpow2N/A

                              \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{2}} \cdot {b}^{2}\right) - 1 \]
                            17. pow-sqrN/A

                              \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{\left(2 \cdot 2\right)}}\right) - 1 \]
                            18. metadata-evalN/A

                              \[\leadsto \left({b}^{2} \cdot 4 + {b}^{\color{blue}{4}}\right) - 1 \]
                            19. lower-fma.f64N/A

                              \[\leadsto \color{blue}{\mathsf{fma}\left({b}^{2}, 4, {b}^{4}\right)} - 1 \]
                            20. unpow2N/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                            21. lower-*.f64N/A

                              \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                            22. lower-pow.f64100.0

                              \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \color{blue}{{b}^{4}}\right) - 1 \]
                          5. Applied rewrites100.0%

                            \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot b, 4, {b}^{4}\right)} - 1 \]
                          6. Step-by-step derivation
                            1. Applied rewrites100.0%

                              \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) - 1 \]
                            2. Taylor expanded in b around 0

                              \[\leadsto 4 \cdot \color{blue}{{b}^{2}} - 1 \]
                            3. Step-by-step derivation
                              1. Applied rewrites100.0%

                                \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{4} - 1 \]
                            4. Recombined 2 regimes into one program.
                            5. Add Preprocessing

                            Alternative 7: 66.7% accurate, 6.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 6.8:\\ \;\;\;\;\left(b \cdot b\right) \cdot 4 - 1\\ \mathbf{else}:\\ \;\;\;\;\left(a \cdot a\right) \cdot \left(a \cdot a\right)\\ \end{array} \end{array} \]
                            (FPCore (a b)
                             :precision binary64
                             (if (<= a 6.8) (- (* (* b b) 4.0) 1.0) (* (* a a) (* a a))))
                            double code(double a, double b) {
                            	double tmp;
                            	if (a <= 6.8) {
                            		tmp = ((b * b) * 4.0) - 1.0;
                            	} else {
                            		tmp = (a * a) * (a * a);
                            	}
                            	return tmp;
                            }
                            
                            module fmin_fmax_functions
                                implicit none
                                private
                                public fmax
                                public fmin
                            
                                interface fmax
                                    module procedure fmax88
                                    module procedure fmax44
                                    module procedure fmax84
                                    module procedure fmax48
                                end interface
                                interface fmin
                                    module procedure fmin88
                                    module procedure fmin44
                                    module procedure fmin84
                                    module procedure fmin48
                                end interface
                            contains
                                real(8) function fmax88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmax44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmax84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmax48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                end function
                                real(8) function fmin88(x, y) result (res)
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(4) function fmin44(x, y) result (res)
                                    real(4), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                end function
                                real(8) function fmin84(x, y) result(res)
                                    real(8), intent (in) :: x
                                    real(4), intent (in) :: y
                                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                end function
                                real(8) function fmin48(x, y) result(res)
                                    real(4), intent (in) :: x
                                    real(8), intent (in) :: y
                                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                end function
                            end module
                            
                            real(8) function code(a, b)
                            use fmin_fmax_functions
                                real(8), intent (in) :: a
                                real(8), intent (in) :: b
                                real(8) :: tmp
                                if (a <= 6.8d0) then
                                    tmp = ((b * b) * 4.0d0) - 1.0d0
                                else
                                    tmp = (a * a) * (a * a)
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double a, double b) {
                            	double tmp;
                            	if (a <= 6.8) {
                            		tmp = ((b * b) * 4.0) - 1.0;
                            	} else {
                            		tmp = (a * a) * (a * a);
                            	}
                            	return tmp;
                            }
                            
                            def code(a, b):
                            	tmp = 0
                            	if a <= 6.8:
                            		tmp = ((b * b) * 4.0) - 1.0
                            	else:
                            		tmp = (a * a) * (a * a)
                            	return tmp
                            
                            function code(a, b)
                            	tmp = 0.0
                            	if (a <= 6.8)
                            		tmp = Float64(Float64(Float64(b * b) * 4.0) - 1.0);
                            	else
                            		tmp = Float64(Float64(a * a) * Float64(a * a));
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(a, b)
                            	tmp = 0.0;
                            	if (a <= 6.8)
                            		tmp = ((b * b) * 4.0) - 1.0;
                            	else
                            		tmp = (a * a) * (a * a);
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[a_, b_] := If[LessEqual[a, 6.8], N[(N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision] - 1.0), $MachinePrecision], N[(N[(a * a), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;a \leq 6.8:\\
                            \;\;\;\;\left(b \cdot b\right) \cdot 4 - 1\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\left(a \cdot a\right) \cdot \left(a \cdot a\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if a < 6.79999999999999982

                              1. Initial program 99.9%

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

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

                                  \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + {b}^{4}\right) - 1 \]
                                2. unpow2N/A

                                  \[\leadsto \left(\color{blue}{\left(b \cdot b\right)} \cdot 4 + {b}^{4}\right) - 1 \]
                                3. associate-*l*N/A

                                  \[\leadsto \left(\color{blue}{b \cdot \left(b \cdot 4\right)} + {b}^{4}\right) - 1 \]
                                4. metadata-evalN/A

                                  \[\leadsto \left(b \cdot \left(b \cdot 4\right) + {b}^{\color{blue}{\left(2 \cdot 2\right)}}\right) - 1 \]
                                5. pow-sqrN/A

                                  \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{{b}^{2} \cdot {b}^{2}}\right) - 1 \]
                                6. unpow2N/A

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

                                  \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{b \cdot \left(b \cdot {b}^{2}\right)}\right) - 1 \]
                                8. distribute-lft-outN/A

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

                                  \[\leadsto b \cdot \left(\color{blue}{4 \cdot b} + b \cdot {b}^{2}\right) - 1 \]
                                10. distribute-rgt-outN/A

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

                                  \[\leadsto \left(\color{blue}{4 \cdot \left(b \cdot b\right)} + \left(b \cdot {b}^{2}\right) \cdot b\right) - 1 \]
                                12. unpow2N/A

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

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

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

                                  \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{\left(b \cdot b\right) \cdot {b}^{2}}\right) - 1 \]
                                16. unpow2N/A

                                  \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{2}} \cdot {b}^{2}\right) - 1 \]
                                17. pow-sqrN/A

                                  \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{\left(2 \cdot 2\right)}}\right) - 1 \]
                                18. metadata-evalN/A

                                  \[\leadsto \left({b}^{2} \cdot 4 + {b}^{\color{blue}{4}}\right) - 1 \]
                                19. lower-fma.f64N/A

                                  \[\leadsto \color{blue}{\mathsf{fma}\left({b}^{2}, 4, {b}^{4}\right)} - 1 \]
                                20. unpow2N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                                21. lower-*.f64N/A

                                  \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                                22. lower-pow.f6481.9

                                  \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \color{blue}{{b}^{4}}\right) - 1 \]
                              5. Applied rewrites81.9%

                                \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot b, 4, {b}^{4}\right)} - 1 \]
                              6. Step-by-step derivation
                                1. Applied rewrites81.8%

                                  \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) - 1 \]
                                2. Taylor expanded in b around 0

                                  \[\leadsto 4 \cdot \color{blue}{{b}^{2}} - 1 \]
                                3. Step-by-step derivation
                                  1. Applied rewrites60.0%

                                    \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{4} - 1 \]

                                  if 6.79999999999999982 < a

                                  1. Initial program 99.9%

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

                                    \[\leadsto \color{blue}{{a}^{4}} \]
                                  4. Step-by-step derivation
                                    1. lower-pow.f6492.1

                                      \[\leadsto \color{blue}{{a}^{4}} \]
                                  5. Applied rewrites92.1%

                                    \[\leadsto \color{blue}{{a}^{4}} \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites92.0%

                                      \[\leadsto \left(a \cdot a\right) \cdot \color{blue}{\left(a \cdot a\right)} \]
                                  7. Recombined 2 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 8: 51.0% accurate, 9.4× speedup?

                                  \[\begin{array}{l} \\ \left(b \cdot b\right) \cdot 4 - 1 \end{array} \]
                                  (FPCore (a b) :precision binary64 (- (* (* b b) 4.0) 1.0))
                                  double code(double a, double b) {
                                  	return ((b * b) * 4.0) - 1.0;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(a, b)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: a
                                      real(8), intent (in) :: b
                                      code = ((b * b) * 4.0d0) - 1.0d0
                                  end function
                                  
                                  public static double code(double a, double b) {
                                  	return ((b * b) * 4.0) - 1.0;
                                  }
                                  
                                  def code(a, b):
                                  	return ((b * b) * 4.0) - 1.0
                                  
                                  function code(a, b)
                                  	return Float64(Float64(Float64(b * b) * 4.0) - 1.0)
                                  end
                                  
                                  function tmp = code(a, b)
                                  	tmp = ((b * b) * 4.0) - 1.0;
                                  end
                                  
                                  code[a_, b_] := N[(N[(N[(b * b), $MachinePrecision] * 4.0), $MachinePrecision] - 1.0), $MachinePrecision]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \left(b \cdot b\right) \cdot 4 - 1
                                  \end{array}
                                  
                                  Derivation
                                  1. Initial program 99.9%

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

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

                                      \[\leadsto \left(\color{blue}{{b}^{2} \cdot 4} + {b}^{4}\right) - 1 \]
                                    2. unpow2N/A

                                      \[\leadsto \left(\color{blue}{\left(b \cdot b\right)} \cdot 4 + {b}^{4}\right) - 1 \]
                                    3. associate-*l*N/A

                                      \[\leadsto \left(\color{blue}{b \cdot \left(b \cdot 4\right)} + {b}^{4}\right) - 1 \]
                                    4. metadata-evalN/A

                                      \[\leadsto \left(b \cdot \left(b \cdot 4\right) + {b}^{\color{blue}{\left(2 \cdot 2\right)}}\right) - 1 \]
                                    5. pow-sqrN/A

                                      \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{{b}^{2} \cdot {b}^{2}}\right) - 1 \]
                                    6. unpow2N/A

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

                                      \[\leadsto \left(b \cdot \left(b \cdot 4\right) + \color{blue}{b \cdot \left(b \cdot {b}^{2}\right)}\right) - 1 \]
                                    8. distribute-lft-outN/A

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

                                      \[\leadsto b \cdot \left(\color{blue}{4 \cdot b} + b \cdot {b}^{2}\right) - 1 \]
                                    10. distribute-rgt-outN/A

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

                                      \[\leadsto \left(\color{blue}{4 \cdot \left(b \cdot b\right)} + \left(b \cdot {b}^{2}\right) \cdot b\right) - 1 \]
                                    12. unpow2N/A

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

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

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

                                      \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{\left(b \cdot b\right) \cdot {b}^{2}}\right) - 1 \]
                                    16. unpow2N/A

                                      \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{2}} \cdot {b}^{2}\right) - 1 \]
                                    17. pow-sqrN/A

                                      \[\leadsto \left({b}^{2} \cdot 4 + \color{blue}{{b}^{\left(2 \cdot 2\right)}}\right) - 1 \]
                                    18. metadata-evalN/A

                                      \[\leadsto \left({b}^{2} \cdot 4 + {b}^{\color{blue}{4}}\right) - 1 \]
                                    19. lower-fma.f64N/A

                                      \[\leadsto \color{blue}{\mathsf{fma}\left({b}^{2}, 4, {b}^{4}\right)} - 1 \]
                                    20. unpow2N/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                                    21. lower-*.f64N/A

                                      \[\leadsto \mathsf{fma}\left(\color{blue}{b \cdot b}, 4, {b}^{4}\right) - 1 \]
                                    22. lower-pow.f6468.5

                                      \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \color{blue}{{b}^{4}}\right) - 1 \]
                                  5. Applied rewrites68.5%

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(b \cdot b, 4, {b}^{4}\right)} - 1 \]
                                  6. Step-by-step derivation
                                    1. Applied rewrites68.4%

                                      \[\leadsto \mathsf{fma}\left(b \cdot b, 4, \left(b \cdot b\right) \cdot \left(b \cdot b\right)\right) - 1 \]
                                    2. Taylor expanded in b around 0

                                      \[\leadsto 4 \cdot \color{blue}{{b}^{2}} - 1 \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites50.6%

                                        \[\leadsto \left(b \cdot b\right) \cdot \color{blue}{4} - 1 \]
                                      2. Add Preprocessing

                                      Alternative 9: 24.9% accurate, 131.0× speedup?

                                      \[\begin{array}{l} \\ -1 \end{array} \]
                                      (FPCore (a b) :precision binary64 -1.0)
                                      double code(double a, double b) {
                                      	return -1.0;
                                      }
                                      
                                      module fmin_fmax_functions
                                          implicit none
                                          private
                                          public fmax
                                          public fmin
                                      
                                          interface fmax
                                              module procedure fmax88
                                              module procedure fmax44
                                              module procedure fmax84
                                              module procedure fmax48
                                          end interface
                                          interface fmin
                                              module procedure fmin88
                                              module procedure fmin44
                                              module procedure fmin84
                                              module procedure fmin48
                                          end interface
                                      contains
                                          real(8) function fmax88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmax44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmax84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmax48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin88(x, y) result (res)
                                              real(8), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(4) function fmin44(x, y) result (res)
                                              real(4), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                          end function
                                          real(8) function fmin84(x, y) result(res)
                                              real(8), intent (in) :: x
                                              real(4), intent (in) :: y
                                              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                          end function
                                          real(8) function fmin48(x, y) result(res)
                                              real(4), intent (in) :: x
                                              real(8), intent (in) :: y
                                              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                          end function
                                      end module
                                      
                                      real(8) function code(a, b)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: a
                                          real(8), intent (in) :: b
                                          code = -1.0d0
                                      end function
                                      
                                      public static double code(double a, double b) {
                                      	return -1.0;
                                      }
                                      
                                      def code(a, b):
                                      	return -1.0
                                      
                                      function code(a, b)
                                      	return -1.0
                                      end
                                      
                                      function tmp = code(a, b)
                                      	tmp = -1.0;
                                      end
                                      
                                      code[a_, b_] := -1.0
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      -1
                                      \end{array}
                                      
                                      Derivation
                                      1. Initial program 99.9%

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

                                        \[\leadsto \color{blue}{{a}^{4} - 1} \]
                                      4. Step-by-step derivation
                                        1. lower--.f64N/A

                                          \[\leadsto \color{blue}{{a}^{4} - 1} \]
                                        2. lower-pow.f6468.5

                                          \[\leadsto \color{blue}{{a}^{4}} - 1 \]
                                      5. Applied rewrites68.5%

                                        \[\leadsto \color{blue}{{a}^{4} - 1} \]
                                      6. Taylor expanded in a around 0

                                        \[\leadsto -1 \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites23.6%

                                          \[\leadsto -1 \]
                                        2. Add Preprocessing

                                        Reproduce

                                        ?
                                        herbie shell --seed 2024351 
                                        (FPCore (a b)
                                          :name "Bouland and Aaronson, Equation (26)"
                                          :precision binary64
                                          (- (+ (pow (+ (* a a) (* b b)) 2.0) (* 4.0 (* b b))) 1.0))