Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
\]
↓
\[\begin{array}{l}
t_0 := x \cdot \left(1 - \left(1 - y\right) \cdot z\right)\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{+58} \lor \neg \left(t_0 \leq 8 \cdot 10^{-36}\right):\\
\;\;\;\;y \cdot \left(x \cdot z\right) + x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* (- 1.0 y) z)))) ↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (- 1.0 (* (- 1.0 y) z)))))
(if (or (<= t_0 -2e+58) (not (<= t_0 8e-36)))
(+ (* y (* x z)) (* x (- 1.0 z)))
t_0))) double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
↓
double code(double x, double y, double z) {
double t_0 = x * (1.0 - ((1.0 - y) * z));
double tmp;
if ((t_0 <= -2e+58) || !(t_0 <= 8e-36)) {
tmp = (y * (x * z)) + (x * (1.0 - z));
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x * (1.0d0 - ((1.0d0 - y) * z))
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x * (1.0d0 - ((1.0d0 - y) * z))
if ((t_0 <= (-2d+58)) .or. (.not. (t_0 <= 8d-36))) then
tmp = (y * (x * z)) + (x * (1.0d0 - z))
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return x * (1.0 - ((1.0 - y) * z));
}
↓
public static double code(double x, double y, double z) {
double t_0 = x * (1.0 - ((1.0 - y) * z));
double tmp;
if ((t_0 <= -2e+58) || !(t_0 <= 8e-36)) {
tmp = (y * (x * z)) + (x * (1.0 - z));
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z):
return x * (1.0 - ((1.0 - y) * z))
↓
def code(x, y, z):
t_0 = x * (1.0 - ((1.0 - y) * z))
tmp = 0
if (t_0 <= -2e+58) or not (t_0 <= 8e-36):
tmp = (y * (x * z)) + (x * (1.0 - z))
else:
tmp = t_0
return tmp
function code(x, y, z)
return Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z)))
end
↓
function code(x, y, z)
t_0 = Float64(x * Float64(1.0 - Float64(Float64(1.0 - y) * z)))
tmp = 0.0
if ((t_0 <= -2e+58) || !(t_0 <= 8e-36))
tmp = Float64(Float64(y * Float64(x * z)) + Float64(x * Float64(1.0 - z)));
else
tmp = t_0;
end
return tmp
end
function tmp = code(x, y, z)
tmp = x * (1.0 - ((1.0 - y) * z));
end
↓
function tmp_2 = code(x, y, z)
t_0 = x * (1.0 - ((1.0 - y) * z));
tmp = 0.0;
if ((t_0 <= -2e+58) || ~((t_0 <= 8e-36)))
tmp = (y * (x * z)) + (x * (1.0 - z));
else
tmp = t_0;
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(1.0 - N[(N[(1.0 - y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$0, -2e+58], N[Not[LessEqual[t$95$0, 8e-36]], $MachinePrecision]], N[(N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(x * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]
x \cdot \left(1 - \left(1 - y\right) \cdot z\right)
↓
\begin{array}{l}
t_0 := x \cdot \left(1 - \left(1 - y\right) \cdot z\right)\\
\mathbf{if}\;t_0 \leq -2 \cdot 10^{+58} \lor \neg \left(t_0 \leq 8 \cdot 10^{-36}\right):\\
\;\;\;\;y \cdot \left(x \cdot z\right) + x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
Alternatives Alternative 1 Accuracy 99.4% Cost 1352
\[\begin{array}{l}
t_0 := \left(1 - y\right) \cdot z\\
\mathbf{if}\;t_0 \leq -5 \cdot 10^{+144}:\\
\;\;\;\;z \cdot \left(x \cdot \left(y + -1\right)\right)\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;x \cdot \left(1 - t_0\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\end{array}
\]
Alternative 2 Accuracy 80.1% Cost 849
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+236}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+125} \lor \neg \left(y \leq -3.5 \cdot 10^{+27}\right) \land y \leq 1.15 \cdot 10^{+34}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\end{array}
\]
Alternative 3 Accuracy 67.2% Cost 848
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
t_1 := y \cdot \left(x \cdot z\right)\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{+216}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 4 Accuracy 67.0% Cost 848
\[\begin{array}{l}
t_0 := x \cdot \left(-z\right)\\
\mathbf{if}\;z \leq -3.8 \cdot 10^{+83}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{-36}:\\
\;\;\;\;x \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+216}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot z\right)\\
\end{array}
\]
Alternative 5 Accuracy 85.1% Cost 713
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{-34} \lor \neg \left(z \leq 0.0092\right):\\
\;\;\;\;z \cdot \left(x \cdot \left(y + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\end{array}
\]
Alternative 6 Accuracy 96.6% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \lor \neg \left(y \leq 1\right):\\
\;\;\;\;x + y \cdot \left(x \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\end{array}
\]
Alternative 7 Accuracy 85.1% Cost 712
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-34}:\\
\;\;\;\;z \cdot \left(x \cdot y - x\right)\\
\mathbf{elif}\;z \leq 55:\\
\;\;\;\;x \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot \left(y + -1\right)\right)\\
\end{array}
\]
Alternative 8 Accuracy 98.4% Cost 712
\[\begin{array}{l}
\mathbf{if}\;z \leq -6700:\\
\;\;\;\;z \cdot \left(x \cdot y - x\right)\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x \cdot \left(1 + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(x \cdot \left(y + -1\right)\right)\\
\end{array}
\]
Alternative 9 Accuracy 69.8% Cost 521
\[\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x \cdot \left(-z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 10 Accuracy 48.2% Cost 64
\[x
\]