
(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:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(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}
if (*.f64 x x) < 1.0000000000000001e54Initial program 93.4%
fma-neg93.5%
distribute-rgt-neg-in93.5%
sub-neg93.5%
+-commutative93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
sub-neg93.5%
Simplified93.5%
if 1.0000000000000001e54 < (*.f64 x x) Initial program 84.1%
Taylor expanded in x around inf 73.3%
unpow273.3%
*-commutative73.3%
unpow273.3%
associate-*r/73.3%
*-commutative73.3%
associate-/l*73.3%
unpow273.3%
Simplified73.3%
Taylor expanded in t around inf 73.1%
associate-*r/73.1%
*-commutative73.1%
unpow273.1%
*-commutative73.1%
times-frac76.0%
associate-/l*80.5%
unpow280.5%
times-frac98.1%
unpow298.1%
Simplified98.1%
Final simplification95.5%
(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}
if (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)) < 2e297Initial program 95.5%
if 2e297 < (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)) Initial program 60.8%
Taylor expanded in t around inf 54.1%
+-commutative54.1%
associate--r+54.1%
unpow254.1%
associate-*r/54.1%
div-sub60.8%
unpow260.8%
sub-neg60.8%
Simplified60.8%
div-inv60.8%
flip3-+4.4%
frac-times4.4%
cube-mult4.4%
associate-*r*4.4%
associate-*r*4.4%
associate-*r*4.4%
cube-mult4.4%
Applied egg-rr4.4%
Taylor expanded in x around inf 46.9%
unpow246.9%
associate-*r/46.9%
*-commutative46.9%
unpow246.9%
*-commutative46.9%
times-frac51.6%
associate-/l*56.1%
unpow256.1%
times-frac82.3%
Simplified82.3%
*-commutative82.3%
associate-*l*93.6%
*-commutative93.6%
Applied egg-rr93.6%
Final simplification95.2%
(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}
if (*.f64 x x) < 1.0000000000000001e54Initial program 93.4%
if 1.0000000000000001e54 < (*.f64 x x) Initial program 84.1%
Taylor expanded in x around inf 73.3%
unpow273.3%
*-commutative73.3%
unpow273.3%
associate-*r/73.3%
*-commutative73.3%
associate-/l*73.3%
unpow273.3%
Simplified73.3%
Taylor expanded in t around inf 73.1%
associate-*r/73.1%
*-commutative73.1%
unpow273.1%
*-commutative73.1%
times-frac76.0%
associate-/l*80.5%
unpow280.5%
times-frac98.1%
unpow298.1%
Simplified98.1%
Final simplification95.5%
(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}
if (*.f64 x x) < 2.4000000000000002e50 or 1.2999999999999999e133 < (*.f64 x x) < 6.5000000000000002e151Initial program 92.4%
Taylor expanded in x around 0 82.7%
*-commutative82.7%
*-commutative82.7%
unpow282.7%
*-commutative82.7%
Simplified82.7%
if 2.4000000000000002e50 < (*.f64 x x) < 1.2999999999999999e133 or 6.5000000000000002e151 < (*.f64 x x) Initial program 85.3%
Taylor expanded in x around inf 79.9%
unpow279.9%
Simplified79.9%
Final simplification81.5%
(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}
if (*.f64 x x) < 2.7500000000000002e-12 or 4.4e18 < (*.f64 x x) < 2.74999999999999992e32Initial program 93.3%
Taylor expanded in t around inf 49.8%
if 2.7500000000000002e-12 < (*.f64 x x) < 4.4e18 or 2.74999999999999992e32 < (*.f64 x x) Initial program 85.5%
Taylor expanded in x around inf 71.7%
unpow271.7%
Simplified71.7%
Final simplification60.8%
(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}
if (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)) < 2e297Initial program 95.5%
if 2e297 < (*.f64 (*.f64 y #s(literal 4 binary64)) (-.f64 (*.f64 z z) t)) Initial program 60.8%
Taylor expanded in t around inf 54.1%
+-commutative54.1%
associate--r+54.1%
unpow254.1%
associate-*r/54.1%
div-sub60.8%
unpow260.8%
sub-neg60.8%
Simplified60.8%
Taylor expanded in y around inf 76.4%
associate-*r*76.1%
*-commutative76.1%
unpow276.1%
Simplified76.1%
*-commutative76.1%
associate-/l*82.1%
Applied egg-rr82.1%
Final simplification93.2%
(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}
if (*.f64 x x) < 4.0000000000000002e161Initial program 92.5%
if 4.0000000000000002e161 < (*.f64 x x) Initial program 83.9%
Taylor expanded in x around inf 70.9%
unpow270.9%
*-commutative70.9%
unpow270.9%
associate-*r/70.9%
*-commutative70.9%
associate-/l*70.9%
unpow270.9%
Simplified70.9%
Taylor expanded in y around 0 70.9%
unpow270.9%
associate-*r/70.9%
*-commutative70.9%
unpow270.9%
associate-*r/70.9%
associate-*r*79.6%
associate-*r/79.6%
unpow279.6%
*-commutative79.6%
unpow279.6%
Simplified79.6%
Taylor expanded in z around inf 79.6%
unpow279.6%
unpow279.6%
times-frac97.8%
Simplified97.8%
Final simplification94.4%
(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}
if x < 3.80000000000000025e-187 or 5.10000000000000008e-33 < x < 1.2499999999999999e22Initial program 92.2%
Taylor expanded in z around inf 38.2%
unpow238.2%
associate-*r*38.2%
*-commutative38.2%
associate-*l*38.2%
Simplified38.2%
if 3.80000000000000025e-187 < x < 5.10000000000000008e-33Initial program 91.9%
Taylor expanded in t around inf 49.8%
*-commutative49.8%
associate-*r*49.9%
*-commutative49.9%
Simplified49.9%
if 1.2499999999999999e22 < x Initial program 78.3%
Taylor expanded in x around inf 70.9%
unpow270.9%
Simplified70.9%
Final simplification46.2%
(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}
if x < 1.65000000000000008e-6Initial program 92.5%
Taylor expanded in t around inf 35.3%
*-commutative35.3%
associate-*r*35.3%
*-commutative35.3%
Simplified35.3%
if 1.65000000000000008e-6 < x < 3.9e9 or 8e15 < x Initial program 80.0%
Taylor expanded in x around inf 65.4%
unpow265.4%
Simplified65.4%
if 3.9e9 < x < 8e15Initial program 77.4%
Taylor expanded in t around inf 75.8%
Final simplification42.8%
(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}
if z < 9.1999999999999997e161Initial program 94.7%
if 9.1999999999999997e161 < z Initial program 55.9%
Taylor expanded in t around inf 50.2%
+-commutative50.2%
associate--r+50.2%
unpow250.2%
associate-*r/50.2%
div-sub55.9%
unpow255.9%
sub-neg55.9%
Simplified55.9%
div-inv55.9%
flip3-+0.0%
frac-times0.0%
cube-mult0.0%
associate-*r*0.0%
associate-*r*0.0%
associate-*r*0.0%
cube-mult0.0%
Applied egg-rr0.0%
Taylor expanded in x around inf 29.3%
unpow229.3%
associate-*r/29.3%
*-commutative29.3%
unpow229.3%
*-commutative29.3%
times-frac32.6%
associate-/l*32.6%
unpow232.6%
times-frac71.9%
Simplified71.9%
Taylor expanded in x around 0 70.2%
associate-/l*70.2%
unpow270.2%
associate-*r/77.8%
*-commutative77.8%
Simplified77.8%
Final simplification92.4%
(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}
if (*.f64 x x) < 1.54999999999999998e44Initial program 93.3%
Taylor expanded in x around 0 83.8%
*-commutative83.8%
*-commutative83.8%
unpow283.8%
*-commutative83.8%
Simplified83.8%
if 1.54999999999999998e44 < (*.f64 x x) Initial program 84.7%
Taylor expanded in z around 0 81.1%
*-commutative81.1%
*-commutative81.1%
associate-*l*81.1%
Simplified81.1%
Final simplification82.6%
(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}
Initial program 89.4%
Taylor expanded in x around inf 42.0%
unpow242.0%
Simplified42.0%
(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}
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))))