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

Percentage Accurate: 91.1% → 97.1%
Time: 8.6s
Alternatives: 9
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 9 alternatives:

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

Initial Program: 91.1% 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.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 y #s(literal 4 binary64)) < 1.99999999999999995e38

    1. Initial program 85.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.99999999999999995e38 < (*.f64 y #s(literal 4 binary64))

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, y \cdot \left(\mathsf{fma}\left(z, z, -t\right) \cdot -4\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification96.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot 4 \leq 2 \cdot 10^{+38}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot -4\right) \cdot z, z, \mathsf{fma}\left(-4, t \cdot \left(-y\right), x \cdot x\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x, x, y \cdot \left(-4 \cdot \mathsf{fma}\left(z, z, -t\right)\right)\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 90.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(y, 4 \cdot t, x \cdot x\right)\\ \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+301}:\\ \;\;\;\;\mathsf{fma}\left(y, -4 \cdot \left(z \cdot z\right), x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y \cdot -4\right) \cdot z\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= (* z z) 1e+64)
   (fma y (* 4.0 t) (* x x))
   (if (<= (* z z) 2e+301)
     (fma y (* -4.0 (* z z)) (* x x))
     (* z (* (* y -4.0) z)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if ((z * z) <= 1e+64) {
		tmp = fma(y, (4.0 * t), (x * x));
	} else if ((z * z) <= 2e+301) {
		tmp = fma(y, (-4.0 * (z * z)), (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+64)
		tmp = fma(y, Float64(4.0 * t), Float64(x * x));
	elseif (Float64(z * z) <= 2e+301)
		tmp = fma(y, Float64(-4.0 * Float64(z * z)), Float64(x * x));
	else
		tmp = Float64(z * Float64(Float64(y * -4.0) * z));
	end
	return tmp
end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+64], N[(y * N[(4.0 * t), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * z), $MachinePrecision], 2e+301], N[(y * N[(-4.0 * N[(z * z), $MachinePrecision]), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(y * -4.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\mathsf{fma}\left(y, -4 \cdot \left(z \cdot z\right), x \cdot x\right)\\

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


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

    1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

    if 1.00000000000000002e64 < (*.f64 z z) < 2.00000000000000011e301

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000011e301 < (*.f64 z z)

    1. Initial program 54.6%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(y, 4 \cdot t, x \cdot x\right)\\ \mathbf{elif}\;z \cdot z \leq 2 \cdot 10^{+301}:\\ \;\;\;\;\mathsf{fma}\left(y, -4 \cdot \left(z \cdot z\right), x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y \cdot -4\right) \cdot z\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 46.9% accurate, 0.7× speedup?

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

      1. Initial program 91.6%

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

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

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

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

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

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

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

      if 3.5e-264 < z < 2.20000000000000009e-205 or 3.4e-16 < z < 2.4e37

      1. Initial program 90.0%

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

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

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

          \[\leadsto \color{blue}{x \cdot x} \]
      5. Applied rewrites70.7%

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

      if 2.4e37 < z

      1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.5 \cdot 10^{-264}:\\ \;\;\;\;y \cdot \left(4 \cdot t\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-205}:\\ \;\;\;\;x \cdot x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\ \;\;\;\;y \cdot \left(4 \cdot t\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y \cdot -4\right) \cdot z\right)\\ \end{array} \]
      9. Add Preprocessing

      Alternative 4: 45.3% accurate, 0.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(4 \cdot t\right)\\ \mathbf{if}\;z \leq 3.5 \cdot 10^{-264}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-205}:\\ \;\;\;\;x \cdot x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\\ \end{array} \end{array} \]
      (FPCore (x y z t)
       :precision binary64
       (let* ((t_1 (* y (* 4.0 t))))
         (if (<= z 3.5e-264)
           t_1
           (if (<= z 2.2e-205)
             (* x x)
             (if (<= z 3.4e-16)
               t_1
               (if (<= z 2.4e+37) (* x x) (* y (* -4.0 (* z z)))))))))
      double code(double x, double y, double z, double t) {
      	double t_1 = y * (4.0 * t);
      	double tmp;
      	if (z <= 3.5e-264) {
      		tmp = t_1;
      	} else if (z <= 2.2e-205) {
      		tmp = x * x;
      	} else if (z <= 3.4e-16) {
      		tmp = t_1;
      	} else if (z <= 2.4e+37) {
      		tmp = x * x;
      	} else {
      		tmp = y * (-4.0 * (z * 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) :: t_1
          real(8) :: tmp
          t_1 = y * (4.0d0 * t)
          if (z <= 3.5d-264) then
              tmp = t_1
          else if (z <= 2.2d-205) then
              tmp = x * x
          else if (z <= 3.4d-16) then
              tmp = t_1
          else if (z <= 2.4d+37) then
              tmp = x * x
          else
              tmp = y * ((-4.0d0) * (z * z))
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t) {
      	double t_1 = y * (4.0 * t);
      	double tmp;
      	if (z <= 3.5e-264) {
      		tmp = t_1;
      	} else if (z <= 2.2e-205) {
      		tmp = x * x;
      	} else if (z <= 3.4e-16) {
      		tmp = t_1;
      	} else if (z <= 2.4e+37) {
      		tmp = x * x;
      	} else {
      		tmp = y * (-4.0 * (z * z));
      	}
      	return tmp;
      }
      
      def code(x, y, z, t):
      	t_1 = y * (4.0 * t)
      	tmp = 0
      	if z <= 3.5e-264:
      		tmp = t_1
      	elif z <= 2.2e-205:
      		tmp = x * x
      	elif z <= 3.4e-16:
      		tmp = t_1
      	elif z <= 2.4e+37:
      		tmp = x * x
      	else:
      		tmp = y * (-4.0 * (z * z))
      	return tmp
      
      function code(x, y, z, t)
      	t_1 = Float64(y * Float64(4.0 * t))
      	tmp = 0.0
      	if (z <= 3.5e-264)
      		tmp = t_1;
      	elseif (z <= 2.2e-205)
      		tmp = Float64(x * x);
      	elseif (z <= 3.4e-16)
      		tmp = t_1;
      	elseif (z <= 2.4e+37)
      		tmp = Float64(x * x);
      	else
      		tmp = Float64(y * Float64(-4.0 * Float64(z * z)));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t)
      	t_1 = y * (4.0 * t);
      	tmp = 0.0;
      	if (z <= 3.5e-264)
      		tmp = t_1;
      	elseif (z <= 2.2e-205)
      		tmp = x * x;
      	elseif (z <= 3.4e-16)
      		tmp = t_1;
      	elseif (z <= 2.4e+37)
      		tmp = x * x;
      	else
      		tmp = y * (-4.0 * (z * z));
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(4.0 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 3.5e-264], t$95$1, If[LessEqual[z, 2.2e-205], N[(x * x), $MachinePrecision], If[LessEqual[z, 3.4e-16], t$95$1, If[LessEqual[z, 2.4e+37], N[(x * x), $MachinePrecision], N[(y * N[(-4.0 * N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := y \cdot \left(4 \cdot t\right)\\
      \mathbf{if}\;z \leq 3.5 \cdot 10^{-264}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 2.2 \cdot 10^{-205}:\\
      \;\;\;\;x \cdot x\\
      
      \mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;z \leq 2.4 \cdot 10^{+37}:\\
      \;\;\;\;x \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < 3.5e-264 or 2.20000000000000009e-205 < z < 3.4e-16

        1. Initial program 91.6%

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

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

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

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

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

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

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

        if 3.5e-264 < z < 2.20000000000000009e-205 or 3.4e-16 < z < 2.4e37

        1. Initial program 90.0%

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

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

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

            \[\leadsto \color{blue}{x \cdot x} \]
        5. Applied rewrites70.7%

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

        if 2.4e37 < z

        1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)} \]
      3. Recombined 3 regimes into one program.
      4. Final simplification48.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 3.5 \cdot 10^{-264}:\\ \;\;\;\;y \cdot \left(4 \cdot t\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-205}:\\ \;\;\;\;x \cdot x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-16}:\\ \;\;\;\;y \cdot \left(4 \cdot t\right)\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{+37}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 5: 96.8% accurate, 0.7× speedup?

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

        1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.9999999999999999e196 < (*.f64 z z)

        1. Initial program 64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(y \cdot -4\right) \cdot z, z, \color{blue}{x \cdot x}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification95.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+196}:\\ \;\;\;\;\mathsf{fma}\left(x, x, y \cdot \left(-4 \cdot \mathsf{fma}\left(z, z, -t\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot -4\right) \cdot z, z, x \cdot x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 91.5% accurate, 0.8× speedup?

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

        1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

        if 1.00000000000000002e64 < (*.f64 z z)

        1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\left(y \cdot -4\right) \cdot z, z, \color{blue}{x \cdot x}\right) \]
      3. Recombined 2 regimes into one program.
      4. Final simplification91.5%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot z \leq 10^{+64}:\\ \;\;\;\;\mathsf{fma}\left(y, 4 \cdot t, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\left(y \cdot -4\right) \cdot z, z, x \cdot x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 85.6% accurate, 1.0× speedup?

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

        1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

        if 4.0000000000000003e172 < (*.f64 z z)

        1. Initial program 65.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 inf

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \cdot z \leq 4 \cdot 10^{+172}:\\ \;\;\;\;\mathsf{fma}\left(y, 4 \cdot t, x \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\left(y \cdot -4\right) \cdot z\right)\\ \end{array} \]
        9. Add Preprocessing

        Alternative 8: 44.6% accurate, 1.6× speedup?

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

          1. Initial program 85.8%

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

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

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

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

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

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

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

          if 1.62000000000000008e72 < x

          1. Initial program 79.1%

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

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

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

              \[\leadsto \color{blue}{x \cdot x} \]
          5. Applied rewrites72.2%

            \[\leadsto \color{blue}{x \cdot x} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification45.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.62 \cdot 10^{+72}:\\ \;\;\;\;y \cdot \left(4 \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 41.1% accurate, 4.5× speedup?

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

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

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

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

            \[\leadsto \color{blue}{x \cdot x} \]
        5. Applied rewrites36.6%

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

        Developer Target 1: 91.2% 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 2024223 
        (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))))