
(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 12 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 (fma y 5.0 (* x (+ (* (+ y z) 2.0) t))))
double code(double x, double y, double z, double t) {
return fma(y, 5.0, (x * (((y + z) * 2.0) + t)));
}
function code(x, y, z, t) return fma(y, 5.0, Float64(x * Float64(Float64(Float64(y + z) * 2.0) + t))) end
code[x_, y_, z_, t_] := N[(y * 5.0 + N[(x * N[(N[(N[(y + z), $MachinePrecision] * 2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, 5, x \cdot \left(\left(y + z\right) \cdot 2 + t\right)\right)
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= x -4e-7)
(* x t)
(if (<= x 9.6e-31)
(* y 5.0)
(if (or (<= x 1.65e+111) (and (not (<= x 9.2e+170)) (<= x 1.62e+209)))
(* 2.0 (* x z))
(* x t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4e-7) {
tmp = x * t;
} else if (x <= 9.6e-31) {
tmp = y * 5.0;
} else if ((x <= 1.65e+111) || (!(x <= 9.2e+170) && (x <= 1.62e+209))) {
tmp = 2.0 * (x * z);
} else {
tmp = 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 <= (-4d-7)) then
tmp = x * t
else if (x <= 9.6d-31) then
tmp = y * 5.0d0
else if ((x <= 1.65d+111) .or. (.not. (x <= 9.2d+170)) .and. (x <= 1.62d+209)) then
tmp = 2.0d0 * (x * z)
else
tmp = x * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -4e-7) {
tmp = x * t;
} else if (x <= 9.6e-31) {
tmp = y * 5.0;
} else if ((x <= 1.65e+111) || (!(x <= 9.2e+170) && (x <= 1.62e+209))) {
tmp = 2.0 * (x * z);
} else {
tmp = x * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -4e-7: tmp = x * t elif x <= 9.6e-31: tmp = y * 5.0 elif (x <= 1.65e+111) or (not (x <= 9.2e+170) and (x <= 1.62e+209)): tmp = 2.0 * (x * z) else: tmp = x * t return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -4e-7) tmp = Float64(x * t); elseif (x <= 9.6e-31) tmp = Float64(y * 5.0); elseif ((x <= 1.65e+111) || (!(x <= 9.2e+170) && (x <= 1.62e+209))) tmp = Float64(2.0 * Float64(x * z)); else tmp = Float64(x * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -4e-7) tmp = x * t; elseif (x <= 9.6e-31) tmp = y * 5.0; elseif ((x <= 1.65e+111) || (~((x <= 9.2e+170)) && (x <= 1.62e+209))) tmp = 2.0 * (x * z); else tmp = x * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -4e-7], N[(x * t), $MachinePrecision], If[LessEqual[x, 9.6e-31], N[(y * 5.0), $MachinePrecision], If[Or[LessEqual[x, 1.65e+111], And[N[Not[LessEqual[x, 9.2e+170]], $MachinePrecision], LessEqual[x, 1.62e+209]]], N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], N[(x * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{-7}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq 9.6 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+111} \lor \neg \left(x \leq 9.2 \cdot 10^{+170}\right) \land x \leq 1.62 \cdot 10^{+209}:\\
\;\;\;\;2 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot t\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* z 2.0)))))
(if (<= x -6e-126)
t_1
(if (<= x 6.2e-31)
(* y 5.0)
(if (or (<= x 3.85e+84) (not (<= x 1.6e+154))) t_1 (* x (* y 2.0)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -6e-126) {
tmp = t_1;
} else if (x <= 6.2e-31) {
tmp = y * 5.0;
} else if ((x <= 3.85e+84) || !(x <= 1.6e+154)) {
tmp = t_1;
} else {
tmp = x * (y * 2.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 = x * (t + (z * 2.0d0))
if (x <= (-6d-126)) then
tmp = t_1
else if (x <= 6.2d-31) then
tmp = y * 5.0d0
else if ((x <= 3.85d+84) .or. (.not. (x <= 1.6d+154))) then
tmp = t_1
else
tmp = x * (y * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -6e-126) {
tmp = t_1;
} else if (x <= 6.2e-31) {
tmp = y * 5.0;
} else if ((x <= 3.85e+84) || !(x <= 1.6e+154)) {
tmp = t_1;
} else {
tmp = x * (y * 2.0);
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (z * 2.0)) tmp = 0 if x <= -6e-126: tmp = t_1 elif x <= 6.2e-31: tmp = y * 5.0 elif (x <= 3.85e+84) or not (x <= 1.6e+154): tmp = t_1 else: tmp = x * (y * 2.0) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(z * 2.0))) tmp = 0.0 if (x <= -6e-126) tmp = t_1; elseif (x <= 6.2e-31) tmp = Float64(y * 5.0); elseif ((x <= 3.85e+84) || !(x <= 1.6e+154)) tmp = t_1; else tmp = Float64(x * Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (z * 2.0)); tmp = 0.0; if (x <= -6e-126) tmp = t_1; elseif (x <= 6.2e-31) tmp = y * 5.0; elseif ((x <= 3.85e+84) || ~((x <= 1.6e+154))) tmp = t_1; else tmp = x * (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e-126], t$95$1, If[LessEqual[x, 6.2e-31], N[(y * 5.0), $MachinePrecision], If[Or[LessEqual[x, 3.85e+84], N[Not[LessEqual[x, 1.6e+154]], $MachinePrecision]], t$95$1, N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{-126}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 3.85 \cdot 10^{+84} \lor \neg \left(x \leq 1.6 \cdot 10^{+154}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot 2\right)\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (+ 5.0 (* x 2.0)))))
(if (<= y -2.55e-30)
t_1
(if (<= y 2.55e-54)
(* x (+ t (* z 2.0)))
(if (<= y 8.8e+89)
(+ (* y 5.0) (* x t))
(if (<= y 1.75e+127) (* x (+ t (* y 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 <= -2.55e-30) {
tmp = t_1;
} else if (y <= 2.55e-54) {
tmp = x * (t + (z * 2.0));
} else if (y <= 8.8e+89) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 1.75e+127) {
tmp = x * (t + (y * 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 <= (-2.55d-30)) then
tmp = t_1
else if (y <= 2.55d-54) then
tmp = x * (t + (z * 2.0d0))
else if (y <= 8.8d+89) then
tmp = (y * 5.0d0) + (x * t)
else if (y <= 1.75d+127) then
tmp = x * (t + (y * 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 <= -2.55e-30) {
tmp = t_1;
} else if (y <= 2.55e-54) {
tmp = x * (t + (z * 2.0));
} else if (y <= 8.8e+89) {
tmp = (y * 5.0) + (x * t);
} else if (y <= 1.75e+127) {
tmp = x * (t + (y * 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 <= -2.55e-30: tmp = t_1 elif y <= 2.55e-54: tmp = x * (t + (z * 2.0)) elif y <= 8.8e+89: tmp = (y * 5.0) + (x * t) elif y <= 1.75e+127: tmp = x * (t + (y * 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 <= -2.55e-30) tmp = t_1; elseif (y <= 2.55e-54) tmp = Float64(x * Float64(t + Float64(z * 2.0))); elseif (y <= 8.8e+89) tmp = Float64(Float64(y * 5.0) + Float64(x * t)); elseif (y <= 1.75e+127) tmp = Float64(x * Float64(t + Float64(y * 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 <= -2.55e-30) tmp = t_1; elseif (y <= 2.55e-54) tmp = x * (t + (z * 2.0)); elseif (y <= 8.8e+89) tmp = (y * 5.0) + (x * t); elseif (y <= 1.75e+127) tmp = x * (t + (y * 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, -2.55e-30], t$95$1, If[LessEqual[y, 2.55e-54], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.8e+89], N[(N[(y * 5.0), $MachinePrecision] + N[(x * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.75e+127], N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $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 -2.55 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-54}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{+89}:\\
\;\;\;\;y \cdot 5 + x \cdot t\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+127}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (* y 2.0))))
(if (<= x -7e+146)
(* x t)
(if (<= x -4.8e-5)
t_1
(if (<= x 7.8e-31)
(* y 5.0)
(if (<= x 3.7e+80) (* 2.0 (* x z)) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (y * 2.0);
double tmp;
if (x <= -7e+146) {
tmp = x * t;
} else if (x <= -4.8e-5) {
tmp = t_1;
} else if (x <= 7.8e-31) {
tmp = y * 5.0;
} else if (x <= 3.7e+80) {
tmp = 2.0 * (x * z);
} 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 = x * (y * 2.0d0)
if (x <= (-7d+146)) then
tmp = x * t
else if (x <= (-4.8d-5)) then
tmp = t_1
else if (x <= 7.8d-31) then
tmp = y * 5.0d0
else if (x <= 3.7d+80) then
tmp = 2.0d0 * (x * z)
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 = x * (y * 2.0);
double tmp;
if (x <= -7e+146) {
tmp = x * t;
} else if (x <= -4.8e-5) {
tmp = t_1;
} else if (x <= 7.8e-31) {
tmp = y * 5.0;
} else if (x <= 3.7e+80) {
tmp = 2.0 * (x * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (y * 2.0) tmp = 0 if x <= -7e+146: tmp = x * t elif x <= -4.8e-5: tmp = t_1 elif x <= 7.8e-31: tmp = y * 5.0 elif x <= 3.7e+80: tmp = 2.0 * (x * z) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(y * 2.0)) tmp = 0.0 if (x <= -7e+146) tmp = Float64(x * t); elseif (x <= -4.8e-5) tmp = t_1; elseif (x <= 7.8e-31) tmp = Float64(y * 5.0); elseif (x <= 3.7e+80) tmp = Float64(2.0 * Float64(x * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (y * 2.0); tmp = 0.0; if (x <= -7e+146) tmp = x * t; elseif (x <= -4.8e-5) tmp = t_1; elseif (x <= 7.8e-31) tmp = y * 5.0; elseif (x <= 3.7e+80) tmp = 2.0 * (x * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7e+146], N[(x * t), $MachinePrecision], If[LessEqual[x, -4.8e-5], t$95$1, If[LessEqual[x, 7.8e-31], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 3.7e+80], N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(y \cdot 2\right)\\
\mathbf{if}\;x \leq -7 \cdot 10^{+146}:\\
\;\;\;\;x \cdot t\\
\mathbf{elif}\;x \leq -4.8 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 3.7 \cdot 10^{+80}:\\
\;\;\;\;2 \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (+ t (* z 2.0)))))
(if (<= x -2.5e-124)
t_1
(if (<= x 9.5e-31)
(* y 5.0)
(if (<= x 6.2e+81) t_1 (* x (+ t (* y 2.0))))))))
double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -2.5e-124) {
tmp = t_1;
} else if (x <= 9.5e-31) {
tmp = y * 5.0;
} else if (x <= 6.2e+81) {
tmp = t_1;
} else {
tmp = x * (t + (y * 2.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 = x * (t + (z * 2.0d0))
if (x <= (-2.5d-124)) then
tmp = t_1
else if (x <= 9.5d-31) then
tmp = y * 5.0d0
else if (x <= 6.2d+81) then
tmp = t_1
else
tmp = x * (t + (y * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * (t + (z * 2.0));
double tmp;
if (x <= -2.5e-124) {
tmp = t_1;
} else if (x <= 9.5e-31) {
tmp = y * 5.0;
} else if (x <= 6.2e+81) {
tmp = t_1;
} else {
tmp = x * (t + (y * 2.0));
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (t + (z * 2.0)) tmp = 0 if x <= -2.5e-124: tmp = t_1 elif x <= 9.5e-31: tmp = y * 5.0 elif x <= 6.2e+81: tmp = t_1 else: tmp = x * (t + (y * 2.0)) return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(t + Float64(z * 2.0))) tmp = 0.0 if (x <= -2.5e-124) tmp = t_1; elseif (x <= 9.5e-31) tmp = Float64(y * 5.0); elseif (x <= 6.2e+81) tmp = t_1; else tmp = Float64(x * Float64(t + Float64(y * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (t + (z * 2.0)); tmp = 0.0; if (x <= -2.5e-124) tmp = t_1; elseif (x <= 9.5e-31) tmp = y * 5.0; elseif (x <= 6.2e+81) tmp = t_1; else tmp = x * (t + (y * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e-124], t$95$1, If[LessEqual[x, 9.5e-31], N[(y * 5.0), $MachinePrecision], If[LessEqual[x, 6.2e+81], t$95$1, N[(x * N[(t + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(t + z \cdot 2\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-31}:\\
\;\;\;\;y \cdot 5\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+81}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + y \cdot 2\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.5e-8) (not (<= x 2.15e-13))) (* x (+ t (+ (* y 2.0) (* z 2.0)))) (+ (* 2.0 (* x z)) (* y 5.0))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.5e-8) || !(x <= 2.15e-13)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (2.0 * (x * z)) + (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 <= (-8.5d-8)) .or. (.not. (x <= 2.15d-13))) then
tmp = x * (t + ((y * 2.0d0) + (z * 2.0d0)))
else
tmp = (2.0d0 * (x * z)) + (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 <= -8.5e-8) || !(x <= 2.15e-13)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (2.0 * (x * z)) + (y * 5.0);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.5e-8) or not (x <= 2.15e-13): tmp = x * (t + ((y * 2.0) + (z * 2.0))) else: tmp = (2.0 * (x * z)) + (y * 5.0) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.5e-8) || !(x <= 2.15e-13)) tmp = Float64(x * Float64(t + Float64(Float64(y * 2.0) + Float64(z * 2.0)))); else tmp = Float64(Float64(2.0 * Float64(x * z)) + Float64(y * 5.0)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -8.5e-8) || ~((x <= 2.15e-13))) tmp = x * (t + ((y * 2.0) + (z * 2.0))); else tmp = (2.0 * (x * z)) + (y * 5.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.5e-8], N[Not[LessEqual[x, 2.15e-13]], $MachinePrecision]], N[(x * N[(t + N[(N[(y * 2.0), $MachinePrecision] + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(2.0 * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{-8} \lor \neg \left(x \leq 2.15 \cdot 10^{-13}\right):\\
\;\;\;\;x \cdot \left(t + \left(y \cdot 2 + z \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(x \cdot z\right) + y \cdot 5\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -2.5) (not (<= x 1.8e-11))) (* x (+ t (+ (* y 2.0) (* z 2.0)))) (+ (* y 5.0) (* x (+ t (* z 2.0))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.5) || !(x <= 1.8e-11)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.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 <= (-2.5d0)) .or. (.not. (x <= 1.8d-11))) then
tmp = x * (t + ((y * 2.0d0) + (z * 2.0d0)))
else
tmp = (y * 5.0d0) + (x * (t + (z * 2.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -2.5) || !(x <= 1.8e-11)) {
tmp = x * (t + ((y * 2.0) + (z * 2.0)));
} else {
tmp = (y * 5.0) + (x * (t + (z * 2.0)));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -2.5) or not (x <= 1.8e-11): tmp = x * (t + ((y * 2.0) + (z * 2.0))) else: tmp = (y * 5.0) + (x * (t + (z * 2.0))) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -2.5) || !(x <= 1.8e-11)) tmp = Float64(x * Float64(t + Float64(Float64(y * 2.0) + Float64(z * 2.0)))); else tmp = Float64(Float64(y * 5.0) + Float64(x * Float64(t + Float64(z * 2.0)))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -2.5) || ~((x <= 1.8e-11))) tmp = x * (t + ((y * 2.0) + (z * 2.0))); else tmp = (y * 5.0) + (x * (t + (z * 2.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -2.5], N[Not[LessEqual[x, 1.8e-11]], $MachinePrecision]], N[(x * N[(t + N[(N[(y * 2.0), $MachinePrecision] + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * 5.0), $MachinePrecision] + N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.5 \lor \neg \left(x \leq 1.8 \cdot 10^{-11}\right):\\
\;\;\;\;x \cdot \left(t + \left(y \cdot 2 + z \cdot 2\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5 + x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= y -9.5e-28) (not (<= y 1.15e-23))) (* y (+ 5.0 (* x 2.0))) (* x (+ t (* z 2.0)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e-28) || !(y <= 1.15e-23)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.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 ((y <= (-9.5d-28)) .or. (.not. (y <= 1.15d-23))) then
tmp = y * (5.0d0 + (x * 2.0d0))
else
tmp = x * (t + (z * 2.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -9.5e-28) || !(y <= 1.15e-23)) {
tmp = y * (5.0 + (x * 2.0));
} else {
tmp = x * (t + (z * 2.0));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -9.5e-28) or not (y <= 1.15e-23): tmp = y * (5.0 + (x * 2.0)) else: tmp = x * (t + (z * 2.0)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -9.5e-28) || !(y <= 1.15e-23)) tmp = Float64(y * Float64(5.0 + Float64(x * 2.0))); else tmp = Float64(x * Float64(t + Float64(z * 2.0))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -9.5e-28) || ~((y <= 1.15e-23))) tmp = y * (5.0 + (x * 2.0)); else tmp = x * (t + (z * 2.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -9.5e-28], N[Not[LessEqual[y, 1.15e-23]], $MachinePrecision]], N[(y * N[(5.0 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(t + N[(z * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{-28} \lor \neg \left(y \leq 1.15 \cdot 10^{-23}\right):\\
\;\;\;\;y \cdot \left(5 + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(t + z \cdot 2\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (+ (* x (+ t (+ y (+ z (+ y z))))) (* y 5.0)))
double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (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 * (t + (y + (z + (y + z))))) + (y * 5.0d0)
end function
public static double code(double x, double y, double z, double t) {
return (x * (t + (y + (z + (y + z))))) + (y * 5.0);
}
def code(x, y, z, t): return (x * (t + (y + (z + (y + z))))) + (y * 5.0)
function code(x, y, z, t) return Float64(Float64(x * Float64(t + Float64(y + Float64(z + Float64(y + z))))) + Float64(y * 5.0)) end
function tmp = code(x, y, z, t) tmp = (x * (t + (y + (z + (y + z))))) + (y * 5.0); end
code[x_, y_, z_, t_] := N[(N[(x * N[(t + N[(y + N[(z + N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * 5.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(t + \left(y + \left(z + \left(y + z\right)\right)\right)\right) + y \cdot 5
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= x -8.2e-7) (not (<= x 2.35e-12))) (* x t) (* y 5.0)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -8.2e-7) || !(x <= 2.35e-12)) {
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 <= (-8.2d-7)) .or. (.not. (x <= 2.35d-12))) 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 <= -8.2e-7) || !(x <= 2.35e-12)) {
tmp = x * t;
} else {
tmp = y * 5.0;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -8.2e-7) or not (x <= 2.35e-12): tmp = x * t else: tmp = y * 5.0 return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -8.2e-7) || !(x <= 2.35e-12)) 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 <= -8.2e-7) || ~((x <= 2.35e-12))) tmp = x * t; else tmp = y * 5.0; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -8.2e-7], N[Not[LessEqual[x, 2.35e-12]], $MachinePrecision]], N[(x * t), $MachinePrecision], N[(y * 5.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{-7} \lor \neg \left(x \leq 2.35 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot 5\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (* y 5.0))
double code(double x, double y, double z, double t) {
return 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 = y * 5.0d0
end function
public static double code(double x, double y, double z, double t) {
return y * 5.0;
}
def code(x, y, z, t): return y * 5.0
function code(x, y, z, t) return Float64(y * 5.0) end
function tmp = code(x, y, z, t) tmp = y * 5.0; end
code[x_, y_, z_, t_] := N[(y * 5.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot 5
\end{array}
herbie shell --seed 2024006
(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)))