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

Percentage Accurate: 90.7% → 97.2%
Time: 8.2s
Alternatives: 10
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 10 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.7% 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: 97.2% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, x, \frac{y \cdot -4}{\frac{-1}{t}}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (*.f64 x x) (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t))) < +inf.0

    1. Initial program 95.7%

      \[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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
      2. lift--.f64N/A

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

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

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

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

        \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      7. associate-*r*N/A

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

        \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (-.f64 (*.f64 x x) (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)))

    1. Initial program 0.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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
      2. lift--.f64N/A

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

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

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

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

        \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      7. associate-*r*N/A

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

        \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x \cdot x - \color{blue}{\frac{4 \cdot y}{\frac{1}{z \cdot z - t}}} \]
    6. Taylor expanded in z around 0

      \[\leadsto x \cdot x - \frac{4 \cdot y}{\color{blue}{\frac{-1}{t}}} \]
    7. Step-by-step derivation
      1. lower-/.f6466.7

        \[\leadsto x \cdot x - \frac{4 \cdot y}{\color{blue}{\frac{-1}{t}}} \]
    8. Applied rewrites66.7%

      \[\leadsto x \cdot x - \frac{4 \cdot y}{\color{blue}{\frac{-1}{t}}} \]
    9. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{x \cdot x - \frac{4 \cdot y}{\frac{-1}{t}}} \]
      2. sub-negN/A

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\frac{4 \cdot y}{\frac{-1}{t}}}\right)\right) \]
      6. distribute-neg-fracN/A

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

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

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

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

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

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

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

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

Alternative 2: 88.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{-37}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\right)\\ \mathbf{elif}\;z \cdot z \leq 10^{+57}:\\ \;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\ \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\mathsf{fma}\left(\left(z \cdot z\right) \cdot -4, 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-37)
   (- (* x x) (* (* y 4.0) (- t)))
   (if (<= (* z z) 1e+57)
     (* (* (- (* z z) t) y) -4.0)
     (if (<= (* z z) 2e+297)
       (fma (* (* z z) -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-37) {
		tmp = (x * x) - ((y * 4.0) * -t);
	} else if ((z * z) <= 1e+57) {
		tmp = (((z * z) - t) * y) * -4.0;
	} else if ((z * z) <= 2e+297) {
		tmp = fma(((z * z) * -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-37)
		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(-t)));
	elseif (Float64(z * z) <= 1e+57)
		tmp = Float64(Float64(Float64(Float64(z * z) - t) * y) * -4.0);
	elseif (Float64(z * z) <= 2e+297)
		tmp = fma(Float64(Float64(z * z) * -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-37], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 1e+57], N[(N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 2e+297], N[(N[(N[(z * z), $MachinePrecision] * -4.0), $MachinePrecision] * y + 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^{-37}:\\
\;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\right)\\

\mathbf{elif}\;z \cdot z \leq 10^{+57}:\\
\;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\

\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+297}:\\
\;\;\;\;\mathsf{fma}\left(\left(z \cdot z\right) \cdot -4, 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 4 regimes
  2. if (*.f64 z z) < 1.00000000000000007e-37

    1. Initial program 99.1%

      \[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 x \cdot x - \left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

    if 1.00000000000000007e-37 < (*.f64 z z) < 1.00000000000000005e57

    1. Initial program 99.6%

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

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

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

    if 1.00000000000000005e57 < (*.f64 z z) < 2e297

    1. Initial program 95.1%

      \[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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
      2. lift--.f64N/A

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

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

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

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

        \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      7. associate-*r*N/A

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

        \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{x}^{2} - 4 \cdot \left(y \cdot {z}^{2}\right)} \]
    6. 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 -4 \cdot \color{blue}{\left({z}^{2} \cdot y\right)} + {x}^{2} \]
      5. associate-*r*N/A

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

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

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

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

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

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

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

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

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

    if 2e297 < (*.f64 z z)

    1. Initial program 74.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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
      2. lift--.f64N/A

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

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

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

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

        \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      7. associate-*r*N/A

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

        \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
      9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 88.2% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{-37}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\right)\\ \mathbf{elif}\;z \cdot z \leq 10^{+57}:\\ \;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\ \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+297}:\\ \;\;\;\;\mathsf{fma}\left(\left(z \cdot z\right) \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) 1e-37)
       (- (* x x) (* (* y 4.0) (- t)))
       (if (<= (* z z) 1e+57)
         (* (* (- (* z z) t) y) -4.0)
         (if (<= (* z z) 2e+297)
           (fma (* (* z z) 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) <= 1e-37) {
    		tmp = (x * x) - ((y * 4.0) * -t);
    	} else if ((z * z) <= 1e+57) {
    		tmp = (((z * z) - t) * y) * -4.0;
    	} else if ((z * z) <= 2e+297) {
    		tmp = fma(((z * z) * 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) <= 1e-37)
    		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(-t)));
    	elseif (Float64(z * z) <= 1e+57)
    		tmp = Float64(Float64(Float64(Float64(z * z) - t) * y) * -4.0);
    	elseif (Float64(z * z) <= 2e+297)
    		tmp = fma(Float64(Float64(z * z) * 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], 1e-37], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 1e+57], N[(N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 2e+297], N[(N[(N[(z * z), $MachinePrecision] * 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 10^{-37}:\\
    \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\right)\\
    
    \mathbf{elif}\;z \cdot z \leq 10^{+57}:\\
    \;\;\;\;\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\\
    
    \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+297}:\\
    \;\;\;\;\mathsf{fma}\left(\left(z \cdot z\right) \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 4 regimes
    2. if (*.f64 z z) < 1.00000000000000007e-37

      1. Initial program 99.1%

        \[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 x \cdot x - \left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} \]
      4. Step-by-step derivation
        1. mul-1-negN/A

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

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

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

      if 1.00000000000000007e-37 < (*.f64 z z) < 1.00000000000000005e57

      1. Initial program 99.6%

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

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

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

      if 1.00000000000000005e57 < (*.f64 z z) < 2e297

      1. Initial program 95.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-*.f6483.0

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

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

      if 2e297 < (*.f64 z z)

      1. Initial program 74.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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
        2. lift--.f64N/A

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

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

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

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

          \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
        7. associate-*r*N/A

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

          \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
        9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 4: 95.3% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+297}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \mathsf{fma}\left(z, z, -t\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+297)
         (- (* x x) (* (* y 4.0) (fma z z (- t))))
         (* (* z y) (* -4.0 z))))
      double code(double x, double y, double z, double t) {
      	double tmp;
      	if ((z * z) <= 2e+297) {
      		tmp = (x * x) - ((y * 4.0) * fma(z, z, -t));
      	} else {
      		tmp = (z * y) * (-4.0 * z);
      	}
      	return tmp;
      }
      
      function code(x, y, z, t)
      	tmp = 0.0
      	if (Float64(z * z) <= 2e+297)
      		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * fma(z, z, Float64(-t))));
      	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+297], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(z * z + (-t)), $MachinePrecision]), $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^{+297}:\\
      \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \mathsf{fma}\left(z, z, -t\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) < 2e297

        1. Initial program 98.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 x \cdot x - \left(y \cdot 4\right) \cdot \color{blue}{\left(z \cdot z - t\right)} \]
          2. sub-negN/A

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

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

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

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

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

        if 2e297 < (*.f64 z z)

        1. Initial program 74.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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
          2. lift--.f64N/A

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

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

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

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

            \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
          7. associate-*r*N/A

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

            \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
          9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 5: 95.3% accurate, 0.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+297}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\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+297)
           (- (* x x) (* (* y 4.0) (- (* z z) t)))
           (* (* z y) (* -4.0 z))))
        double code(double x, double y, double z, double t) {
        	double tmp;
        	if ((z * z) <= 2e+297) {
        		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
        	} 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+297) then
                tmp = (x * x) - ((y * 4.0d0) * ((z * z) - t))
            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+297) {
        		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
        	} else {
        		tmp = (z * y) * (-4.0 * z);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t):
        	tmp = 0
        	if (z * z) <= 2e+297:
        		tmp = (x * x) - ((y * 4.0) * ((z * z) - t))
        	else:
        		tmp = (z * y) * (-4.0 * z)
        	return tmp
        
        function code(x, y, z, t)
        	tmp = 0.0
        	if (Float64(z * z) <= 2e+297)
        		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)));
        	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+297)
        		tmp = (x * x) - ((y * 4.0) * ((z * z) - t));
        	else
        		tmp = (z * y) * (-4.0 * z);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+297], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $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^{+297}:\\
        \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\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) < 2e297

          1. Initial program 98.3%

            \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
          2. Add Preprocessing

          if 2e297 < (*.f64 z z)

          1. Initial program 74.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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
            2. lift--.f64N/A

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

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

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

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

              \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
            7. associate-*r*N/A

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

              \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
            9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 6: 76.1% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 7 \cdot 10^{+67}:\\ \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\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 7e+67) (- (* x x) (* (* y 4.0) (- t))) (* (* z y) (* -4.0 z))))
          double code(double x, double y, double z, double t) {
          	double tmp;
          	if (z <= 7e+67) {
          		tmp = (x * x) - ((y * 4.0) * -t);
          	} 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 <= 7d+67) then
                  tmp = (x * x) - ((y * 4.0d0) * -t)
              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 <= 7e+67) {
          		tmp = (x * x) - ((y * 4.0) * -t);
          	} else {
          		tmp = (z * y) * (-4.0 * z);
          	}
          	return tmp;
          }
          
          def code(x, y, z, t):
          	tmp = 0
          	if z <= 7e+67:
          		tmp = (x * x) - ((y * 4.0) * -t)
          	else:
          		tmp = (z * y) * (-4.0 * z)
          	return tmp
          
          function code(x, y, z, t)
          	tmp = 0.0
          	if (z <= 7e+67)
          		tmp = Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(-t)));
          	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 <= 7e+67)
          		tmp = (x * x) - ((y * 4.0) * -t);
          	else
          		tmp = (z * y) * (-4.0 * z);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_] := If[LessEqual[z, 7e+67], N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * (-t)), $MachinePrecision]), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq 7 \cdot 10^{+67}:\\
          \;\;\;\;x \cdot x - \left(y \cdot 4\right) \cdot \left(-t\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 z < 7e67

            1. Initial program 96.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 0

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

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

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

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

            if 7e67 < z

            1. Initial program 72.7%

              \[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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
              2. lift--.f64N/A

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

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

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

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

                \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
              7. associate-*r*N/A

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

                \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
              9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 55.8% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 3.3 \cdot 10^{+92}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(\left(z \cdot z\right) \cdot y\right) \cdot -4\\ \end{array} \end{array} \]
            (FPCore (x y z t)
             :precision binary64
             (if (<= (* z z) 3.3e+92) (* (* t 4.0) y) (* (* (* z z) y) -4.0)))
            double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((z * z) <= 3.3e+92) {
            		tmp = (t * 4.0) * y;
            	} else {
            		tmp = ((z * z) * y) * -4.0;
            	}
            	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) <= 3.3d+92) then
                    tmp = (t * 4.0d0) * y
                else
                    tmp = ((z * z) * y) * (-4.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t) {
            	double tmp;
            	if ((z * z) <= 3.3e+92) {
            		tmp = (t * 4.0) * y;
            	} else {
            		tmp = ((z * z) * y) * -4.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t):
            	tmp = 0
            	if (z * z) <= 3.3e+92:
            		tmp = (t * 4.0) * y
            	else:
            		tmp = ((z * z) * y) * -4.0
            	return tmp
            
            function code(x, y, z, t)
            	tmp = 0.0
            	if (Float64(z * z) <= 3.3e+92)
            		tmp = Float64(Float64(t * 4.0) * y);
            	else
            		tmp = Float64(Float64(Float64(z * z) * y) * -4.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t)
            	tmp = 0.0;
            	if ((z * z) <= 3.3e+92)
            		tmp = (t * 4.0) * y;
            	else
            		tmp = ((z * z) * y) * -4.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 3.3e+92], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(z * z), $MachinePrecision] * y), $MachinePrecision] * -4.0), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \cdot z \leq 3.3 \cdot 10^{+92}:\\
            \;\;\;\;\left(t \cdot 4\right) \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\left(z \cdot z\right) \cdot y\right) \cdot -4\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if (*.f64 z z) < 3.29999999999999974e92

              1. Initial program 99.2%

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

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

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

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

                if 3.29999999999999974e92 < (*.f64 z z)

                1. Initial program 80.5%

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

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

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

              Alternative 8: 76.1% accurate, 1.2× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 7 \cdot 10^{+67}:\\ \;\;\;\;\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 7e+67) (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 <= 7e+67) {
              		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 (z <= 7e+67)
              		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[z, 7e+67], 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 \leq 7 \cdot 10^{+67}:\\
              \;\;\;\;\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 z < 7e67

                1. Initial program 96.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 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-*.f6477.1

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

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

                if 7e67 < z

                1. Initial program 72.7%

                  \[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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                  2. lift--.f64N/A

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

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

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

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

                    \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
                  7. associate-*r*N/A

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

                    \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
                  9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 45.4% accurate, 1.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq 2 \cdot 10^{+50}:\\ \;\;\;\;\left(t \cdot 4\right) \cdot y\\ \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 2e+50) (* (* t 4.0) y) (* (* z y) (* -4.0 z))))
                double code(double x, double y, double z, double t) {
                	double tmp;
                	if (z <= 2e+50) {
                		tmp = (t * 4.0) * y;
                	} 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 <= 2d+50) then
                        tmp = (t * 4.0d0) * y
                    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 <= 2e+50) {
                		tmp = (t * 4.0) * y;
                	} else {
                		tmp = (z * y) * (-4.0 * z);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t):
                	tmp = 0
                	if z <= 2e+50:
                		tmp = (t * 4.0) * y
                	else:
                		tmp = (z * y) * (-4.0 * z)
                	return tmp
                
                function code(x, y, z, t)
                	tmp = 0.0
                	if (z <= 2e+50)
                		tmp = Float64(Float64(t * 4.0) * y);
                	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 <= 2e+50)
                		tmp = (t * 4.0) * y;
                	else
                		tmp = (z * y) * (-4.0 * z);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_] := If[LessEqual[z, 2e+50], N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;z \leq 2 \cdot 10^{+50}:\\
                \;\;\;\;\left(t \cdot 4\right) \cdot y\\
                
                \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 z < 2.0000000000000002e50

                  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 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-*.f6446.2

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

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

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

                    if 2.0000000000000002e50 < z

                    1. Initial program 73.2%

                      \[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 x \cdot x - \color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)} \]
                      2. lift--.f64N/A

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

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

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

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

                        \[\leadsto x \cdot x - \left(\left(y \cdot 4\right) \cdot \color{blue}{\left(-1 \cdot t\right)} + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
                      7. associate-*r*N/A

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

                        \[\leadsto x \cdot x - \left(\color{blue}{\left(-1 \cdot \left(y \cdot 4\right)\right)} \cdot t + \left(y \cdot 4\right) \cdot \left(z \cdot z\right)\right) \]
                      9. neg-mul-1N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 32.0% accurate, 2.5× speedup?

                    \[\begin{array}{l} \\ \left(t \cdot 4\right) \cdot y \end{array} \]
                    (FPCore (x y z t) :precision binary64 (* (* t 4.0) y))
                    double code(double x, double y, double z, double t) {
                    	return (t * 4.0) * y;
                    }
                    
                    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 = (t * 4.0d0) * y
                    end function
                    
                    public static double code(double x, double y, double z, double t) {
                    	return (t * 4.0) * y;
                    }
                    
                    def code(x, y, z, t):
                    	return (t * 4.0) * y
                    
                    function code(x, y, z, t)
                    	return Float64(Float64(t * 4.0) * y)
                    end
                    
                    function tmp = code(x, y, z, t)
                    	tmp = (t * 4.0) * y;
                    end
                    
                    code[x_, y_, z_, t_] := N[(N[(t * 4.0), $MachinePrecision] * y), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \left(t \cdot 4\right) \cdot y
                    \end{array}
                    
                    Derivation
                    1. Initial program 91.2%

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

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

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

                        \[\leadsto \left(t \cdot 4\right) \cdot \color{blue}{y} \]
                      2. 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 2024314 
                      (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))))