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

Percentage Accurate: 91.0% → 95.9%
Time: 14.1s
Alternatives: 12
Speedup: 0.6×

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 12 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.0% 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: 95.9% accurate, 0.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(t \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{x \cdot x}\right) + 1\right)\\


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

    1. Initial program 93.4%

      \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right) \]
    2. Step-by-step derivation
      1. fma-neg93.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, x, -\left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)\right)} \]
      2. distribute-rgt-neg-in93.5%

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

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

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

        \[\leadsto \mathsf{fma}\left(x, x, \left(y \cdot 4\right) \cdot \color{blue}{\left(\left(-\left(-t\right)\right) + \left(-z \cdot z\right)\right)}\right) \]
      6. remove-double-neg93.5%

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

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

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

    if 1.0000000000000001e54 < (*.f64 x x)

    1. Initial program 84.1%

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

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(1 + -4 \cdot \frac{y \cdot \left({z}^{2} - t\right)}{{x}^{2}}\right)} \]
    4. Step-by-step derivation
      1. unpow273.3%

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

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

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

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

        \[\leadsto \left(1 + \frac{\color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot -4}}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      6. associate-/l*73.3%

        \[\leadsto \left(1 + \color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot \frac{-4}{x \cdot x}}\right) \cdot \left(x \cdot x\right) \]
      7. unpow273.3%

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

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

      \[\leadsto \left(1 + \color{blue}{t \cdot \left(-4 \cdot \frac{y \cdot {z}^{2}}{t \cdot {x}^{2}} + 4 \cdot \frac{y}{{x}^{2}}\right)}\right) \cdot \left(x \cdot x\right) \]
    7. Step-by-step derivation
      1. associate-*r/73.1%

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

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

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

        \[\leadsto \left(1 + t \cdot \left(\frac{\left(y \cdot {z}^{2}\right) \cdot -4}{\color{blue}{\left(x \cdot x\right) \cdot t}} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      5. times-frac76.0%

        \[\leadsto \left(1 + t \cdot \left(\color{blue}{\frac{y \cdot {z}^{2}}{x \cdot x} \cdot \frac{-4}{t}} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      6. associate-/l*80.5%

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

        \[\leadsto \left(1 + t \cdot \left(\left(y \cdot \frac{\color{blue}{z \cdot z}}{x \cdot x}\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      8. times-frac98.1%

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

        \[\leadsto \left(1 + t \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{\color{blue}{x \cdot x}}\right)\right) \cdot \left(x \cdot x\right) \]
    8. Simplified98.1%

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

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

Alternative 2: 95.2% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 95.5%

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

    if 2e297 < (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t))

    1. Initial program 60.8%

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

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

        \[\leadsto t \cdot \left(\frac{{x}^{2}}{t} - \color{blue}{\left(4 \cdot \frac{y \cdot {z}^{2}}{t} + -4 \cdot y\right)}\right) \]
      2. associate--r+54.1%

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

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

        \[\leadsto t \cdot \left(\left(\frac{x \cdot x}{t} - \color{blue}{\frac{4 \cdot \left(y \cdot {z}^{2}\right)}{t}}\right) - -4 \cdot y\right) \]
      5. div-sub60.8%

        \[\leadsto t \cdot \left(\color{blue}{\frac{x \cdot x - 4 \cdot \left(y \cdot {z}^{2}\right)}{t}} - -4 \cdot y\right) \]
      6. unpow260.8%

        \[\leadsto t \cdot \left(\frac{\color{blue}{{x}^{2}} - 4 \cdot \left(y \cdot {z}^{2}\right)}{t} - -4 \cdot y\right) \]
      7. sub-neg60.8%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y \cdot \left(-4 \cdot \left(z \cdot z\right)\right) + x \cdot x}{t} + 4 \cdot y\right)} \]
    6. Step-by-step derivation
      1. div-inv60.8%

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)}^{3} + {\left(x \cdot x\right)}^{3}}{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{t} + 4 \cdot y\right) \]
      3. frac-times4.4%

        \[\leadsto t \cdot \left(\color{blue}{\frac{\left({\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)}^{3} + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t}} + 4 \cdot y\right) \]
      4. cube-mult4.4%

        \[\leadsto t \cdot \left(\frac{\left(\color{blue}{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right)} + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      5. associate-*r*4.4%

        \[\leadsto t \cdot \left(\frac{\left(\color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)} \cdot \left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      6. associate-*r*4.4%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)} \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      7. associate-*r*4.4%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)}\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      8. cube-mult4.4%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)\right) + \color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
    7. Applied egg-rr4.4%

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

      \[\leadsto t \cdot \left(\color{blue}{{x}^{2} \cdot \left(-4 \cdot \frac{y \cdot {z}^{2}}{t \cdot {x}^{2}} + \frac{1}{t}\right)} + 4 \cdot y\right) \]
    9. Step-by-step derivation
      1. unpow246.9%

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

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{-4 \cdot \left(y \cdot {z}^{2}\right)}{t \cdot {x}^{2}}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      3. *-commutative46.9%

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

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\frac{\left(y \cdot {z}^{2}\right) \cdot -4}{t \cdot \color{blue}{\left(x \cdot x\right)}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      5. *-commutative46.9%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\frac{\left(y \cdot {z}^{2}\right) \cdot -4}{\color{blue}{\left(x \cdot x\right) \cdot t}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      6. times-frac51.6%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{y \cdot {z}^{2}}{x \cdot x} \cdot \frac{-4}{t}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      7. associate-/l*56.1%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\left(y \cdot \frac{{z}^{2}}{x \cdot x}\right)} \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      8. unpow256.1%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\left(y \cdot \frac{\color{blue}{z \cdot z}}{x \cdot x}\right) \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      9. times-frac82.3%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\left(y \cdot \color{blue}{\left(\frac{z}{x} \cdot \frac{z}{x}\right)}\right) \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
    10. Simplified82.3%

      \[\leadsto t \cdot \left(\color{blue}{\left(x \cdot x\right) \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + \frac{1}{t}\right)} + 4 \cdot y\right) \]
    11. Step-by-step derivation
      1. *-commutative82.3%

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

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

        \[\leadsto \left(x \cdot \left(x \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + \frac{1}{t}\right)\right) + \color{blue}{y \cdot 4}\right) \cdot t \]
    12. Applied egg-rr93.6%

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

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

Alternative 3: 95.9% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(x \cdot x\right) \cdot \left(t \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{x \cdot x}\right) + 1\right)\\


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

    1. Initial program 93.4%

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

    if 1.0000000000000001e54 < (*.f64 x x)

    1. Initial program 84.1%

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

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(1 + -4 \cdot \frac{y \cdot \left({z}^{2} - t\right)}{{x}^{2}}\right)} \]
    4. Step-by-step derivation
      1. unpow273.3%

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

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

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

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

        \[\leadsto \left(1 + \frac{\color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot -4}}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      6. associate-/l*73.3%

        \[\leadsto \left(1 + \color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot \frac{-4}{x \cdot x}}\right) \cdot \left(x \cdot x\right) \]
      7. unpow273.3%

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

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

      \[\leadsto \left(1 + \color{blue}{t \cdot \left(-4 \cdot \frac{y \cdot {z}^{2}}{t \cdot {x}^{2}} + 4 \cdot \frac{y}{{x}^{2}}\right)}\right) \cdot \left(x \cdot x\right) \]
    7. Step-by-step derivation
      1. associate-*r/73.1%

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

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

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

        \[\leadsto \left(1 + t \cdot \left(\frac{\left(y \cdot {z}^{2}\right) \cdot -4}{\color{blue}{\left(x \cdot x\right) \cdot t}} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      5. times-frac76.0%

        \[\leadsto \left(1 + t \cdot \left(\color{blue}{\frac{y \cdot {z}^{2}}{x \cdot x} \cdot \frac{-4}{t}} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      6. associate-/l*80.5%

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

        \[\leadsto \left(1 + t \cdot \left(\left(y \cdot \frac{\color{blue}{z \cdot z}}{x \cdot x}\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      8. times-frac98.1%

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

        \[\leadsto \left(1 + t \cdot \left(\left(y \cdot \left(\frac{z}{x} \cdot \frac{z}{x}\right)\right) \cdot \frac{-4}{t} + 4 \cdot \frac{y}{\color{blue}{x \cdot x}}\right)\right) \cdot \left(x \cdot x\right) \]
    8. Simplified98.1%

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

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

Alternative 4: 80.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 2.4 \cdot 10^{+50} \lor \neg \left(x \cdot x \leq 1.3 \cdot 10^{+133}\right) \land x \cdot x \leq 6.5 \cdot 10^{+151}:\\ \;\;\;\;-4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= (* x x) 2.4e+50)
         (and (not (<= (* x x) 1.3e+133)) (<= (* x x) 6.5e+151)))
   (* -4.0 (* y (- (* z z) t)))
   (* x x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (((x * x) <= 2.4e+50) || (!((x * x) <= 1.3e+133) && ((x * x) <= 6.5e+151))) {
		tmp = -4.0 * (y * ((z * z) - t));
	} else {
		tmp = x * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (((x * x) <= 2.4d+50) .or. (.not. ((x * x) <= 1.3d+133)) .and. ((x * x) <= 6.5d+151)) then
        tmp = (-4.0d0) * (y * ((z * z) - t))
    else
        tmp = x * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (((x * x) <= 2.4e+50) || (!((x * x) <= 1.3e+133) && ((x * x) <= 6.5e+151))) {
		tmp = -4.0 * (y * ((z * z) - t));
	} else {
		tmp = x * x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if ((x * x) <= 2.4e+50) or (not ((x * x) <= 1.3e+133) and ((x * x) <= 6.5e+151)):
		tmp = -4.0 * (y * ((z * z) - t))
	else:
		tmp = x * x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((Float64(x * x) <= 2.4e+50) || (!(Float64(x * x) <= 1.3e+133) && (Float64(x * x) <= 6.5e+151)))
		tmp = Float64(-4.0 * Float64(y * Float64(Float64(z * z) - t)));
	else
		tmp = Float64(x * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (((x * x) <= 2.4e+50) || (~(((x * x) <= 1.3e+133)) && ((x * x) <= 6.5e+151)))
		tmp = -4.0 * (y * ((z * z) - t));
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x * x), $MachinePrecision], 2.4e+50], And[N[Not[LessEqual[N[(x * x), $MachinePrecision], 1.3e+133]], $MachinePrecision], LessEqual[N[(x * x), $MachinePrecision], 6.5e+151]]], N[(-4.0 * N[(y * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 2.4 \cdot 10^{+50} \lor \neg \left(x \cdot x \leq 1.3 \cdot 10^{+133}\right) \land x \cdot x \leq 6.5 \cdot 10^{+151}:\\
\;\;\;\;-4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x x) < 2.4000000000000002e50 or 1.2999999999999999e133 < (*.f64 x x) < 6.5000000000000002e151

    1. Initial program 92.4%

      \[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 82.7%

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

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

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

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

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

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

    if 2.4000000000000002e50 < (*.f64 x x) < 1.2999999999999999e133 or 6.5000000000000002e151 < (*.f64 x x)

    1. Initial program 85.3%

      \[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 79.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot x \leq 2.4 \cdot 10^{+50} \lor \neg \left(x \cdot x \leq 1.3 \cdot 10^{+133}\right) \land x \cdot x \leq 6.5 \cdot 10^{+151}:\\ \;\;\;\;-4 \cdot \left(y \cdot \left(z \cdot z - t\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 60.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \cdot x \leq 2.75 \cdot 10^{-12} \lor \neg \left(x \cdot x \leq 4.4 \cdot 10^{+18}\right) \land x \cdot x \leq 2.75 \cdot 10^{+32}:\\ \;\;\;\;4 \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (or (<= (* x x) 2.75e-12)
         (and (not (<= (* x x) 4.4e+18)) (<= (* x x) 2.75e+32)))
   (* 4.0 (* y t))
   (* x x)))
double code(double x, double y, double z, double t) {
	double tmp;
	if (((x * x) <= 2.75e-12) || (!((x * x) <= 4.4e+18) && ((x * x) <= 2.75e+32))) {
		tmp = 4.0 * (y * t);
	} else {
		tmp = x * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (((x * x) <= 2.75d-12) .or. (.not. ((x * x) <= 4.4d+18)) .and. ((x * x) <= 2.75d+32)) then
        tmp = 4.0d0 * (y * t)
    else
        tmp = x * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (((x * x) <= 2.75e-12) || (!((x * x) <= 4.4e+18) && ((x * x) <= 2.75e+32))) {
		tmp = 4.0 * (y * t);
	} else {
		tmp = x * x;
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if ((x * x) <= 2.75e-12) or (not ((x * x) <= 4.4e+18) and ((x * x) <= 2.75e+32)):
		tmp = 4.0 * (y * t)
	else:
		tmp = x * x
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if ((Float64(x * x) <= 2.75e-12) || (!(Float64(x * x) <= 4.4e+18) && (Float64(x * x) <= 2.75e+32)))
		tmp = Float64(4.0 * Float64(y * t));
	else
		tmp = Float64(x * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (((x * x) <= 2.75e-12) || (~(((x * x) <= 4.4e+18)) && ((x * x) <= 2.75e+32)))
		tmp = 4.0 * (y * t);
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(x * x), $MachinePrecision], 2.75e-12], And[N[Not[LessEqual[N[(x * x), $MachinePrecision], 4.4e+18]], $MachinePrecision], LessEqual[N[(x * x), $MachinePrecision], 2.75e+32]]], N[(4.0 * N[(y * t), $MachinePrecision]), $MachinePrecision], N[(x * x), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 2.75 \cdot 10^{-12} \lor \neg \left(x \cdot x \leq 4.4 \cdot 10^{+18}\right) \land x \cdot x \leq 2.75 \cdot 10^{+32}:\\
\;\;\;\;4 \cdot \left(y \cdot t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x x) < 2.7500000000000002e-12 or 4.4e18 < (*.f64 x x) < 2.74999999999999992e32

    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 t around inf 49.8%

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

    if 2.7500000000000002e-12 < (*.f64 x x) < 4.4e18 or 2.74999999999999992e32 < (*.f64 x x)

    1. Initial program 85.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot x \leq 2.75 \cdot 10^{-12} \lor \neg \left(x \cdot x \leq 4.4 \cdot 10^{+18}\right) \land x \cdot x \leq 2.75 \cdot 10^{+32}:\\ \;\;\;\;4 \cdot \left(y \cdot t\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 93.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 95.5%

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

    if 2e297 < (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t))

    1. Initial program 60.8%

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

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

        \[\leadsto t \cdot \left(\frac{{x}^{2}}{t} - \color{blue}{\left(4 \cdot \frac{y \cdot {z}^{2}}{t} + -4 \cdot y\right)}\right) \]
      2. associate--r+54.1%

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

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

        \[\leadsto t \cdot \left(\left(\frac{x \cdot x}{t} - \color{blue}{\frac{4 \cdot \left(y \cdot {z}^{2}\right)}{t}}\right) - -4 \cdot y\right) \]
      5. div-sub60.8%

        \[\leadsto t \cdot \left(\color{blue}{\frac{x \cdot x - 4 \cdot \left(y \cdot {z}^{2}\right)}{t}} - -4 \cdot y\right) \]
      6. unpow260.8%

        \[\leadsto t \cdot \left(\frac{\color{blue}{{x}^{2}} - 4 \cdot \left(y \cdot {z}^{2}\right)}{t} - -4 \cdot y\right) \]
      7. sub-neg60.8%

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

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

      \[\leadsto \color{blue}{t \cdot \left(y \cdot \left(4 + -4 \cdot \frac{{z}^{2}}{t}\right)\right)} \]
    7. Step-by-step derivation
      1. associate-*r*76.1%

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

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

        \[\leadsto \left(y \cdot t\right) \cdot \left(4 + -4 \cdot \frac{\color{blue}{z \cdot z}}{t}\right) \]
    8. Simplified76.1%

      \[\leadsto \color{blue}{\left(y \cdot t\right) \cdot \left(4 + -4 \cdot \frac{z \cdot z}{t}\right)} \]
    9. Step-by-step derivation
      1. *-commutative76.1%

        \[\leadsto \color{blue}{\left(4 + -4 \cdot \frac{z \cdot z}{t}\right) \cdot \left(y \cdot t\right)} \]
      2. associate-/l*82.1%

        \[\leadsto \left(4 + -4 \cdot \color{blue}{\left(z \cdot \frac{z}{t}\right)}\right) \cdot \left(y \cdot t\right) \]
    10. Applied egg-rr82.1%

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

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

Alternative 7: 94.3% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 92.5%

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

    if 4.0000000000000002e161 < (*.f64 x x)

    1. Initial program 83.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 70.9%

      \[\leadsto \color{blue}{{x}^{2} \cdot \left(1 + -4 \cdot \frac{y \cdot \left({z}^{2} - t\right)}{{x}^{2}}\right)} \]
    4. Step-by-step derivation
      1. unpow270.9%

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

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

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

        \[\leadsto \left(1 + \color{blue}{\frac{-4 \cdot \left(y \cdot \left({z}^{2} - t\right)\right)}{x \cdot x}}\right) \cdot \left(x \cdot x\right) \]
      5. *-commutative70.9%

        \[\leadsto \left(1 + \frac{\color{blue}{\left(y \cdot \left({z}^{2} - t\right)\right) \cdot -4}}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      6. associate-/l*70.9%

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

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

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

      \[\leadsto \left(1 + \color{blue}{-4 \cdot \frac{y \cdot \left({z}^{2} - t\right)}{{x}^{2}}}\right) \cdot \left(x \cdot x\right) \]
    7. Step-by-step derivation
      1. unpow270.9%

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

        \[\leadsto \left(1 + \color{blue}{\frac{-4 \cdot \left(y \cdot \left({z}^{2} - t\right)\right)}{x \cdot x}}\right) \cdot \left(x \cdot x\right) \]
      3. *-commutative70.9%

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

        \[\leadsto \left(1 + \frac{\left(y \cdot \left(\color{blue}{z \cdot z} - t\right)\right) \cdot -4}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      5. associate-*r/70.9%

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

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

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

        \[\leadsto \left(1 + y \cdot \frac{\left(\color{blue}{{z}^{2}} - t\right) \cdot -4}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      9. *-commutative79.6%

        \[\leadsto \left(1 + y \cdot \frac{\color{blue}{-4 \cdot \left({z}^{2} - t\right)}}{x \cdot x}\right) \cdot \left(x \cdot x\right) \]
      10. unpow279.6%

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

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

      \[\leadsto \left(1 + y \cdot \color{blue}{\left(-4 \cdot \frac{{z}^{2}}{{x}^{2}}\right)}\right) \cdot \left(x \cdot x\right) \]
    10. Step-by-step derivation
      1. unpow279.6%

        \[\leadsto \left(1 + y \cdot \left(-4 \cdot \frac{\color{blue}{z \cdot z}}{{x}^{2}}\right)\right) \cdot \left(x \cdot x\right) \]
      2. unpow279.6%

        \[\leadsto \left(1 + y \cdot \left(-4 \cdot \frac{z \cdot z}{\color{blue}{x \cdot x}}\right)\right) \cdot \left(x \cdot x\right) \]
      3. times-frac97.8%

        \[\leadsto \left(1 + y \cdot \left(-4 \cdot \color{blue}{\left(\frac{z}{x} \cdot \frac{z}{x}\right)}\right)\right) \cdot \left(x \cdot x\right) \]
    11. Simplified97.8%

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

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

Alternative 8: 47.7% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \left(\left(z \cdot z\right) \cdot -4\right)\\ \mathbf{if}\;x \leq 3.8 \cdot 10^{-187}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-33}:\\ \;\;\;\;\left(y \cdot 4\right) \cdot t\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+22}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (let* ((t_1 (* y (* (* z z) -4.0))))
   (if (<= x 3.8e-187)
     t_1
     (if (<= x 5.1e-33) (* (* y 4.0) t) (if (<= x 1.25e+22) t_1 (* x x))))))
double code(double x, double y, double z, double t) {
	double t_1 = y * ((z * z) * -4.0);
	double tmp;
	if (x <= 3.8e-187) {
		tmp = t_1;
	} else if (x <= 5.1e-33) {
		tmp = (y * 4.0) * t;
	} else if (x <= 1.25e+22) {
		tmp = t_1;
	} else {
		tmp = x * x;
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * ((z * z) * (-4.0d0))
    if (x <= 3.8d-187) then
        tmp = t_1
    else if (x <= 5.1d-33) then
        tmp = (y * 4.0d0) * t
    else if (x <= 1.25d+22) then
        tmp = t_1
    else
        tmp = x * x
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double t_1 = y * ((z * z) * -4.0);
	double tmp;
	if (x <= 3.8e-187) {
		tmp = t_1;
	} else if (x <= 5.1e-33) {
		tmp = (y * 4.0) * t;
	} else if (x <= 1.25e+22) {
		tmp = t_1;
	} else {
		tmp = x * x;
	}
	return tmp;
}
def code(x, y, z, t):
	t_1 = y * ((z * z) * -4.0)
	tmp = 0
	if x <= 3.8e-187:
		tmp = t_1
	elif x <= 5.1e-33:
		tmp = (y * 4.0) * t
	elif x <= 1.25e+22:
		tmp = t_1
	else:
		tmp = x * x
	return tmp
function code(x, y, z, t)
	t_1 = Float64(y * Float64(Float64(z * z) * -4.0))
	tmp = 0.0
	if (x <= 3.8e-187)
		tmp = t_1;
	elseif (x <= 5.1e-33)
		tmp = Float64(Float64(y * 4.0) * t);
	elseif (x <= 1.25e+22)
		tmp = t_1;
	else
		tmp = Float64(x * x);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	t_1 = y * ((z * z) * -4.0);
	tmp = 0.0;
	if (x <= 3.8e-187)
		tmp = t_1;
	elseif (x <= 5.1e-33)
		tmp = (y * 4.0) * t;
	elseif (x <= 1.25e+22)
		tmp = t_1;
	else
		tmp = x * x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(N[(z * z), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 3.8e-187], t$95$1, If[LessEqual[x, 5.1e-33], N[(N[(y * 4.0), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[x, 1.25e+22], t$95$1, N[(x * x), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;x \leq 1.25 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 3.80000000000000025e-187 or 5.10000000000000008e-33 < x < 1.2499999999999999e22

    1. Initial program 92.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 38.2%

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

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

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

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

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

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

    if 3.80000000000000025e-187 < x < 5.10000000000000008e-33

    1. Initial program 91.9%

      \[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 49.8%

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

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

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

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

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

    if 1.2499999999999999e22 < x

    1. Initial program 78.3%

      \[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 70.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.8 \cdot 10^{-187}:\\ \;\;\;\;y \cdot \left(\left(z \cdot z\right) \cdot -4\right)\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-33}:\\ \;\;\;\;\left(y \cdot 4\right) \cdot t\\ \mathbf{elif}\;x \leq 1.25 \cdot 10^{+22}:\\ \;\;\;\;y \cdot \left(\left(z \cdot z\right) \cdot -4\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot x\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 45.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-6}:\\ \;\;\;\;\left(y \cdot 4\right) \cdot t\\ \mathbf{elif}\;x \leq 3900000000 \lor \neg \left(x \leq 8 \cdot 10^{+15}\right):\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(y \cdot t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t)
 :precision binary64
 (if (<= x 1.65e-6)
   (* (* y 4.0) t)
   (if (or (<= x 3900000000.0) (not (<= x 8e+15))) (* x x) (* 4.0 (* y t)))))
double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= 1.65e-6) {
		tmp = (y * 4.0) * t;
	} else if ((x <= 3900000000.0) || !(x <= 8e+15)) {
		tmp = x * x;
	} else {
		tmp = 4.0 * (y * t);
	}
	return tmp;
}
real(8) function code(x, y, z, t)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8) :: tmp
    if (x <= 1.65d-6) then
        tmp = (y * 4.0d0) * t
    else if ((x <= 3900000000.0d0) .or. (.not. (x <= 8d+15))) then
        tmp = x * x
    else
        tmp = 4.0d0 * (y * t)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t) {
	double tmp;
	if (x <= 1.65e-6) {
		tmp = (y * 4.0) * t;
	} else if ((x <= 3900000000.0) || !(x <= 8e+15)) {
		tmp = x * x;
	} else {
		tmp = 4.0 * (y * t);
	}
	return tmp;
}
def code(x, y, z, t):
	tmp = 0
	if x <= 1.65e-6:
		tmp = (y * 4.0) * t
	elif (x <= 3900000000.0) or not (x <= 8e+15):
		tmp = x * x
	else:
		tmp = 4.0 * (y * t)
	return tmp
function code(x, y, z, t)
	tmp = 0.0
	if (x <= 1.65e-6)
		tmp = Float64(Float64(y * 4.0) * t);
	elseif ((x <= 3900000000.0) || !(x <= 8e+15))
		tmp = Float64(x * x);
	else
		tmp = Float64(4.0 * Float64(y * t));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t)
	tmp = 0.0;
	if (x <= 1.65e-6)
		tmp = (y * 4.0) * t;
	elseif ((x <= 3900000000.0) || ~((x <= 8e+15)))
		tmp = x * x;
	else
		tmp = 4.0 * (y * t);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_] := If[LessEqual[x, 1.65e-6], N[(N[(y * 4.0), $MachinePrecision] * t), $MachinePrecision], If[Or[LessEqual[x, 3900000000.0], N[Not[LessEqual[x, 8e+15]], $MachinePrecision]], N[(x * x), $MachinePrecision], N[(4.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.65 \cdot 10^{-6}:\\
\;\;\;\;\left(y \cdot 4\right) \cdot t\\

\mathbf{elif}\;x \leq 3900000000 \lor \neg \left(x \leq 8 \cdot 10^{+15}\right):\\
\;\;\;\;x \cdot x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < 1.65000000000000008e-6

    1. Initial program 92.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 35.3%

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

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

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

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

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

    if 1.65000000000000008e-6 < x < 3.9e9 or 8e15 < x

    1. Initial program 80.0%

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

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

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

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

    if 3.9e9 < x < 8e15

    1. Initial program 77.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 75.8%

      \[\leadsto \color{blue}{4 \cdot \left(t \cdot y\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 1.65 \cdot 10^{-6}:\\ \;\;\;\;\left(y \cdot 4\right) \cdot t\\ \mathbf{elif}\;x \leq 3900000000 \lor \neg \left(x \leq 8 \cdot 10^{+15}\right):\\ \;\;\;\;x \cdot x\\ \mathbf{else}:\\ \;\;\;\;4 \cdot \left(y \cdot t\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 92.1% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 94.7%

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

    if 9.1999999999999997e161 < z

    1. Initial program 55.9%

      \[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 50.2%

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

        \[\leadsto t \cdot \left(\frac{{x}^{2}}{t} - \color{blue}{\left(4 \cdot \frac{y \cdot {z}^{2}}{t} + -4 \cdot y\right)}\right) \]
      2. associate--r+50.2%

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

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

        \[\leadsto t \cdot \left(\left(\frac{x \cdot x}{t} - \color{blue}{\frac{4 \cdot \left(y \cdot {z}^{2}\right)}{t}}\right) - -4 \cdot y\right) \]
      5. div-sub55.9%

        \[\leadsto t \cdot \left(\color{blue}{\frac{x \cdot x - 4 \cdot \left(y \cdot {z}^{2}\right)}{t}} - -4 \cdot y\right) \]
      6. unpow255.9%

        \[\leadsto t \cdot \left(\frac{\color{blue}{{x}^{2}} - 4 \cdot \left(y \cdot {z}^{2}\right)}{t} - -4 \cdot y\right) \]
      7. sub-neg55.9%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y \cdot \left(-4 \cdot \left(z \cdot z\right)\right) + x \cdot x}{t} + 4 \cdot y\right)} \]
    6. Step-by-step derivation
      1. div-inv55.9%

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

        \[\leadsto t \cdot \left(\color{blue}{\frac{{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)}^{3} + {\left(x \cdot x\right)}^{3}}{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)}} \cdot \frac{1}{t} + 4 \cdot y\right) \]
      3. frac-times0.0%

        \[\leadsto t \cdot \left(\color{blue}{\frac{\left({\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)}^{3} + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t}} + 4 \cdot y\right) \]
      4. cube-mult0.0%

        \[\leadsto t \cdot \left(\frac{\left(\color{blue}{\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right)} + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      5. associate-*r*0.0%

        \[\leadsto t \cdot \left(\frac{\left(\color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)} \cdot \left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      6. associate-*r*0.0%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)} \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right)\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      7. associate-*r*0.0%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \color{blue}{\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)}\right) + {\left(x \cdot x\right)}^{3}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
      8. cube-mult0.0%

        \[\leadsto t \cdot \left(\frac{\left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right) \cdot \left(\left(y \cdot -4\right) \cdot \left(z \cdot z\right)\right)\right) + \color{blue}{\left(x \cdot x\right) \cdot \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right)\right)}\right) \cdot 1}{\left(\left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) + \left(\left(x \cdot x\right) \cdot \left(x \cdot x\right) - \left(y \cdot \left(-4 \cdot \left(z \cdot z\right)\right)\right) \cdot \left(x \cdot x\right)\right)\right) \cdot t} + 4 \cdot y\right) \]
    7. Applied egg-rr0.0%

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

      \[\leadsto t \cdot \left(\color{blue}{{x}^{2} \cdot \left(-4 \cdot \frac{y \cdot {z}^{2}}{t \cdot {x}^{2}} + \frac{1}{t}\right)} + 4 \cdot y\right) \]
    9. Step-by-step derivation
      1. unpow229.3%

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

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

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

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

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\frac{\left(y \cdot {z}^{2}\right) \cdot -4}{\color{blue}{\left(x \cdot x\right) \cdot t}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      6. times-frac32.6%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\frac{y \cdot {z}^{2}}{x \cdot x} \cdot \frac{-4}{t}} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      7. associate-/l*32.6%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\color{blue}{\left(y \cdot \frac{{z}^{2}}{x \cdot x}\right)} \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      8. unpow232.6%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\left(y \cdot \frac{\color{blue}{z \cdot z}}{x \cdot x}\right) \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
      9. times-frac71.9%

        \[\leadsto t \cdot \left(\left(x \cdot x\right) \cdot \left(\left(y \cdot \color{blue}{\left(\frac{z}{x} \cdot \frac{z}{x}\right)}\right) \cdot \frac{-4}{t} + \frac{1}{t}\right) + 4 \cdot y\right) \]
    10. Simplified71.9%

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

      \[\leadsto \color{blue}{t \cdot \left(-4 \cdot \frac{y \cdot {z}^{2}}{t} + 4 \cdot y\right)} \]
    12. Step-by-step derivation
      1. associate-/l*70.2%

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

        \[\leadsto t \cdot \left(-4 \cdot \left(y \cdot \frac{\color{blue}{z \cdot z}}{t}\right) + 4 \cdot y\right) \]
      3. associate-*r/77.8%

        \[\leadsto t \cdot \left(-4 \cdot \left(y \cdot \color{blue}{\left(z \cdot \frac{z}{t}\right)}\right) + 4 \cdot y\right) \]
      4. *-commutative77.8%

        \[\leadsto t \cdot \left(-4 \cdot \left(y \cdot \left(z \cdot \frac{z}{t}\right)\right) + \color{blue}{y \cdot 4}\right) \]
    13. Simplified77.8%

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

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

Alternative 11: 83.2% accurate, 0.8× speedup?

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

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

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


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

    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 x around 0 83.8%

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

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

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

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

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

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

    if 1.54999999999999998e44 < (*.f64 x x)

    1. Initial program 84.7%

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

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

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

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

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

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

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

Alternative 12: 41.7% accurate, 4.3× speedup?

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

\\
x \cdot x
\end{array}
Derivation
  1. Initial program 89.4%

    \[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 42.0%

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

      \[\leadsto \color{blue}{x \cdot x} \]
  5. Simplified42.0%

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

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

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

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