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

Percentage Accurate: 90.9% → 94.7%
Time: 7.7s
Alternatives: 6
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 6 alternatives:

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

Initial Program: 90.9% 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: 94.7% accurate, 0.9× speedup?

\[\begin{array}{l} z = |z|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 8.2 \cdot 10^{+161}:\\ \;\;\;\;x \cdot x - y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t)
 :precision binary64
 (if (<= z 8.2e+161)
   (- (* x x) (* y (* 4.0 (- (* z z) t))))
   (* z (* -4.0 (* z y)))))
z = abs(z);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 8.2e+161) {
		tmp = (x * x) - (y * (4.0 * ((z * z) - t)));
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
NOTE: z should be positive before calling this function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= 8.2d+161) then
        tmp = (x * x) - (y * (4.0d0 * ((z * z) - t)))
    else
        tmp = z * ((-4.0d0) * (z * y))
    end if
    code = tmp
end function
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 8.2e+161) {
		tmp = (x * x) - (y * (4.0 * ((z * z) - t)));
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
z = abs(z)
def code(x, y, z, t):
	tmp = 0
	if z <= 8.2e+161:
		tmp = (x * x) - (y * (4.0 * ((z * z) - t)))
	else:
		tmp = z * (-4.0 * (z * y))
	return tmp
z = abs(z)
function code(x, y, z, t)
	tmp = 0.0
	if (z <= 8.2e+161)
		tmp = Float64(Float64(x * x) - Float64(y * Float64(4.0 * Float64(Float64(z * z) - t))));
	else
		tmp = Float64(z * Float64(-4.0 * Float64(z * y)));
	end
	return tmp
end
z = abs(z)
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= 8.2e+161)
		tmp = (x * x) - (y * (4.0 * ((z * z) - t)));
	else
		tmp = z * (-4.0 * (z * y));
	end
	tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := If[LessEqual[z, 8.2e+161], N[(N[(x * x), $MachinePrecision] - N[(y * N[(4.0 * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(-4.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 8.2 \cdot 10^{+161}:\\
\;\;\;\;x \cdot x - y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\\

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


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

    1. Initial program 93.5%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*93.9%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified93.9%

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

    if 8.2000000000000002e161 < z

    1. Initial program 59.7%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.7%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified59.7%

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

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

        \[\leadsto -4 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right) \]
      2. associate-*r*63.6%

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

        \[\leadsto \color{blue}{\left(y \cdot -4\right)} \cdot \left(z \cdot z\right) \]
      4. associate-*r*92.3%

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(-4 \cdot y\right)} \cdot z\right) \]
      7. associate-*l*92.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 8.2 \cdot 10^{+161}:\\ \;\;\;\;x \cdot x - y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \]

Alternative 2: 85.2% accurate, 1.0× speedup?

\[\begin{array}{l} z = |z|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 1.45 \cdot 10^{+45}:\\ \;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+162}:\\ \;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t)
 :precision binary64
 (if (<= z 1.45e+45)
   (- (* x x) (* t (* y -4.0)))
   (if (<= z 1.02e+162) (* (- (* z z) t) (* y -4.0)) (* z (* -4.0 (* z y))))))
z = abs(z);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 1.45e+45) {
		tmp = (x * x) - (t * (y * -4.0));
	} else if (z <= 1.02e+162) {
		tmp = ((z * z) - t) * (y * -4.0);
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
NOTE: z should be positive before calling this function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= 1.45d+45) then
        tmp = (x * x) - (t * (y * (-4.0d0)))
    else if (z <= 1.02d+162) then
        tmp = ((z * z) - t) * (y * (-4.0d0))
    else
        tmp = z * ((-4.0d0) * (z * y))
    end if
    code = tmp
end function
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 1.45e+45) {
		tmp = (x * x) - (t * (y * -4.0));
	} else if (z <= 1.02e+162) {
		tmp = ((z * z) - t) * (y * -4.0);
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
z = abs(z)
def code(x, y, z, t):
	tmp = 0
	if z <= 1.45e+45:
		tmp = (x * x) - (t * (y * -4.0))
	elif z <= 1.02e+162:
		tmp = ((z * z) - t) * (y * -4.0)
	else:
		tmp = z * (-4.0 * (z * y))
	return tmp
z = abs(z)
function code(x, y, z, t)
	tmp = 0.0
	if (z <= 1.45e+45)
		tmp = Float64(Float64(x * x) - Float64(t * Float64(y * -4.0)));
	elseif (z <= 1.02e+162)
		tmp = Float64(Float64(Float64(z * z) - t) * Float64(y * -4.0));
	else
		tmp = Float64(z * Float64(-4.0 * Float64(z * y)));
	end
	return tmp
end
z = abs(z)
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= 1.45e+45)
		tmp = (x * x) - (t * (y * -4.0));
	elseif (z <= 1.02e+162)
		tmp = ((z * z) - t) * (y * -4.0);
	else
		tmp = z * (-4.0 * (z * y));
	end
	tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := If[LessEqual[z, 1.45e+45], N[(N[(x * x), $MachinePrecision] - N[(t * N[(y * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.02e+162], N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(y * -4.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(-4.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
z = |z|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.45 \cdot 10^{+45}:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 1.4499999999999999e45

    1. Initial program 93.5%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*93.9%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified93.9%

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

      \[\leadsto x \cdot x - \color{blue}{-4 \cdot \left(y \cdot t\right)} \]
    5. Step-by-step derivation
      1. associate-*r*78.5%

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

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

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

    if 1.4499999999999999e45 < z < 1.01999999999999993e162

    1. Initial program 94.2%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*94.2%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified94.2%

      \[\leadsto \color{blue}{x \cdot x - y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    4. Step-by-step derivation
      1. sub-neg94.2%

        \[\leadsto \color{blue}{x \cdot x + \left(-y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\right)} \]
      2. +-commutative94.2%

        \[\leadsto \color{blue}{\left(-y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\right) + x \cdot x} \]
      3. distribute-rgt-neg-in94.2%

        \[\leadsto \color{blue}{y \cdot \left(-4 \cdot \left(z \cdot z - t\right)\right)} + x \cdot x \]
      4. distribute-lft-neg-in94.2%

        \[\leadsto y \cdot \color{blue}{\left(\left(-4\right) \cdot \left(z \cdot z - t\right)\right)} + x \cdot x \]
      5. metadata-eval94.2%

        \[\leadsto y \cdot \left(\color{blue}{-4} \cdot \left(z \cdot z - t\right)\right) + x \cdot x \]
      6. associate-*l*94.2%

        \[\leadsto \color{blue}{\left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)} + x \cdot x \]
      7. *-commutative94.2%

        \[\leadsto \color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)} + x \cdot x \]
      8. add-cube-cbrt93.7%

        \[\leadsto \color{blue}{\left(\left(\sqrt[3]{z \cdot z - t} \cdot \sqrt[3]{z \cdot z - t}\right) \cdot \sqrt[3]{z \cdot z - t}\right)} \cdot \left(y \cdot -4\right) + x \cdot x \]
      9. associate-*l*93.8%

        \[\leadsto \color{blue}{\left(\sqrt[3]{z \cdot z - t} \cdot \sqrt[3]{z \cdot z - t}\right) \cdot \left(\sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right)\right)} + x \cdot x \]
      10. fma-def93.8%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{z \cdot z - t}\right)}^{2}}, \sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right), x \cdot x\right) \]
    5. Applied egg-rr93.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{z \cdot z - t}\right)}^{2}, \sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right), x \cdot x\right)} \]
    6. Taylor expanded in y around inf 67.3%

      \[\leadsto \color{blue}{-4 \cdot \left(\left(\left({z}^{2} - t\right) \cdot y\right) \cdot {1}^{0.3333333333333333}\right)} \]
    7. Step-by-step derivation
      1. pow-base-167.3%

        \[\leadsto -4 \cdot \left(\left(\left({z}^{2} - t\right) \cdot y\right) \cdot \color{blue}{1}\right) \]
      2. associate-*r*67.3%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(\left({z}^{2} - t\right) \cdot y\right)\right) \cdot 1} \]
      3. *-rgt-identity67.3%

        \[\leadsto \left(-4 \cdot \left(\color{blue}{\left(\left({z}^{2} - t\right) \cdot 1\right)} \cdot y\right)\right) \cdot 1 \]
      4. *-rgt-identity67.3%

        \[\leadsto \left(-4 \cdot \left(\color{blue}{\left({z}^{2} - t\right)} \cdot y\right)\right) \cdot 1 \]
      5. unpow267.3%

        \[\leadsto \left(-4 \cdot \left(\left(\color{blue}{z \cdot z} - t\right) \cdot y\right)\right) \cdot 1 \]
      6. *-commutative67.3%

        \[\leadsto \color{blue}{\left(\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \cdot 1 \]
      7. associate-*r*67.3%

        \[\leadsto \color{blue}{\left(\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)} \cdot 1 \]
      8. *-rgt-identity67.3%

        \[\leadsto \color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)} \]
    8. Simplified67.3%

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

    if 1.01999999999999993e162 < z

    1. Initial program 59.7%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*59.7%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified59.7%

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

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

        \[\leadsto -4 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right) \]
      2. associate-*r*63.6%

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

        \[\leadsto \color{blue}{\left(y \cdot -4\right)} \cdot \left(z \cdot z\right) \]
      4. associate-*r*92.3%

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(-4 \cdot y\right)} \cdot z\right) \]
      7. associate-*l*92.3%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 1.45 \cdot 10^{+45}:\\ \;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\ \mathbf{elif}\;z \leq 1.02 \cdot 10^{+162}:\\ \;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \]

Alternative 3: 80.9% accurate, 1.0× speedup?

\[\begin{array}{l} z = |z|\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 4.8 \cdot 10^{+194}:\\ \;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t)
 :precision binary64
 (if (<= (* x x) 4.8e+194) (* (- (* z z) t) (* y -4.0)) (* x x)))
z = abs(z);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x * x) <= 4.8e+194) {
		tmp = ((z * z) - t) * (y * -4.0);
	} else {
		tmp = x * x;
	}
	return tmp;
}
NOTE: z should be positive before calling this function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x * x) <= 4.8d+194) then
        tmp = ((z * z) - t) * (y * (-4.0d0))
    else
        tmp = x * x
    end if
    code = tmp
end function
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x * x) <= 4.8e+194) {
		tmp = ((z * z) - t) * (y * -4.0);
	} else {
		tmp = x * x;
	}
	return tmp;
}
z = abs(z)
def code(x, y, z, t):
	tmp = 0
	if (x * x) <= 4.8e+194:
		tmp = ((z * z) - t) * (y * -4.0)
	else:
		tmp = x * x
	return tmp
z = abs(z)
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(x * x) <= 4.8e+194)
		tmp = Float64(Float64(Float64(z * z) - t) * Float64(y * -4.0));
	else
		tmp = Float64(x * x);
	end
	return tmp
end
z = abs(z)
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x * x) <= 4.8e+194)
		tmp = ((z * z) - t) * (y * -4.0);
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := If[LessEqual[N[(x * x), $MachinePrecision], 4.8e+194], N[(N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision] * N[(y * -4.0), $MachinePrecision]), $MachinePrecision], N[(x * x), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 4.8 \cdot 10^{+194}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x x) < 4.8e194

    1. Initial program 94.4%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*94.9%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified94.9%

      \[\leadsto \color{blue}{x \cdot x - y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    4. Step-by-step derivation
      1. sub-neg94.9%

        \[\leadsto \color{blue}{x \cdot x + \left(-y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\right)} \]
      2. +-commutative94.9%

        \[\leadsto \color{blue}{\left(-y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)\right) + x \cdot x} \]
      3. distribute-rgt-neg-in94.9%

        \[\leadsto \color{blue}{y \cdot \left(-4 \cdot \left(z \cdot z - t\right)\right)} + x \cdot x \]
      4. distribute-lft-neg-in94.9%

        \[\leadsto y \cdot \color{blue}{\left(\left(-4\right) \cdot \left(z \cdot z - t\right)\right)} + x \cdot x \]
      5. metadata-eval94.9%

        \[\leadsto y \cdot \left(\color{blue}{-4} \cdot \left(z \cdot z - t\right)\right) + x \cdot x \]
      6. associate-*l*94.4%

        \[\leadsto \color{blue}{\left(y \cdot -4\right) \cdot \left(z \cdot z - t\right)} + x \cdot x \]
      7. *-commutative94.4%

        \[\leadsto \color{blue}{\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)} + x \cdot x \]
      8. add-cube-cbrt93.6%

        \[\leadsto \color{blue}{\left(\left(\sqrt[3]{z \cdot z - t} \cdot \sqrt[3]{z \cdot z - t}\right) \cdot \sqrt[3]{z \cdot z - t}\right)} \cdot \left(y \cdot -4\right) + x \cdot x \]
      9. associate-*l*93.6%

        \[\leadsto \color{blue}{\left(\sqrt[3]{z \cdot z - t} \cdot \sqrt[3]{z \cdot z - t}\right) \cdot \left(\sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right)\right)} + x \cdot x \]
      10. fma-def93.6%

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

        \[\leadsto \mathsf{fma}\left(\color{blue}{{\left(\sqrt[3]{z \cdot z - t}\right)}^{2}}, \sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right), x \cdot x\right) \]
    5. Applied egg-rr93.6%

      \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\sqrt[3]{z \cdot z - t}\right)}^{2}, \sqrt[3]{z \cdot z - t} \cdot \left(y \cdot -4\right), x \cdot x\right)} \]
    6. Taylor expanded in y around inf 82.1%

      \[\leadsto \color{blue}{-4 \cdot \left(\left(\left({z}^{2} - t\right) \cdot y\right) \cdot {1}^{0.3333333333333333}\right)} \]
    7. Step-by-step derivation
      1. pow-base-182.1%

        \[\leadsto -4 \cdot \left(\left(\left({z}^{2} - t\right) \cdot y\right) \cdot \color{blue}{1}\right) \]
      2. associate-*r*82.1%

        \[\leadsto \color{blue}{\left(-4 \cdot \left(\left({z}^{2} - t\right) \cdot y\right)\right) \cdot 1} \]
      3. *-rgt-identity82.1%

        \[\leadsto \left(-4 \cdot \left(\color{blue}{\left(\left({z}^{2} - t\right) \cdot 1\right)} \cdot y\right)\right) \cdot 1 \]
      4. *-rgt-identity82.1%

        \[\leadsto \left(-4 \cdot \left(\color{blue}{\left({z}^{2} - t\right)} \cdot y\right)\right) \cdot 1 \]
      5. unpow282.1%

        \[\leadsto \left(-4 \cdot \left(\left(\color{blue}{z \cdot z} - t\right) \cdot y\right)\right) \cdot 1 \]
      6. *-commutative82.1%

        \[\leadsto \color{blue}{\left(\left(\left(z \cdot z - t\right) \cdot y\right) \cdot -4\right)} \cdot 1 \]
      7. associate-*r*81.6%

        \[\leadsto \color{blue}{\left(\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\right)} \cdot 1 \]
      8. *-rgt-identity81.6%

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

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

    if 4.8e194 < (*.f64 x x)

    1. Initial program 81.9%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*81.9%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified81.9%

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

      \[\leadsto \color{blue}{{x}^{2}} \]
    5. Step-by-step derivation
      1. unpow290.0%

        \[\leadsto \color{blue}{x \cdot x} \]
    6. Simplified90.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot x \leq 4.8 \cdot 10^{+194}:\\ \;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]

Alternative 4: 61.8% accurate, 1.2× speedup?

\[\begin{array}{l} z = |z|\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;t \cdot \left(y \cdot 4\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+49}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t)
 :precision binary64
 (if (<= z 4.5e-118)
   (* t (* y 4.0))
   (if (<= z 2.6e+49) (* x x) (* z (* -4.0 (* z y))))))
z = abs(z);
double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 4.5e-118) {
		tmp = t * (y * 4.0);
	} else if (z <= 2.6e+49) {
		tmp = x * x;
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
NOTE: z should be positive before calling this function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (z <= 4.5d-118) then
        tmp = t * (y * 4.0d0)
    else if (z <= 2.6d+49) then
        tmp = x * x
    else
        tmp = z * ((-4.0d0) * (z * y))
    end if
    code = tmp
end function
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (z <= 4.5e-118) {
		tmp = t * (y * 4.0);
	} else if (z <= 2.6e+49) {
		tmp = x * x;
	} else {
		tmp = z * (-4.0 * (z * y));
	}
	return tmp;
}
z = abs(z)
def code(x, y, z, t):
	tmp = 0
	if z <= 4.5e-118:
		tmp = t * (y * 4.0)
	elif z <= 2.6e+49:
		tmp = x * x
	else:
		tmp = z * (-4.0 * (z * y))
	return tmp
z = abs(z)
function code(x, y, z, t)
	tmp = 0.0
	if (z <= 4.5e-118)
		tmp = Float64(t * Float64(y * 4.0));
	elseif (z <= 2.6e+49)
		tmp = Float64(x * x);
	else
		tmp = Float64(z * Float64(-4.0 * Float64(z * y)));
	end
	return tmp
end
z = abs(z)
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (z <= 4.5e-118)
		tmp = t * (y * 4.0);
	elseif (z <= 2.6e+49)
		tmp = x * x;
	else
		tmp = z * (-4.0 * (z * y));
	end
	tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := If[LessEqual[z, 4.5e-118], N[(t * N[(y * 4.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e+49], N[(x * x), $MachinePrecision], N[(z * N[(-4.0 * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
z = |z|\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 4.5 \cdot 10^{-118}:\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\

\mathbf{elif}\;z \leq 2.6 \cdot 10^{+49}:\\
\;\;\;\;x \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < 4.5e-118

    1. Initial program 92.1%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*92.6%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified92.6%

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

      \[\leadsto \color{blue}{4 \cdot \left(y \cdot t\right)} \]
    5. Step-by-step derivation
      1. associate-*r*41.5%

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

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

    if 4.5e-118 < z < 2.59999999999999989e49

    1. Initial program 100.0%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*100.0%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified100.0%

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

      \[\leadsto \color{blue}{{x}^{2}} \]
    5. Step-by-step derivation
      1. unpow261.8%

        \[\leadsto \color{blue}{x \cdot x} \]
    6. Simplified61.8%

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

    if 2.59999999999999989e49 < z

    1. Initial program 73.8%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*73.8%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified73.8%

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

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

        \[\leadsto -4 \cdot \left(y \cdot \color{blue}{\left(z \cdot z\right)}\right) \]
      2. associate-*r*63.1%

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

        \[\leadsto \color{blue}{\left(y \cdot -4\right)} \cdot \left(z \cdot z\right) \]
      4. associate-*r*77.9%

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

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

        \[\leadsto z \cdot \left(\color{blue}{\left(-4 \cdot y\right)} \cdot z\right) \]
      7. associate-*l*77.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq 4.5 \cdot 10^{-118}:\\ \;\;\;\;t \cdot \left(y \cdot 4\right)\\ \mathbf{elif}\;z \leq 2.6 \cdot 10^{+49}:\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(-4 \cdot \left(z \cdot y\right)\right)\\ \end{array} \]

Alternative 5: 58.0% accurate, 1.4× speedup?

\[\begin{array}{l} z = |z|\\ \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 1.55 \cdot 10^{+110}:\\ \;\;\;\;t \cdot \left(y \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t)
 :precision binary64
 (if (<= (* x x) 1.55e+110) (* t (* y 4.0)) (* x x)))
z = abs(z);
double code(double x, double y, double z, double t) {
	double tmp;
	if ((x * x) <= 1.55e+110) {
		tmp = t * (y * 4.0);
	} else {
		tmp = x * x;
	}
	return tmp;
}
NOTE: z should be positive before calling this function
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if ((x * x) <= 1.55d+110) then
        tmp = t * (y * 4.0d0)
    else
        tmp = x * x
    end if
    code = tmp
end function
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	double tmp;
	if ((x * x) <= 1.55e+110) {
		tmp = t * (y * 4.0);
	} else {
		tmp = x * x;
	}
	return tmp;
}
z = abs(z)
def code(x, y, z, t):
	tmp = 0
	if (x * x) <= 1.55e+110:
		tmp = t * (y * 4.0)
	else:
		tmp = x * x
	return tmp
z = abs(z)
function code(x, y, z, t)
	tmp = 0.0
	if (Float64(x * x) <= 1.55e+110)
		tmp = Float64(t * Float64(y * 4.0));
	else
		tmp = Float64(x * x);
	end
	return tmp
end
z = abs(z)
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if ((x * x) <= 1.55e+110)
		tmp = t * (y * 4.0);
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := If[LessEqual[N[(x * x), $MachinePrecision], 1.55e+110], N[(t * N[(y * 4.0), $MachinePrecision]), $MachinePrecision], N[(x * x), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 1.55 \cdot 10^{+110}:\\
\;\;\;\;t \cdot \left(y \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.55000000000000009e110

    1. Initial program 93.6%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*94.2%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified94.2%

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

      \[\leadsto \color{blue}{4 \cdot \left(y \cdot t\right)} \]
    5. Step-by-step derivation
      1. associate-*r*52.0%

        \[\leadsto \color{blue}{\left(4 \cdot y\right) \cdot t} \]
    6. Simplified52.0%

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

    if 1.55000000000000009e110 < (*.f64 x x)

    1. Initial program 85.3%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. associate-*l*85.3%

        \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
    3. Simplified85.3%

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

      \[\leadsto \color{blue}{{x}^{2}} \]
    5. Step-by-step derivation
      1. unpow280.4%

        \[\leadsto \color{blue}{x \cdot x} \]
    6. Simplified80.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot x \leq 1.55 \cdot 10^{+110}:\\ \;\;\;\;t \cdot \left(y \cdot 4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]

Alternative 6: 41.9% accurate, 4.3× speedup?

\[\begin{array}{l} z = |z|\\ \\ x \cdot x \end{array} \]
NOTE: z should be positive before calling this function
(FPCore (x y z t) :precision binary64 (* x x))
z = abs(z);
double code(double x, double y, double z, double t) {
	return x * x;
}
NOTE: z should be positive before calling this function
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
z = Math.abs(z);
public static double code(double x, double y, double z, double t) {
	return x * x;
}
z = abs(z)
def code(x, y, z, t):
	return x * x
z = abs(z)
function code(x, y, z, t)
	return Float64(x * x)
end
z = abs(z)
function tmp = code(x, y, z, t)
	tmp = x * x;
end
NOTE: z should be positive before calling this function
code[x_, y_, z_, t_] := N[(x * x), $MachinePrecision]
\begin{array}{l}
z = |z|\\
\\
x \cdot x
\end{array}
Derivation
  1. Initial program 90.1%

    \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
  2. Step-by-step derivation
    1. associate-*l*90.4%

      \[\leadsto x \cdot x - \color{blue}{y \cdot \left(4 \cdot \left(z \cdot z - t\right)\right)} \]
  3. Simplified90.4%

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

    \[\leadsto \color{blue}{{x}^{2}} \]
  5. Step-by-step derivation
    1. unpow241.5%

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

    \[\leadsto \color{blue}{x \cdot x} \]
  7. Final simplification41.5%

    \[\leadsto x \cdot x \]

Developer target: 90.9% 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 2023230 
(FPCore (x y z t)
  :name "Graphics.Rasterific.Shading:$sradialGradientWithFocusShader from Rasterific-0.6.1, B"
  :precision binary64

  :herbie-target
  (- (* x x) (* 4.0 (* y (- (* z z) t))))

  (- (* x x) (* (* y 4.0) (- (* z z) t))))