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

Percentage Accurate: 91.5% → 96.6%
Time: 9.5s
Alternatives: 10
Speedup: 0.9×

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: 91.5% accurate, 1.0× speedup?

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

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

Alternative 1: 96.6% accurate, 0.9× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} \mathbf{if}\;z\_m \leq 6.7 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(x, x, y \cdot \left(\mathsf{fma}\left(z\_m, z\_m, -t\right) \cdot -4\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x - z\_m \cdot \left(y \cdot \left(z\_m \cdot 4\right)\right)\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (if (<= z_m 6.7e+156)
   (fma x x (* y (* (fma z_m z_m (- t)) -4.0)))
   (- (* x x) (* z_m (* y (* z_m 4.0))))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double tmp;
	if (z_m <= 6.7e+156) {
		tmp = fma(x, x, (y * (fma(z_m, z_m, -t) * -4.0)));
	} else {
		tmp = (x * x) - (z_m * (y * (z_m * 4.0)));
	}
	return tmp;
}
z_m = abs(z)
function code(x, y, z_m, t)
	tmp = 0.0
	if (z_m <= 6.7e+156)
		tmp = fma(x, x, Float64(y * Float64(fma(z_m, z_m, Float64(-t)) * -4.0)));
	else
		tmp = Float64(Float64(x * x) - Float64(z_m * Float64(y * Float64(z_m * 4.0))));
	end
	return tmp
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := If[LessEqual[z$95$m, 6.7e+156], N[(x * x + N[(y * N[(N[(z$95$m * z$95$m + (-t)), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] - N[(z$95$m * N[(y * N[(z$95$m * 4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z_m = \left|z\right|

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < 6.7e156

    1. Initial program 94.3%

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
      6. 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-eval96.1

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

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

    if 6.7e156 < z

    1. Initial program 80.3%

      \[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 x \cdot x - \color{blue}{4 \cdot \left(y \cdot {z}^{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

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

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

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

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

        \[\leadsto x \cdot x - z \cdot \color{blue}{\left(y \cdot \left(4 \cdot z\right)\right)} \]
      9. lower-*.f6496.5

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

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

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

Alternative 2: 50.2% accurate, 0.8× speedup?

\[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} t_1 := \left(z\_m \cdot -4\right) \cdot \left(z\_m \cdot y\right)\\ \mathbf{if}\;x \leq 2.55 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(t \cdot 4\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
z_m = (fabs.f64 z)
(FPCore (x y z_m t)
 :precision binary64
 (let* ((t_1 (* (* z_m -4.0) (* z_m y))))
   (if (<= x 2.55e-172)
     t_1
     (if (<= x 2.8e-24) (* y (* t 4.0)) (if (<= x 1.1e+43) t_1 (* x x))))))
z_m = fabs(z);
double code(double x, double y, double z_m, double t) {
	double t_1 = (z_m * -4.0) * (z_m * y);
	double tmp;
	if (x <= 2.55e-172) {
		tmp = t_1;
	} else if (x <= 2.8e-24) {
		tmp = y * (t * 4.0);
	} else if (x <= 1.1e+43) {
		tmp = t_1;
	} else {
		tmp = x * x;
	}
	return tmp;
}
z_m = abs(z)
real(8) function code(x, y, z_m, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z_m
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z_m * (-4.0d0)) * (z_m * y)
    if (x <= 2.55d-172) then
        tmp = t_1
    else if (x <= 2.8d-24) then
        tmp = y * (t * 4.0d0)
    else if (x <= 1.1d+43) then
        tmp = t_1
    else
        tmp = x * x
    end if
    code = tmp
end function
z_m = Math.abs(z);
public static double code(double x, double y, double z_m, double t) {
	double t_1 = (z_m * -4.0) * (z_m * y);
	double tmp;
	if (x <= 2.55e-172) {
		tmp = t_1;
	} else if (x <= 2.8e-24) {
		tmp = y * (t * 4.0);
	} else if (x <= 1.1e+43) {
		tmp = t_1;
	} else {
		tmp = x * x;
	}
	return tmp;
}
z_m = math.fabs(z)
def code(x, y, z_m, t):
	t_1 = (z_m * -4.0) * (z_m * y)
	tmp = 0
	if x <= 2.55e-172:
		tmp = t_1
	elif x <= 2.8e-24:
		tmp = y * (t * 4.0)
	elif x <= 1.1e+43:
		tmp = t_1
	else:
		tmp = x * x
	return tmp
z_m = abs(z)
function code(x, y, z_m, t)
	t_1 = Float64(Float64(z_m * -4.0) * Float64(z_m * y))
	tmp = 0.0
	if (x <= 2.55e-172)
		tmp = t_1;
	elseif (x <= 2.8e-24)
		tmp = Float64(y * Float64(t * 4.0));
	elseif (x <= 1.1e+43)
		tmp = t_1;
	else
		tmp = Float64(x * x);
	end
	return tmp
end
z_m = abs(z);
function tmp_2 = code(x, y, z_m, t)
	t_1 = (z_m * -4.0) * (z_m * y);
	tmp = 0.0;
	if (x <= 2.55e-172)
		tmp = t_1;
	elseif (x <= 2.8e-24)
		tmp = y * (t * 4.0);
	elseif (x <= 1.1e+43)
		tmp = t_1;
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
z_m = N[Abs[z], $MachinePrecision]
code[x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(N[(z$95$m * -4.0), $MachinePrecision] * N[(z$95$m * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.55e-172], t$95$1, If[LessEqual[x, 2.8e-24], N[(y * N[(t * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+43], t$95$1, N[(x * x), $MachinePrecision]]]]]
\begin{array}{l}
z_m = \left|z\right|

\\
\begin{array}{l}
t_1 := \left(z\_m \cdot -4\right) \cdot \left(z\_m \cdot y\right)\\
\mathbf{if}\;x \leq 2.55 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\
\;\;\;\;y \cdot \left(t \cdot 4\right)\\

\mathbf{elif}\;x \leq 1.1 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;x \cdot x\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 2.5499999999999999e-172 or 2.8000000000000002e-24 < x < 1.1e43

    1. Initial program 93.3%

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

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

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

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

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

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

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

      if 2.5499999999999999e-172 < x < 2.8000000000000002e-24

      1. Initial program 97.5%

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

        \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right)} \]
      4. Step-by-step derivation
        1. 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-*.f6460.7

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

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

      if 1.1e43 < x

      1. Initial program 87.9%

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

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

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

          \[\leadsto \color{blue}{x \cdot x} \]
      5. Applied rewrites71.4%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 2.55 \cdot 10^{-172}:\\ \;\;\;\;\left(z \cdot -4\right) \cdot \left(z \cdot y\right)\\ \mathbf{elif}\;x \leq 2.8 \cdot 10^{-24}:\\ \;\;\;\;y \cdot \left(t \cdot 4\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+43}:\\ \;\;\;\;\left(z \cdot -4\right) \cdot \left(z \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 47.9% accurate, 0.8× speedup?

    \[\begin{array}{l} z_m = \left|z\right| \\ \begin{array}{l} t_1 := -4 \cdot \left(y \cdot \left(z\_m \cdot z\_m\right)\right)\\ \mathbf{if}\;x \leq 2.55 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-38}:\\ \;\;\;\;y \cdot \left(t \cdot 4\right)\\ \mathbf{elif}\;x \leq 1.1 \cdot 10^{+43}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
    z_m = (fabs.f64 z)
    (FPCore (x y z_m t)
     :precision binary64
     (let* ((t_1 (* -4.0 (* y (* z_m z_m)))))
       (if (<= x 2.55e-172)
         t_1
         (if (<= x 1.65e-38) (* y (* t 4.0)) (if (<= x 1.1e+43) t_1 (* x x))))))
    z_m = fabs(z);
    double code(double x, double y, double z_m, double t) {
    	double t_1 = -4.0 * (y * (z_m * z_m));
    	double tmp;
    	if (x <= 2.55e-172) {
    		tmp = t_1;
    	} else if (x <= 1.65e-38) {
    		tmp = y * (t * 4.0);
    	} else if (x <= 1.1e+43) {
    		tmp = t_1;
    	} else {
    		tmp = x * x;
    	}
    	return tmp;
    }
    
    z_m = abs(z)
    real(8) function code(x, y, z_m, t)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z_m
        real(8), intent (in) :: t
        real(8) :: t_1
        real(8) :: tmp
        t_1 = (-4.0d0) * (y * (z_m * z_m))
        if (x <= 2.55d-172) then
            tmp = t_1
        else if (x <= 1.65d-38) then
            tmp = y * (t * 4.0d0)
        else if (x <= 1.1d+43) then
            tmp = t_1
        else
            tmp = x * x
        end if
        code = tmp
    end function
    
    z_m = Math.abs(z);
    public static double code(double x, double y, double z_m, double t) {
    	double t_1 = -4.0 * (y * (z_m * z_m));
    	double tmp;
    	if (x <= 2.55e-172) {
    		tmp = t_1;
    	} else if (x <= 1.65e-38) {
    		tmp = y * (t * 4.0);
    	} else if (x <= 1.1e+43) {
    		tmp = t_1;
    	} else {
    		tmp = x * x;
    	}
    	return tmp;
    }
    
    z_m = math.fabs(z)
    def code(x, y, z_m, t):
    	t_1 = -4.0 * (y * (z_m * z_m))
    	tmp = 0
    	if x <= 2.55e-172:
    		tmp = t_1
    	elif x <= 1.65e-38:
    		tmp = y * (t * 4.0)
    	elif x <= 1.1e+43:
    		tmp = t_1
    	else:
    		tmp = x * x
    	return tmp
    
    z_m = abs(z)
    function code(x, y, z_m, t)
    	t_1 = Float64(-4.0 * Float64(y * Float64(z_m * z_m)))
    	tmp = 0.0
    	if (x <= 2.55e-172)
    		tmp = t_1;
    	elseif (x <= 1.65e-38)
    		tmp = Float64(y * Float64(t * 4.0));
    	elseif (x <= 1.1e+43)
    		tmp = t_1;
    	else
    		tmp = Float64(x * x);
    	end
    	return tmp
    end
    
    z_m = abs(z);
    function tmp_2 = code(x, y, z_m, t)
    	t_1 = -4.0 * (y * (z_m * z_m));
    	tmp = 0.0;
    	if (x <= 2.55e-172)
    		tmp = t_1;
    	elseif (x <= 1.65e-38)
    		tmp = y * (t * 4.0);
    	elseif (x <= 1.1e+43)
    		tmp = t_1;
    	else
    		tmp = x * x;
    	end
    	tmp_2 = tmp;
    end
    
    z_m = N[Abs[z], $MachinePrecision]
    code[x_, y_, z$95$m_, t_] := Block[{t$95$1 = N[(-4.0 * N[(y * N[(z$95$m * z$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 2.55e-172], t$95$1, If[LessEqual[x, 1.65e-38], N[(y * N[(t * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+43], t$95$1, N[(x * x), $MachinePrecision]]]]]
    
    \begin{array}{l}
    z_m = \left|z\right|
    
    \\
    \begin{array}{l}
    t_1 := -4 \cdot \left(y \cdot \left(z\_m \cdot z\_m\right)\right)\\
    \mathbf{if}\;x \leq 2.55 \cdot 10^{-172}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;x \leq 1.65 \cdot 10^{-38}:\\
    \;\;\;\;y \cdot \left(t \cdot 4\right)\\
    
    \mathbf{elif}\;x \leq 1.1 \cdot 10^{+43}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if x < 2.5499999999999999e-172 or 1.6500000000000001e-38 < x < 1.1e43

      1. Initial program 93.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. lower-*.f64N/A

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

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

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

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

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

      if 2.5499999999999999e-172 < x < 1.6500000000000001e-38

      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. 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-*.f6461.1

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

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

      if 1.1e43 < x

      1. Initial program 87.9%

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

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

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

          \[\leadsto \color{blue}{x \cdot x} \]
      5. Applied rewrites71.4%

        \[\leadsto \color{blue}{x \cdot x} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 4: 83.5% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.9999999999999999e82 < (*.f64 x x)

          1. Initial program 90.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 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-*.f6486.7

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

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

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

        Alternative 5: 90.3% accurate, 0.9× speedup?

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

          1. Initial program 93.3%

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x, x, \mathsf{neg}\left(\color{blue}{\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)}\right)\right) \]
            6. 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.3

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

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

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

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

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

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

          if 8.20000000000000012e-16 < z

          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 z around inf

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 83.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

          if 1.9999999999999999e82 < (*.f64 x x)

          1. Initial program 90.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 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-*.f6486.7

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

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

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

        Alternative 7: 85.1% accurate, 1.0× speedup?

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

          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-eval99.9

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

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

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

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

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

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

          if 3.9999999999999999e99 < (*.f64 z z)

          1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

          Alternative 8: 85.6% accurate, 1.0× speedup?

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

            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-*.f6487.5

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

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

            if 3.9999999999999999e99 < (*.f64 z z)

            1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

            Alternative 9: 59.0% accurate, 1.2× speedup?

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

              1. Initial program 94.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 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-*.f6450.0

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

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

              if 1.90000000000000007e-47 < (*.f64 x x)

              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 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.9

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

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

            Alternative 10: 41.2% accurate, 4.5× speedup?

            \[\begin{array}{l} z_m = \left|z\right| \\ x \cdot x \end{array} \]
            z_m = (fabs.f64 z)
            (FPCore (x y z_m t) :precision binary64 (* x x))
            z_m = fabs(z);
            double code(double x, double y, double z_m, double t) {
            	return x * x;
            }
            
            z_m = abs(z)
            real(8) function code(x, y, z_m, t)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z_m
                real(8), intent (in) :: t
                code = x * x
            end function
            
            z_m = Math.abs(z);
            public static double code(double x, double y, double z_m, double t) {
            	return x * x;
            }
            
            z_m = math.fabs(z)
            def code(x, y, z_m, t):
            	return x * x
            
            z_m = abs(z)
            function code(x, y, z_m, t)
            	return Float64(x * x)
            end
            
            z_m = abs(z);
            function tmp = code(x, y, z_m, t)
            	tmp = x * x;
            end
            
            z_m = N[Abs[z], $MachinePrecision]
            code[x_, y_, z$95$m_, t_] := N[(x * x), $MachinePrecision]
            
            \begin{array}{l}
            z_m = \left|z\right|
            
            \\
            x \cdot x
            \end{array}
            
            Derivation
            1. Initial program 92.7%

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

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

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

            Developer Target 1: 91.6% 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 2024233 
            (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))))