
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
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 * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
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 * ((((y + z) + z) + y) + t)) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * ((((y + z) + z) + y) + t)) + (y * 5.0);
}
def code(x, y, z, t): return (x * ((((y + z) + z) + y) + t)) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(Float64(Float64(Float64(y + z) + z) + y) + t)) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * ((((y + z) + z) + y) + t)) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(N[(N[(N[(y + z), $MachinePrecision] + z), $MachinePrecision] + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -2e+155) (not (<= x 2e+50))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y (+ 5.0 (* x 2.0))) (* x (+ t (* 2.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2e+155) || !(x <= 2e+50)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * (5.0 + (x * 2.0))) + (x * (t + (2.0 * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-2d+155)) .or. (.not. (x <= 2d+50))) then
tmp = x * ((2.0d0 * (y + z)) + t)
else
tmp = (y * (5.0d0 + (x * 2.0d0))) + (x * (t + (2.0d0 * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2e+155) || !(x <= 2e+50)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * (5.0 + (x * 2.0))) + (x * (t + (2.0 * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2e+155) or not (x <= 2e+50): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * (5.0 + (x * 2.0))) + (x * (t + (2.0 * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2e+155) || !(x <= 2e+50)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); else tmp = Float64(Float64(y * Float64(5.0 + Float64(x * 2.0))) + Float64(x * Float64(t + Float64(2.0 * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2e+155) || ~((x <= 2e+50))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * (5.0 + (x * 2.0))) + (x * (t + (2.0 * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2e+155], N[Not[LessEqual[x, 2e+50]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+155} \lor \neg \left(x \leq 2 \cdot 10^{+50}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right) + x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (fma x (+ (* 2.0 (+ y z)) t) (* y 5.0)))
double code(double x, double y, double z, double t) {
return fma(x, ((2.0 * (y + z)) + t), (y * 5.0));
}
function code(x, y, z, t) return fma(x, Float64(Float64(2.0 * Float64(y + z)) + t), Float64(y * 5.0)) end
code[x_, y_, z_, t_] := N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, 2 \cdot \left(y + z\right) + t, y \cdot 5\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (+ y z)))
(t_2 (+ (* y 5.0) (* x t_1)))
(t_3 (* x (+ t_1 t))))
(if (<= x -1.22e+22)
t_3
(if (<= x -4.8e-152)
t_2
(if (<= x -1.24e-231)
(+ (* y 5.0) (* x t))
(if (<= x 1350000.0) t_2 t_3))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (y + z);
double t_2 = (y * 5.0) + (x * t_1);
double t_3 = x * (t_1 + t);
double tmp;
if (x <= -1.22e+22) {
tmp = t_3;
} else if (x <= -4.8e-152) {
tmp = t_2;
} else if (x <= -1.24e-231) {
tmp = (y * 5.0) + (x * t);
} else if (x <= 1350000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 2.0d0 * (y + z)
t_2 = (y * 5.0d0) + (x * t_1)
t_3 = x * (t_1 + t)
if (x <= (-1.22d+22)) then
tmp = t_3
else if (x <= (-4.8d-152)) then
tmp = t_2
else if (x <= (-1.24d-231)) then
tmp = (y * 5.0d0) + (x * t)
else if (x <= 1350000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (y + z);
double t_2 = (y * 5.0) + (x * t_1);
double t_3 = x * (t_1 + t);
double tmp;
if (x <= -1.22e+22) {
tmp = t_3;
} else if (x <= -4.8e-152) {
tmp = t_2;
} else if (x <= -1.24e-231) {
tmp = (y * 5.0) + (x * t);
} else if (x <= 1350000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (y + z) t_2 = (y * 5.0) + (x * t_1) t_3 = x * (t_1 + t) tmp = 0 if x <= -1.22e+22: tmp = t_3 elif x <= -4.8e-152: tmp = t_2 elif x <= -1.24e-231: tmp = (y * 5.0) + (x * t) elif x <= 1350000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(y + z)) t_2 = Float64(Float64(y * 5.0) + Float64(x * t_1)) t_3 = Float64(x * Float64(t_1 + t)) tmp = 0.0 if (x <= -1.22e+22) tmp = t_3; elseif (x <= -4.8e-152) tmp = t_2; elseif (x <= -1.24e-231) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (x <= 1350000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (y + z); t_2 = (y * 5.0) + (x * t_1); t_3 = x * (t_1 + t); tmp = 0.0; if (x <= -1.22e+22) tmp = t_3; elseif (x <= -4.8e-152) tmp = t_2; elseif (x <= -1.24e-231) tmp = (y * 5.0) + (x * t); elseif (x <= 1350000.0) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * 5.0), $MachinePrecision] + N[(x * t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(t$95$1 + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e+22], t$95$3, If[LessEqual[x, -4.8e-152], t$95$2, If[LessEqual[x, -1.24e-231], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1350000.0], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(y + z\right)\\
t_2 := y \cdot 5 + x \cdot t_1\\
t_3 := x \cdot \left(t_1 + t\right)\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+22}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-152}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.24 \cdot 10^{-231}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;x \leq 1350000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 (* x 2.0)))))
(if (<= y -1750000000.0)
t_1
(if (<= y 4.8e-61)
(* x (+ t (* 2.0 z)))
(if (<= y 1.9e+53)
(+ (* y 5.0) (* x t))
(if (<= y 2.4e+60) (* (+ y z) (* x 2.0)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -1750000000.0) {
tmp = t_1;
} else if (y <= 4.8e-61) {
tmp = x * (t + (2.0 * z));
} else if (y <= 1.9e+53) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 2.4e+60) {
tmp = (y + z) * (x * 2.0);
} else {
tmp = t_1;
}
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 * (5.0d0 + (x * 2.0d0))
if (y <= (-1750000000.0d0)) then
tmp = t_1
else if (y <= 4.8d-61) then
tmp = x * (t + (2.0d0 * z))
else if (y <= 1.9d+53) then
tmp = (y * 5.0d0) + (x * t)
else if (y <= 2.4d+60) then
tmp = (y + z) * (x * 2.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (5.0 + (x * 2.0));
double tmp;
if (y <= -1750000000.0) {
tmp = t_1;
} else if (y <= 4.8e-61) {
tmp = x * (t + (2.0 * z));
} else if (y <= 1.9e+53) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 2.4e+60) {
tmp = (y + z) * (x * 2.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (5.0 + (x * 2.0)) tmp = 0 if y <= -1750000000.0: tmp = t_1 elif y <= 4.8e-61: tmp = x * (t + (2.0 * z)) elif y <= 1.9e+53: tmp = (y * 5.0) + (x * t) elif y <= 2.4e+60: tmp = (y + z) * (x * 2.0) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(5.0 + Float64(x * 2.0))) tmp = 0.0 if (y <= -1750000000.0) tmp = t_1; elseif (y <= 4.8e-61) tmp = Float64(x * Float64(t + Float64(2.0 * z))); elseif (y <= 1.9e+53) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (y <= 2.4e+60) tmp = Float64(Float64(y + z) * Float64(x * 2.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (5.0 + (x * 2.0)); tmp = 0.0; if (y <= -1750000000.0) tmp = t_1; elseif (y <= 4.8e-61) tmp = x * (t + (2.0 * z)); elseif (y <= 1.9e+53) tmp = (y * 5.0) + (x * t); elseif (y <= 2.4e+60) tmp = (y + z) * (x * 2.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1750000000.0], t$95$1, If[LessEqual[y, 4.8e-61], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+53], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.4e+60], N[(N[(y + z), $MachinePrecision] * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{if}\;y \leq -1750000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-61}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+53}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+60}:\\
\;\;\;\;\left(y + z\right) \cdot \left(x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -175000.0) (not (<= x 2.8e-7))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y 5.0) (* x (+ t (* 2.0 z))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -175000.0) || !(x <= 2.8e-7)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * (t + (2.0 * z)));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-175000.0d0)) .or. (.not. (x <= 2.8d-7))) then
tmp = x * ((2.0d0 * (y + z)) + t)
else
tmp = (y * 5.0d0) + (x * (t + (2.0d0 * z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -175000.0) || !(x <= 2.8e-7)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * (t + (2.0 * z)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -175000.0) or not (x <= 2.8e-7): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * 5.0) + (x * (t + (2.0 * z))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -175000.0) || !(x <= 2.8e-7)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(2.0 * z)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -175000.0) || ~((x <= 2.8e-7))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * 5.0) + (x * (t + (2.0 * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -175000.0], N[Not[LessEqual[x, 2.8e-7]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -175000 \lor \neg \left(x \leq 2.8 \cdot 10^{-7}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (* y 5.0) (* x (+ t (+ y (+ z (+ y z)))))))
double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
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 = (y * 5.0d0) + (x * (t + (y + (z + (y + z)))))
end function
public static double code(double x, double y, double z, double t) {
return (y * 5.0) + (x * (t + (y + (z + (y + z)))));
}
def code(x, y, z, t): return (y * 5.0) + (x * (t + (y + (z + (y + z)))))
function code(x, y, z, t) return Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z)))))) end
function tmp = code(x, y, z, t) tmp = (y * 5.0) + (x * (t + (y + (z + (y + z))))); end
code[x_, y_, z_, t_] := N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5 + x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (* x z))))
(if (<= x -3.9e+238)
t_1
(if (<= x -6.7e+145)
(* x t)
(if (or (<= x -1e-7) (not (<= x 2.85e-52))) t_1 (* y 5.0))))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+238) {
tmp = t_1;
} else if (x <= -6.7e+145) {
tmp = x * t;
} else if ((x <= -1e-7) || !(x <= 2.85e-52)) {
tmp = t_1;
} else {
tmp = y * 5.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) :: t_1
real(8) :: tmp
t_1 = 2.0d0 * (x * z)
if (x <= (-3.9d+238)) then
tmp = t_1
else if (x <= (-6.7d+145)) then
tmp = x * t
else if ((x <= (-1d-7)) .or. (.not. (x <= 2.85d-52))) then
tmp = t_1
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+238) {
tmp = t_1;
} else if (x <= -6.7e+145) {
tmp = x * t;
} else if ((x <= -1e-7) || !(x <= 2.85e-52)) {
tmp = t_1;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) tmp = 0 if x <= -3.9e+238: tmp = t_1 elif x <= -6.7e+145: tmp = x * t elif (x <= -1e-7) or not (x <= 2.85e-52): tmp = t_1 else: tmp = y * 5.0 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) tmp = 0.0 if (x <= -3.9e+238) tmp = t_1; elseif (x <= -6.7e+145) tmp = Float64(x * t); elseif ((x <= -1e-7) || !(x <= 2.85e-52)) tmp = t_1; else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); tmp = 0.0; if (x <= -3.9e+238) tmp = t_1; elseif (x <= -6.7e+145) tmp = x * t; elseif ((x <= -1e-7) || ~((x <= 2.85e-52))) tmp = t_1; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+238], t$95$1, If[LessEqual[x, -6.7e+145], N[(x * t), $MachinePrecision], If[Or[LessEqual[x, -1e-7], N[Not[LessEqual[x, 2.85e-52]], $MachinePrecision]], t$95$1, N[(y * 5.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+238}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6.7 \cdot 10^{+145}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-7} \lor \neg \left(x \leq 2.85 \cdot 10^{-52}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -5.2e-6) (not (<= x 1.1e-52))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y 5.0) (* x t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.2e-6) || !(x <= 1.1e-52)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * 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 <= (-5.2d-6)) .or. (.not. (x <= 1.1d-52))) then
tmp = x * ((2.0d0 * (y + z)) + t)
else
tmp = (y * 5.0d0) + (x * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -5.2e-6) || !(x <= 1.1e-52)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (x * t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -5.2e-6) or not (x <= 1.1e-52): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * 5.0) + (x * t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -5.2e-6) || !(x <= 1.1e-52)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); else tmp = Float64(Float64(y * 5.0) + Float64(x * t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -5.2e-6) || ~((x <= 1.1e-52))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * 5.0) + (x * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -5.2e-6], N[Not[LessEqual[x, 1.1e-52]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{-6} \lor \neg \left(x \leq 1.1 \cdot 10^{-52}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.35e-44) (not (<= x 3.7e-9))) (* x (+ (* 2.0 (+ y z)) t)) (+ (* y 5.0) (* 2.0 (* x z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.35e-44) || !(x <= 3.7e-9)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-1.35d-44)) .or. (.not. (x <= 3.7d-9))) then
tmp = x * ((2.0d0 * (y + z)) + t)
else
tmp = (y * 5.0d0) + (2.0d0 * (x * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.35e-44) || !(x <= 3.7e-9)) {
tmp = x * ((2.0 * (y + z)) + t);
} else {
tmp = (y * 5.0) + (2.0 * (x * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.35e-44) or not (x <= 3.7e-9): tmp = x * ((2.0 * (y + z)) + t) else: tmp = (y * 5.0) + (2.0 * (x * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.35e-44) || !(x <= 3.7e-9)) tmp = Float64(x * Float64(Float64(2.0 * Float64(y + z)) + t)); else tmp = Float64(Float64(y * 5.0) + Float64(2.0 * Float64(x * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.35e-44) || ~((x <= 3.7e-9))) tmp = x * ((2.0 * (y + z)) + t); else tmp = (y * 5.0) + (2.0 * (x * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.35e-44], N[Not[LessEqual[x, 3.7e-9]], $MachinePrecision]], N[(x * N[(N[(2.0 * N[(y + z), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{-44} \lor \neg \left(x \leq 3.7 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot \left(2 \cdot \left(y + z\right) + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + 2 \cdot \left(x \cdot z\right)\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* 2.0 (* x z))))
(if (<= x -3.9e+183)
t_1
(if (<= x -175000.0) (* y (* x 2.0)) (if (<= x 4.5e-52) (* y 5.0) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+183) {
tmp = t_1;
} else if (x <= -175000.0) {
tmp = y * (x * 2.0);
} else if (x <= 4.5e-52) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
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 = 2.0d0 * (x * z)
if (x <= (-3.9d+183)) then
tmp = t_1
else if (x <= (-175000.0d0)) then
tmp = y * (x * 2.0d0)
else if (x <= 4.5d-52) then
tmp = y * 5.0d0
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = 2.0 * (x * z);
double tmp;
if (x <= -3.9e+183) {
tmp = t_1;
} else if (x <= -175000.0) {
tmp = y * (x * 2.0);
} else if (x <= 4.5e-52) {
tmp = y * 5.0;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 2.0 * (x * z) tmp = 0 if x <= -3.9e+183: tmp = t_1 elif x <= -175000.0: tmp = y * (x * 2.0) elif x <= 4.5e-52: tmp = y * 5.0 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(2.0 * Float64(x * z)) tmp = 0.0 if (x <= -3.9e+183) tmp = t_1; elseif (x <= -175000.0) tmp = Float64(y * Float64(x * 2.0)); elseif (x <= 4.5e-52) tmp = Float64(y * 5.0); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 2.0 * (x * z); tmp = 0.0; if (x <= -3.9e+183) tmp = t_1; elseif (x <= -175000.0) tmp = y * (x * 2.0); elseif (x <= 4.5e-52) tmp = y * 5.0; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.9e+183], t$95$1, If[LessEqual[x, -175000.0], N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e-52], N[(y * 5.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 2 \cdot \left(x \cdot z\right)\\
\mathbf{if}\;x \leq -3.9 \cdot 10^{+183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -175000:\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-52}:\\
\;\;\;\;y \cdot 5\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -6.2e+47) (not (<= y 8.2e+149))) (* y (* x 2.0)) (* x (+ t (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+47) || !(y <= 8.2e+149)) {
tmp = y * (x * 2.0);
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-6.2d+47)) .or. (.not. (y <= 8.2d+149))) then
tmp = y * (x * 2.0d0)
else
tmp = x * (t + (2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -6.2e+47) || !(y <= 8.2e+149)) {
tmp = y * (x * 2.0);
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -6.2e+47) or not (y <= 8.2e+149): tmp = y * (x * 2.0) else: tmp = x * (t + (2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -6.2e+47) || !(y <= 8.2e+149)) tmp = Float64(y * Float64(x * 2.0)); else tmp = Float64(x * Float64(t + Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -6.2e+47) || ~((y <= 8.2e+149))) tmp = y * (x * 2.0); else tmp = x * (t + (2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -6.2e+47], N[Not[LessEqual[y, 8.2e+149]], $MachinePrecision]], N[(y * N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+47} \lor \neg \left(y \leq 8.2 \cdot 10^{+149}\right):\\
\;\;\;\;y \cdot \left(x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -1700000000.0) (not (<= y 7e+41))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* 2.0 z)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1700000000.0) || !(y <= 7e+41)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1700000000.0d0)) .or. (.not. (y <= 7d+41))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (2.0d0 * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1700000000.0) || !(y <= 7e+41)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (2.0 * z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1700000000.0) or not (y <= 7e+41): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (2.0 * z)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1700000000.0) || !(y <= 7e+41)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(2.0 * z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1700000000.0) || ~((y <= 7e+41))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (2.0 * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1700000000.0], N[Not[LessEqual[y, 7e+41]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(2.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1700000000 \lor \neg \left(y \leq 7 \cdot 10^{+41}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + 2 \cdot z\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -4.5e-32) (not (<= x 6e-8))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.5e-32) || !(x <= 6e-8)) {
tmp = x * t;
} else {
tmp = y * 5.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 <= (-4.5d-32)) .or. (.not. (x <= 6d-8))) then
tmp = x * t
else
tmp = y * 5.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.5e-32) || !(x <= 6e-8)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -4.5e-32) or not (x <= 6e-8): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -4.5e-32) || !(x <= 6e-8)) tmp = Float64(x * t); else tmp = Float64(y * 5.0); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -4.5e-32) || ~((x <= 6e-8))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.5e-32], N[Not[LessEqual[x, 6e-8]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-32} \lor \neg \left(x \leq 6 \cdot 10^{-8}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (* x t))
double code(double x, double y, double z, double t) {
return x * 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 * t
end function
public static double code(double x, double y, double z, double t) {
return x * t;
}
def code(x, y, z, t): return x * t
function code(x, y, z, t) return Float64(x * t) end
function tmp = code(x, y, z, t) tmp = x * t; end
code[x_, y_, z_, t_] := N[(x * t), $MachinePrecision]
\begin{array}{l}
\\
x \cdot t
\end{array}
herbie shell --seed 2024010
(FPCore (x y z t)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
:precision binary64
(+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5.0)))