Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B

Percentage Accurate: 90.6% → 96.0%
Time: 8.7s
Alternatives: 9
Speedup: 0.7×

Specification

?
\[\begin{array}{l} \\ x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t))))
double code(double x, double y, double z, double t) {
	return (x * x) - ((y * 4.0) * ((z * z) - t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * x) - ((y * 4.0d0) * ((z * z) - t))
end function
public static double code(double x, double y, double z, double t) {
	return (x * x) - ((y * 4.0) * ((z * z) - t));
}
def code(x, y, z, t):
	return (x * x) - ((y * 4.0) * ((z * z) - t))
function code(x, y, z, t)
	return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
function tmp = code(x, y, z, t)
	tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 90.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \end{array} \]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t))))
double code(double x, double y, double z, double t) {
	return (x * x) - ((y * 4.0) * ((z * z) - t));
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    code = (x * x) - ((y * 4.0d0) * ((z * z) - t))
end function
public static double code(double x, double y, double z, double t) {
	return (x * x) - ((y * 4.0) * ((z * z) - t));
}
def code(x, y, z, t):
	return (x * x) - ((y * 4.0) * ((z * z) - t))
function code(x, y, z, t)
	return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
function tmp = code(x, y, z, t)
	tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\end{array}

Alternative 1: 96.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+299}:\\ \;\;\;\;\mathsf{fma}\left(z \cdot z - t, -4 \cdot y, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (* z z) 1e+299)
   (fma (- (* z z) t) (* -4.0 y) (* x x))
   (* (* z y) (* -4.0 z))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * z) <= 1e+299) {
		tmp = fma(((z * z) - t), (-4.0 * y), (x * x));
	} else {
		tmp = (z * y) * (-4.0 * z);
	}
	return tmp;
}
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(z * z) <= 1e+299)
		tmp = fma(Float64(Float64(z * z) - t), Float64(-4.0 * y), Float64(x * x));
	else
		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+299], N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(-4.0 * y), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+299}:\\
\;\;\;\;\mathsf{fma}\left(z \cdot z - t, -4 \cdot y, x \cdot x\right)\\

\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 z z) < 1.0000000000000001e299

    1. Initial program 96.3%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
      2. sub-negN/A

        \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
      3. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) + x \cdot x} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) + x \cdot x \]
      5. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) + x \cdot x \]
      6. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(z \cdot z - t\right) \cdot \left(\mathsf{neg}\left(y \cdot 4\right)\right)} + x \cdot x \]
      7. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot z - t, \mathsf{neg}\left(y \cdot 4\right), x \cdot x\right)} \]
      8. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \mathsf{neg}\left(\color{blue}{y \cdot 4}\right), x \cdot x\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \mathsf{neg}\left(\color{blue}{4 \cdot y}\right), x \cdot x\right) \]
      10. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot y}, x \cdot x\right) \]
      11. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot y}, x \cdot x\right) \]
      12. metadata-eval99.4

        \[\leadsto \mathsf{fma}\left(z \cdot z - t, \color{blue}{-4} \cdot y, x \cdot x\right) \]
    4. Applied rewrites99.4%

      \[\leadsto \color{blue}{\mathsf{fma}\left(z \cdot z - t, -4 \cdot y, x \cdot x\right)} \]

    if 1.0000000000000001e299 < (*.f64 z z)

    1. Initial program 67.8%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf

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

        \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
      3. *-commutativeN/A

        \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
      4. lower-*.f64N/A

        \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
      5. unpow2N/A

        \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
      6. lower-*.f6481.4

        \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
    5. Applied rewrites81.4%

      \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
    6. Step-by-step derivation
      1. Applied rewrites92.6%

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

    Alternative 2: 62.1% accurate, 0.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-322}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+81}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t)
     :precision binary64
     (if (<= (* z z) 2e-322)
       (* (* t 4.0) y)
       (if (<= (* z z) 2e+81) (* x x) (* (* z y) (* -4.0 z)))))
    double code(double x, double y, double z, double t) {
    	double tmp;
    	if ((z * z) <= 2e-322) {
    		tmp = (t * 4.0) * y;
    	} else if ((z * z) <= 2e+81) {
    		tmp = x * x;
    	} else {
    		tmp = (z * y) * (-4.0 * z);
    	}
    	return tmp;
    }
    
    real(8) function code(x, y, z, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8) :: tmp
        if ((z * z) <= 2d-322) then
            tmp = (t * 4.0d0) * y
        else if ((z * z) <= 2d+81) then
            tmp = x * x
        else
            tmp = (z * y) * ((-4.0d0) * z)
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t) {
    	double tmp;
    	if ((z * z) <= 2e-322) {
    		tmp = (t * 4.0) * y;
    	} else if ((z * z) <= 2e+81) {
    		tmp = x * x;
    	} else {
    		tmp = (z * y) * (-4.0 * z);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t):
    	tmp = 0
    	if (z * z) <= 2e-322:
    		tmp = (t * 4.0) * y
    	elif (z * z) <= 2e+81:
    		tmp = x * x
    	else:
    		tmp = (z * y) * (-4.0 * z)
    	return tmp
    
    function code(x, y, z, t)
    	tmp = 0.0
    	if (Float64(z * z) <= 2e-322)
    		tmp = Float64(Float64(t * 4.0) * y);
    	elseif (Float64(z * z) <= 2e+81)
    		tmp = Float64(x * x);
    	else
    		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t)
    	tmp = 0.0;
    	if ((z * z) <= 2e-322)
    		tmp = (t * 4.0) * y;
    	elseif ((z * z) <= 2e+81)
    		tmp = x * x;
    	else
    		tmp = (z * y) * (-4.0 * z);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e-322], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 2e+81], N[(x * x), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-322}:\\
    \;\;\;\;\left(t \cdot 4\right) \cdot y\\
    
    \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+81}:\\
    \;\;\;\;x \cdot x\\
    
    \mathbf{else}:\\
    \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 z z) < 1.97626e-322

      1. Initial program 98.5%

        \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
      2. Add Preprocessing
      3. Taylor expanded in t around inf

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

          \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
        2. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
        3. lower-*.f6458.1

          \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
      5. Applied rewrites58.1%

        \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
      6. Step-by-step derivation
        1. Applied rewrites58.1%

          \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]

        if 1.97626e-322 < (*.f64 z z) < 1.99999999999999984e81

        1. Initial program 96.0%

          \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift--.f64N/A

            \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
          2. sub-negN/A

            \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
          3. lift-*.f64N/A

            \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
          4. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
          5. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
          7. lift-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
          8. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
          9. distribute-rgt-neg-inN/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
          10. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
          11. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
          12. metadata-eval96.0

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
        4. Applied rewrites96.0%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
        5. Taylor expanded in z around 0

          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
        6. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
          2. lower-neg.f6489.3

            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
        7. Applied rewrites89.3%

          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
        8. Taylor expanded in t around inf

          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
        9. Step-by-step derivation
          1. distribute-lft-inN/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
          3. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
          6. distribute-lft-outN/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
          7. +-commutativeN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
          8. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
          9. sub-negN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
          10. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
          11. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
          12. sub-negN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
          13. unpow2N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
          14. associate-/l*N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
          15. metadata-evalN/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
          16. lower-fma.f64N/A

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
          17. lower-/.f6492.9

            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
        10. Applied rewrites92.9%

          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
        11. Taylor expanded in x around inf

          \[\leadsto \color{blue}{{x}^{2}} \]
        12. Step-by-step derivation
          1. unpow2N/A

            \[\leadsto \color{blue}{x \cdot x} \]
          2. lower-*.f6464.2

            \[\leadsto \color{blue}{x \cdot x} \]
        13. Applied rewrites64.2%

          \[\leadsto \color{blue}{x \cdot x} \]

        if 1.99999999999999984e81 < (*.f64 z z)

        1. Initial program 77.9%

          \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
        2. Add Preprocessing
        3. Taylor expanded in z around inf

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

            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
          2. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
          3. *-commutativeN/A

            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
          4. lower-*.f64N/A

            \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
          5. unpow2N/A

            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
          6. lower-*.f6472.4

            \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
        5. Applied rewrites72.4%

          \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
        6. Step-by-step derivation
          1. Applied rewrites79.2%

            \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{\left(-4 \cdot z\right)} \]
        7. Recombined 3 regimes into one program.
        8. Add Preprocessing

        Alternative 3: 95.6% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+299}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
        (FPCore (x y z t)
         :precision binary64
         (if (<= (* z z) 1e+299)
           (fma x x (* (* (- (* z z) t) y) -4.0))
           (* (* z y) (* -4.0 z))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if ((z * z) <= 1e+299) {
        		tmp = fma(x, x, ((((z * z) - t) * y) * -4.0));
        	} else {
        		tmp = (z * y) * (-4.0 * z);
        	}
        	return tmp;
        }
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (Float64(z * z) <= 1e+299)
        		tmp = fma(x, x, Float64(Float64(Float64(Float64(z * z) - t) * y) * -4.0));
        	else
        		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+299], N[(x * x + N[(N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \cdot z \leq 10^{+299}:\\
        \;\;\;\;\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 z z) < 1.0000000000000001e299

          1. Initial program 96.3%

            \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
            2. sub-negN/A

              \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
            3. lift-*.f64N/A

              \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
            4. lower-fma.f64N/A

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
            5. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
            6. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
            7. lift-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
            8. associate-*r*N/A

              \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
            9. distribute-rgt-neg-inN/A

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
            10. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
            11. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
            12. metadata-eval96.8

              \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
          4. Applied rewrites96.8%

            \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]

          if 1.0000000000000001e299 < (*.f64 z z)

          1. Initial program 67.8%

            \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
          2. Add Preprocessing
          3. Taylor expanded in z around inf

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

              \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
            2. lower-*.f64N/A

              \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
            3. *-commutativeN/A

              \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
            4. lower-*.f64N/A

              \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
            5. unpow2N/A

              \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
            6. lower-*.f6481.4

              \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
          5. Applied rewrites81.4%

            \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
          6. Step-by-step derivation
            1. Applied rewrites92.6%

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

          Alternative 4: 79.2% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 6.6 \cdot 10^{+34}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+189}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot z\right) \cdot z, -4, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t)
           :precision binary64
           (if (<= z 6.6e+34)
             (fma x x (* (* y t) 4.0))
             (if (<= z 4e+189) (fma (* (* y z) z) -4.0 (* x x)) (* (* z y) (* -4.0 z)))))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= 6.6e+34) {
          		tmp = fma(x, x, ((y * t) * 4.0));
          	} else if (z <= 4e+189) {
          		tmp = fma(((y * z) * z), -4.0, (x * x));
          	} else {
          		tmp = (z * y) * (-4.0 * z);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (z <= 6.6e+34)
          		tmp = fma(x, x, Float64(Float64(y * t) * 4.0));
          	elseif (z <= 4e+189)
          		tmp = fma(Float64(Float64(y * z) * z), -4.0, Float64(x * x));
          	else
          		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[z, 6.6e+34], N[(x * x + N[(N[(y * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4e+189], N[(N[(N[(y * z), $MachinePrecision] * z), $MachinePrecision] * -4.0 + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq 6.6 \cdot 10^{+34}:\\
          \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\
          
          \mathbf{elif}\;z \leq 4 \cdot 10^{+189}:\\
          \;\;\;\;\mathsf{fma}\left(\left(y \cdot z\right) \cdot z, -4, x \cdot x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < 6.59999999999999976e34

            1. Initial program 92.0%

              \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift--.f64N/A

                \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
              2. sub-negN/A

                \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
              3. lift-*.f64N/A

                \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
              4. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
              5. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
              7. lift-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
              8. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
              9. distribute-rgt-neg-inN/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
              10. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
              11. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
              12. metadata-eval94.6

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
            4. Applied rewrites94.6%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
            5. Taylor expanded in z around 0

              \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
            6. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
              2. lower-neg.f6478.1

                \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
            7. Applied rewrites78.1%

              \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
            8. Taylor expanded in t around inf

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
            9. Step-by-step derivation
              1. distribute-lft-inN/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
              3. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
              4. associate-/l*N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
              5. associate-*r*N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
              6. distribute-lft-outN/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
              7. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
              8. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
              9. sub-negN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
              10. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
              11. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
              12. sub-negN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
              13. unpow2N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
              14. associate-/l*N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
              15. metadata-evalN/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
              16. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
              17. lower-/.f6491.7

                \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
            10. Applied rewrites91.7%

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
            11. Taylor expanded in z around 0

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{4 \cdot \left(t \cdot y\right)}\right) \]
            12. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
              2. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
              4. lower-*.f6478.1

                \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
            13. Applied rewrites78.1%

              \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right) \cdot 4}\right) \]

            if 6.59999999999999976e34 < z < 4.0000000000000001e189

            1. Initial program 85.1%

              \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
            2. Add Preprocessing
            3. Taylor expanded in t around 0

              \[\leadsto \color{blue}{{x}^{2} - 4 \cdot \left(y \cdot {z}^{2}\right)} \]
            4. Step-by-step derivation
              1. cancel-sign-sub-invN/A

                \[\leadsto \color{blue}{{x}^{2} + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(y \cdot {z}^{2}\right)} \]
              2. metadata-evalN/A

                \[\leadsto {x}^{2} + \color{blue}{-4} \cdot \left(y \cdot {z}^{2}\right) \]
              3. +-commutativeN/A

                \[\leadsto \color{blue}{-4 \cdot \left(y \cdot {z}^{2}\right) + {x}^{2}} \]
              4. *-commutativeN/A

                \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} + {x}^{2} \]
              5. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot {z}^{2}, -4, {x}^{2}\right)} \]
              6. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{{z}^{2} \cdot y}, -4, {x}^{2}\right) \]
              7. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{{z}^{2} \cdot y}, -4, {x}^{2}\right) \]
              8. unpow2N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(z \cdot z\right)} \cdot y, -4, {x}^{2}\right) \]
              9. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{\left(z \cdot z\right)} \cdot y, -4, {x}^{2}\right) \]
              10. unpow2N/A

                \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, \color{blue}{x \cdot x}\right) \]
              11. lower-*.f6470.5

                \[\leadsto \mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, \color{blue}{x \cdot x}\right) \]
            5. Applied rewrites70.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(\left(z \cdot z\right) \cdot y, -4, x \cdot x\right)} \]
            6. Step-by-step derivation
              1. Applied rewrites82.3%

                \[\leadsto \mathsf{fma}\left(\left(y \cdot z\right) \cdot z, -4, x \cdot x\right) \]

              if 4.0000000000000001e189 < z

              1. Initial program 71.9%

                \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
              2. Add Preprocessing
              3. Taylor expanded in z around inf

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

                  \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                2. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                3. *-commutativeN/A

                  \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                4. lower-*.f64N/A

                  \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                5. unpow2N/A

                  \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                6. lower-*.f6489.8

                  \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
              5. Applied rewrites89.8%

                \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
              6. Step-by-step derivation
                1. Applied rewrites96.4%

                  \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{\left(-4 \cdot z\right)} \]
              7. Recombined 3 regimes into one program.
              8. Add Preprocessing

              Alternative 5: 77.0% accurate, 0.9× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 1.3 \cdot 10^{+29}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\ \mathbf{elif}\;z \leq 7.6 \cdot 10^{+129}:\\ \;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
              (FPCore (x y z t)
               :precision binary64
               (if (<= z 1.3e+29)
                 (fma x x (* (* y t) 4.0))
                 (if (<= z 7.6e+129) (* (* (- (* z z) t) y) -4.0) (* (* z y) (* -4.0 z)))))
              double code(double x, double y, double z, double t) {
              	double tmp;
              	if (z <= 1.3e+29) {
              		tmp = fma(x, x, ((y * t) * 4.0));
              	} else if (z <= 7.6e+129) {
              		tmp = (((z * z) - t) * y) * -4.0;
              	} else {
              		tmp = (z * y) * (-4.0 * z);
              	}
              	return tmp;
              }
              
              function code(x, y, z, t)
              	tmp = 0.0
              	if (z <= 1.3e+29)
              		tmp = fma(x, x, Float64(Float64(y * t) * 4.0));
              	elseif (z <= 7.6e+129)
              		tmp = Float64(Float64(Float64(Float64(z * z) - t) * y) * -4.0);
              	else
              		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
              	end
              	return tmp
              end
              
              code[x_, y_, z_, t_] := If[LessEqual[z, 1.3e+29], N[(x * x + N[(N[(y * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+129], N[(N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq 1.3 \cdot 10^{+29}:\\
              \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\
              
              \mathbf{elif}\;z \leq 7.6 \cdot 10^{+129}:\\
              \;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\
              
              \mathbf{else}:\\
              \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 3 regimes
              2. if z < 1.3e29

                1. Initial program 91.9%

                  \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                2. Add Preprocessing
                3. Step-by-step derivation
                  1. lift--.f64N/A

                    \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                  2. sub-negN/A

                    \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                  3. lift-*.f64N/A

                    \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
                  4. lower-fma.f64N/A

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                  5. lift-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
                  7. lift-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
                  8. associate-*r*N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
                  9. distribute-rgt-neg-inN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                  10. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                  11. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
                  12. metadata-eval94.5

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
                4. Applied rewrites94.5%

                  \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
                5. Taylor expanded in z around 0

                  \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
                6. Step-by-step derivation
                  1. mul-1-negN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
                  2. lower-neg.f6477.8

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                7. Applied rewrites77.8%

                  \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                8. Taylor expanded in t around inf

                  \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                9. Step-by-step derivation
                  1. distribute-lft-inN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                  3. associate-*r*N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                  4. associate-/l*N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
                  5. associate-*r*N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
                  6. distribute-lft-outN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                  7. +-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
                  8. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
                  9. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
                  10. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
                  11. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
                  12. sub-negN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
                  13. unpow2N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                  14. associate-/l*N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                  15. metadata-evalN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
                  16. lower-fma.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
                  17. lower-/.f6491.6

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
                10. Applied rewrites91.6%

                  \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
                11. Taylor expanded in z around 0

                  \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{4 \cdot \left(t \cdot y\right)}\right) \]
                12. Step-by-step derivation
                  1. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
                  2. lower-*.f64N/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
                  4. lower-*.f6477.8

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
                13. Applied rewrites77.8%

                  \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right) \cdot 4}\right) \]

                if 1.3e29 < z < 7.60000000000000011e129

                1. Initial program 99.9%

                  \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                2. Add Preprocessing
                3. Taylor expanded in x around 0

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

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

                    \[\leadsto \color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot -4} \]
                  3. *-commutativeN/A

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

                    \[\leadsto \color{blue}{\left(\left({z}^{2} - t\right) \cdot y\right)} \cdot -4 \]
                  5. lower--.f64N/A

                    \[\leadsto \left(\color{blue}{\left({z}^{2} - t\right)} \cdot y\right) \cdot -4 \]
                  6. unpow2N/A

                    \[\leadsto \left(\left(\color{blue}{z \cdot z} - t\right) \cdot y\right) \cdot -4 \]
                  7. lower-*.f6490.6

                    \[\leadsto \left(\left(\color{blue}{z \cdot z} - t\right) \cdot y\right) \cdot -4 \]
                5. Applied rewrites90.6%

                  \[\leadsto \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4} \]

                if 7.60000000000000011e129 < z

                1. Initial program 67.4%

                  \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                2. Add Preprocessing
                3. Taylor expanded in z around inf

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

                    \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                  2. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                  3. *-commutativeN/A

                    \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                  4. lower-*.f64N/A

                    \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                  5. unpow2N/A

                    \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                  6. lower-*.f6477.6

                    \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                5. Applied rewrites77.6%

                  \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                6. Step-by-step derivation
                  1. Applied rewrites87.4%

                    \[\leadsto \left(z \cdot y\right) \cdot \color{blue}{\left(-4 \cdot z\right)} \]
                7. Recombined 3 regimes into one program.
                8. Add Preprocessing

                Alternative 6: 85.2% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+132}:\\ \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
                (FPCore (x y z t)
                 :precision binary64
                 (if (<= (* z z) 2e+132) (fma x x (* (* y t) 4.0)) (* (* z y) (* -4.0 z))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if ((z * z) <= 2e+132) {
                		tmp = fma(x, x, ((y * t) * 4.0));
                	} else {
                		tmp = (z * y) * (-4.0 * z);
                	}
                	return tmp;
                }
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (Float64(z * z) <= 2e+132)
                		tmp = fma(x, x, Float64(Float64(y * t) * 4.0));
                	else
                		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+132], N[(x * x + N[(N[(y * t), $MachinePrecision] * 4.0), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+132}:\\
                \;\;\;\;\mathsf{fma}\left(x, x, \left(y \cdot t\right) \cdot 4\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if (*.f64 z z) < 1.99999999999999998e132

                  1. Initial program 97.4%

                    \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                  2. Add Preprocessing
                  3. Step-by-step derivation
                    1. lift--.f64N/A

                      \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                    2. sub-negN/A

                      \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                    3. lift-*.f64N/A

                      \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
                    4. lower-fma.f64N/A

                      \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                    5. lift-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
                    6. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
                    7. lift-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
                    8. associate-*r*N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
                    9. distribute-rgt-neg-inN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                    10. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
                    12. metadata-eval97.4

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
                  4. Applied rewrites97.4%

                    \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
                  5. Taylor expanded in z around 0

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
                  6. Step-by-step derivation
                    1. mul-1-negN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
                    2. lower-neg.f6491.2

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                  7. Applied rewrites91.2%

                    \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                  8. Taylor expanded in t around inf

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                  9. Step-by-step derivation
                    1. distribute-lft-inN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                    3. associate-*r*N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                    4. associate-/l*N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
                    5. associate-*r*N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
                    6. distribute-lft-outN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                    7. +-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
                    8. metadata-evalN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
                    9. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
                    10. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
                    11. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
                    12. sub-negN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
                    13. unpow2N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                    14. associate-/l*N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                    15. metadata-evalN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
                    16. lower-fma.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
                    17. lower-/.f6495.9

                      \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
                  10. Applied rewrites95.9%

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
                  11. Taylor expanded in z around 0

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{4 \cdot \left(t \cdot y\right)}\right) \]
                  12. Step-by-step derivation
                    1. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
                    2. lower-*.f64N/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot y\right) \cdot 4}\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
                    4. lower-*.f6491.2

                      \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right)} \cdot 4\right) \]
                  13. Applied rewrites91.2%

                    \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(y \cdot t\right) \cdot 4}\right) \]

                  if 1.99999999999999998e132 < (*.f64 z z)

                  1. Initial program 75.2%

                    \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around inf

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

                      \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                    2. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                    3. *-commutativeN/A

                      \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                    4. lower-*.f64N/A

                      \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                    5. unpow2N/A

                      \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                    6. lower-*.f6476.0

                      \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                  5. Applied rewrites76.0%

                    \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                  6. Step-by-step derivation
                    1. Applied rewrites83.6%

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

                  Alternative 7: 84.8% accurate, 1.0× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+132}:\\ \;\;\;\;\mathsf{fma}\left(t \cdot y, 4, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\ \end{array} \end{array} \]
                  (FPCore (x y z t)
                   :precision binary64
                   (if (<= (* z z) 2e+132) (fma (* t y) 4.0 (* x x)) (* (* z y) (* -4.0 z))))
                  double code(double x, double y, double z, double t) {
                  	double tmp;
                  	if ((z * z) <= 2e+132) {
                  		tmp = fma((t * y), 4.0, (x * x));
                  	} else {
                  		tmp = (z * y) * (-4.0 * z);
                  	}
                  	return tmp;
                  }
                  
                  function code(x, y, z, t)
                  	tmp = 0.0
                  	if (Float64(z * z) <= 2e+132)
                  		tmp = fma(Float64(t * y), 4.0, Float64(x * x));
                  	else
                  		tmp = Float64(Float64(z * y) * Float64(-4.0 * z));
                  	end
                  	return tmp
                  end
                  
                  code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+132], N[(N[(t * y), $MachinePrecision] * 4.0 + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+132}:\\
                  \;\;\;\;\mathsf{fma}\left(t \cdot y, 4, x \cdot x\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left(z \cdot y\right) \cdot \left(-4 \cdot z\right)\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if (*.f64 z z) < 1.99999999999999998e132

                    1. Initial program 97.4%

                      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around 0

                      \[\leadsto \color{blue}{{x}^{2} - -4 \cdot \left(t \cdot y\right)} \]
                    4. Step-by-step derivation
                      1. cancel-sign-sub-invN/A

                        \[\leadsto \color{blue}{{x}^{2} + \left(\mathsf{neg}\left(-4\right)\right) \cdot \left(t \cdot y\right)} \]
                      2. metadata-evalN/A

                        \[\leadsto {x}^{2} + \color{blue}{4} \cdot \left(t \cdot y\right) \]
                      3. +-commutativeN/A

                        \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right) + {x}^{2}} \]
                      4. *-commutativeN/A

                        \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} + {x}^{2} \]
                      5. lower-fma.f64N/A

                        \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot y, 4, {x}^{2}\right)} \]
                      6. lower-*.f64N/A

                        \[\leadsto \mathsf{fma}\left(\color{blue}{t \cdot y}, 4, {x}^{2}\right) \]
                      7. unpow2N/A

                        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, \color{blue}{x \cdot x}\right) \]
                      8. lower-*.f6491.2

                        \[\leadsto \mathsf{fma}\left(t \cdot y, 4, \color{blue}{x \cdot x}\right) \]
                    5. Applied rewrites91.2%

                      \[\leadsto \color{blue}{\mathsf{fma}\left(t \cdot y, 4, x \cdot x\right)} \]

                    if 1.99999999999999998e132 < (*.f64 z z)

                    1. Initial program 75.2%

                      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around inf

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

                        \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                      2. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left(y \cdot {z}^{2}\right) \cdot -4} \]
                      3. *-commutativeN/A

                        \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                      4. lower-*.f64N/A

                        \[\leadsto \color{blue}{\left({z}^{2} \cdot y\right)} \cdot -4 \]
                      5. unpow2N/A

                        \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                      6. lower-*.f6476.0

                        \[\leadsto \left(\color{blue}{\left(z \cdot z\right)} \cdot y\right) \cdot -4 \]
                    5. Applied rewrites76.0%

                      \[\leadsto \color{blue}{\left(\left(z \cdot z\right) \cdot y\right) \cdot -4} \]
                    6. Step-by-step derivation
                      1. Applied rewrites83.6%

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

                    Alternative 8: 58.0% accurate, 1.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-151}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
                    (FPCore (x y z t)
                     :precision binary64
                     (if (<= (* x x) 5e-151) (* (* t 4.0) y) (* x x)))
                    double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if ((x * x) <= 5e-151) {
                    		tmp = (t * 4.0) * y;
                    	} else {
                    		tmp = x * x;
                    	}
                    	return tmp;
                    }
                    
                    real(8) function code(x, y, z, t)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8) :: tmp
                        if ((x * x) <= 5d-151) then
                            tmp = (t * 4.0d0) * y
                        else
                            tmp = x * x
                        end if
                        code = tmp
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	double tmp;
                    	if ((x * x) <= 5e-151) {
                    		tmp = (t * 4.0) * y;
                    	} else {
                    		tmp = x * x;
                    	}
                    	return tmp;
                    }
                    
                    def code(x, y, z, t):
                    	tmp = 0
                    	if (x * x) <= 5e-151:
                    		tmp = (t * 4.0) * y
                    	else:
                    		tmp = x * x
                    	return tmp
                    
                    function code(x, y, z, t)
                    	tmp = 0.0
                    	if (Float64(x * x) <= 5e-151)
                    		tmp = Float64(Float64(t * 4.0) * y);
                    	else
                    		tmp = Float64(x * x);
                    	end
                    	return tmp
                    end
                    
                    function tmp_2 = code(x, y, z, t)
                    	tmp = 0.0;
                    	if ((x * x) <= 5e-151)
                    		tmp = (t * 4.0) * y;
                    	else
                    		tmp = x * x;
                    	end
                    	tmp_2 = tmp;
                    end
                    
                    code[x_, y_, z_, t_] := If[LessEqual[N[(x * x), $MachinePrecision], 5e-151], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], N[(x * x), $MachinePrecision]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;x \cdot x \leq 5 \cdot 10^{-151}:\\
                    \;\;\;\;\left(t \cdot 4\right) \cdot y\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x \cdot x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if (*.f64 x x) < 5.00000000000000003e-151

                      1. Initial program 95.4%

                        \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                      2. Add Preprocessing
                      3. Taylor expanded in t around inf

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

                          \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                        2. lower-*.f64N/A

                          \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                        3. lower-*.f6454.0

                          \[\leadsto \color{blue}{\left(t \cdot y\right)} \cdot 4 \]
                      5. Applied rewrites54.0%

                        \[\leadsto \color{blue}{\left(t \cdot y\right) \cdot 4} \]
                      6. Step-by-step derivation
                        1. Applied rewrites54.0%

                          \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]

                        if 5.00000000000000003e-151 < (*.f64 x x)

                        1. Initial program 84.5%

                          \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                        2. Add Preprocessing
                        3. Step-by-step derivation
                          1. lift--.f64N/A

                            \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                          2. sub-negN/A

                            \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                          3. lift-*.f64N/A

                            \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
                          4. lower-fma.f64N/A

                            \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                          5. lift-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
                          6. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
                          7. lift-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
                          8. associate-*r*N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
                          9. distribute-rgt-neg-inN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                          10. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                          11. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
                          12. metadata-eval91.1

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
                        4. Applied rewrites91.1%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
                        5. Taylor expanded in z around 0

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
                        6. Step-by-step derivation
                          1. mul-1-negN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
                          2. lower-neg.f6473.8

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                        7. Applied rewrites73.8%

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                        8. Taylor expanded in t around inf

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                        9. Step-by-step derivation
                          1. distribute-lft-inN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
                          2. *-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                          3. associate-*r*N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                          4. associate-/l*N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
                          5. associate-*r*N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
                          6. distribute-lft-outN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                          7. +-commutativeN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
                          8. metadata-evalN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
                          9. sub-negN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
                          10. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
                          11. lower-*.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
                          12. sub-negN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
                          13. unpow2N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                          14. associate-/l*N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                          15. metadata-evalN/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
                          16. lower-fma.f64N/A

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
                          17. lower-/.f6487.1

                            \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
                        10. Applied rewrites87.1%

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
                        11. Taylor expanded in x around inf

                          \[\leadsto \color{blue}{{x}^{2}} \]
                        12. Step-by-step derivation
                          1. unpow2N/A

                            \[\leadsto \color{blue}{x \cdot x} \]
                          2. lower-*.f6462.4

                            \[\leadsto \color{blue}{x \cdot x} \]
                        13. Applied rewrites62.4%

                          \[\leadsto \color{blue}{x \cdot x} \]
                      7. Recombined 2 regimes into one program.
                      8. Add Preprocessing

                      Alternative 9: 42.2% accurate, 4.5× speedup?

                      \[\begin{array}{l} \\ x \cdot x \end{array} \]
                      (FPCore (x y z t) :precision binary64 (* x x))
                      double code(double x, double y, double z, double t) {
                      	return x * x;
                      }
                      
                      real(8) function code(x, y, z, t)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          code = x * x
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return x * x;
                      }
                      
                      def code(x, y, z, t):
                      	return x * x
                      
                      function code(x, y, z, t)
                      	return Float64(x * x)
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = x * x;
                      end
                      
                      code[x_, y_, z_, t_] := N[(x * x), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      x \cdot x
                      \end{array}
                      
                      Derivation
                      1. Initial program 88.9%

                        \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
                      2. Add Preprocessing
                      3. Step-by-step derivation
                        1. lift--.f64N/A

                          \[\leadsto \color{blue}{x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                        2. sub-negN/A

                          \[\leadsto \color{blue}{x \cdot x + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                        3. lift-*.f64N/A

                          \[\leadsto \color{blue}{x \cdot x} + \left(\mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right) \]
                        4. lower-fma.f64N/A

                          \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)\right)} \]
                        5. lift-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
                        6. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot 4\right)}\right)\right) \]
                        7. lift-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\left(z \cdot z - t\right) \cdot \color{blue}{\left(y \cdot 4\right)}\right)\right) \]
                        8. associate-*r*N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot 4}\right)\right) \]
                        9. distribute-rgt-neg-inN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                        10. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right) \cdot \left(\mathsf{neg}\left(4\right)\right)}\right) \]
                        11. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(z \cdot z - t\right) \cdot y\right)} \cdot \left(\mathsf{neg}\left(4\right)\right)\right) \]
                        12. metadata-eval92.8

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot \color{blue}{-4}\right) \]
                      4. Applied rewrites92.8%

                        \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, \left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \]
                      5. Taylor expanded in z around 0

                        \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-1 \cdot t\right)} \cdot y\right) \cdot -4\right) \]
                      6. Step-by-step derivation
                        1. mul-1-negN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(\mathsf{neg}\left(t\right)\right)} \cdot y\right) \cdot -4\right) \]
                        2. lower-neg.f6466.6

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                      7. Applied rewrites66.6%

                        \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(-t\right)} \cdot y\right) \cdot -4\right) \]
                      8. Taylor expanded in t around inf

                        \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y + \frac{y \cdot {z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                      9. Step-by-step derivation
                        1. distribute-lft-inN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(t \cdot \left(-1 \cdot y\right) + t \cdot \frac{y \cdot {z}^{2}}{t}\right)} \cdot -4\right) \]
                        2. *-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(t \cdot \color{blue}{\left(y \cdot -1\right)} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                        3. associate-*r*N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right) \cdot -1} + t \cdot \frac{y \cdot {z}^{2}}{t}\right) \cdot -4\right) \]
                        4. associate-/l*N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + t \cdot \color{blue}{\left(y \cdot \frac{{z}^{2}}{t}\right)}\right) \cdot -4\right) \]
                        5. associate-*r*N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot -1 + \color{blue}{\left(t \cdot y\right) \cdot \frac{{z}^{2}}{t}}\right) \cdot -4\right) \]
                        6. distribute-lft-outN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(-1 + \frac{{z}^{2}}{t}\right)\right)} \cdot -4\right) \]
                        7. +-commutativeN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + -1\right)}\right) \cdot -4\right) \]
                        8. metadata-evalN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)}\right)\right) \cdot -4\right) \]
                        9. sub-negN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} - 1\right)}\right) \cdot -4\right) \]
                        10. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right)} \cdot -4\right) \]
                        11. lower-*.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\color{blue}{\left(t \cdot y\right)} \cdot \left(\frac{{z}^{2}}{t} - 1\right)\right) \cdot -4\right) \]
                        12. sub-negN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\left(\frac{{z}^{2}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)}\right) \cdot -4\right) \]
                        13. unpow2N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\frac{\color{blue}{z \cdot z}}{t} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                        14. associate-/l*N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(\color{blue}{z \cdot \frac{z}{t}} + \left(\mathsf{neg}\left(1\right)\right)\right)\right) \cdot -4\right) \]
                        15. metadata-evalN/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \left(z \cdot \frac{z}{t} + \color{blue}{-1}\right)\right) \cdot -4\right) \]
                        16. lower-fma.f64N/A

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \color{blue}{\mathsf{fma}\left(z, \frac{z}{t}, -1\right)}\right) \cdot -4\right) \]
                        17. lower-/.f6489.4

                          \[\leadsto \mathsf{fma}\left(x, x, \left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \color{blue}{\frac{z}{t}}, -1\right)\right) \cdot -4\right) \]
                      10. Applied rewrites89.4%

                        \[\leadsto \mathsf{fma}\left(x, x, \color{blue}{\left(\left(t \cdot y\right) \cdot \mathsf{fma}\left(z, \frac{z}{t}, -1\right)\right)} \cdot -4\right) \]
                      11. Taylor expanded in x around inf

                        \[\leadsto \color{blue}{{x}^{2}} \]
                      12. Step-by-step derivation
                        1. unpow2N/A

                          \[\leadsto \color{blue}{x \cdot x} \]
                        2. lower-*.f6440.8

                          \[\leadsto \color{blue}{x \cdot x} \]
                      13. Applied rewrites40.8%

                        \[\leadsto \color{blue}{x \cdot x} \]
                      14. Add Preprocessing

                      Developer Target 1: 90.7% accurate, 1.0× speedup?

                      \[\begin{array}{l} \\ x \cdot x - 4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right) \end{array} \]
                      (FPCore (x y z t) :precision binary64 (- (* x x) (* 4.0 (* y (- (* z z) t)))))
                      double code(double x, double y, double z, double t) {
                      	return (x * x) - (4.0 * (y * ((z * z) - t)));
                      }
                      
                      real(8) function code(x, y, z, t)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          real(8), intent (in) :: t
                          code = (x * x) - (4.0d0 * (y * ((z * z) - t)))
                      end function
                      
                      public static double code(double x, double y, double z, double t) {
                      	return (x * x) - (4.0 * (y * ((z * z) - t)));
                      }
                      
                      def code(x, y, z, t):
                      	return (x * x) - (4.0 * (y * ((z * z) - t)))
                      
                      function code(x, y, z, t)
                      	return Float64(Float64(x * x) - Float64(4.0 * Float64(y * Float64(Float64(z * z) - t))))
                      end
                      
                      function tmp = code(x, y, z, t)
                      	tmp = (x * x) - (4.0 * (y * ((z * z) - t)));
                      end
                      
                      code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(4.0 * N[(y * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                      
                      \begin{array}{l}
                      
                      \\
                      x \cdot x - 4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right)
                      \end{array}
                      

                      Reproduce

                      ?
                      herbie shell --seed 2024296 
                      (FPCore (x y z t)
                        :name "Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B"
                        :precision binary64
                      
                        :alt
                        (! :herbie-platform default (- (* x x) (* 4 (* y (- (* z z) t)))))
                      
                        (- (* x x) (* (* y 4.0) (- (* z z) t))))