Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x + \frac{\left(y - x\right) \cdot z}{t}
\]
↓
\[\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+298} \lor \neg \left(t_1 \leq -1 \cdot 10^{-139} \lor \neg \left(t_1 \leq 5 \cdot 10^{-177}\right) \land t_1 \leq 2 \cdot 10^{+297}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t))) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) z) t))))
(if (or (<= t_1 -5e+298)
(not
(or (<= t_1 -1e-139) (and (not (<= t_1 5e-177)) (<= t_1 2e+297)))))
(+ x (* z (/ (- y x) t)))
t_1))) double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
double code(double x, double y, double z, double t) {
double t_1 = x + (((y - x) * z) / t);
double tmp;
if ((t_1 <= -5e+298) || !((t_1 <= -1e-139) || (!(t_1 <= 5e-177) && (t_1 <= 2e+297)))) {
tmp = x + (z * ((y - x) / t));
} 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
code = x + (((y - x) * z) / t)
end function
↓
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 - x) * z) / t)
if ((t_1 <= (-5d+298)) .or. (.not. (t_1 <= (-1d-139)) .or. (.not. (t_1 <= 5d-177)) .and. (t_1 <= 2d+297))) then
tmp = x + (z * ((y - x) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = x + (((y - x) * z) / t);
double tmp;
if ((t_1 <= -5e+298) || !((t_1 <= -1e-139) || (!(t_1 <= 5e-177) && (t_1 <= 2e+297)))) {
tmp = x + (z * ((y - x) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t):
return x + (((y - x) * z) / t)
↓
def code(x, y, z, t):
t_1 = x + (((y - x) * z) / t)
tmp = 0
if (t_1 <= -5e+298) or not ((t_1 <= -1e-139) or (not (t_1 <= 5e-177) and (t_1 <= 2e+297))):
tmp = x + (z * ((y - x) / t))
else:
tmp = t_1
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
↓
function code(x, y, z, t)
t_1 = Float64(x + Float64(Float64(Float64(y - x) * z) / t))
tmp = 0.0
if ((t_1 <= -5e+298) || !((t_1 <= -1e-139) || (!(t_1 <= 5e-177) && (t_1 <= 2e+297))))
tmp = Float64(x + Float64(z * Float64(Float64(y - x) / t)));
else
tmp = t_1;
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = x + (((y - x) * z) / t);
end
↓
function tmp_2 = code(x, y, z, t)
t_1 = x + (((y - x) * z) / t);
tmp = 0.0;
if ((t_1 <= -5e+298) || ~(((t_1 <= -1e-139) || (~((t_1 <= 5e-177)) && (t_1 <= 2e+297)))))
tmp = x + (z * ((y - x) / t));
else
tmp = t_1;
end
tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+298], N[Not[Or[LessEqual[t$95$1, -1e-139], And[N[Not[LessEqual[t$95$1, 5e-177]], $MachinePrecision], LessEqual[t$95$1, 2e+297]]]], $MachinePrecision]], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
x + \frac{\left(y - x\right) \cdot z}{t}
↓
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+298} \lor \neg \left(t_1 \leq -1 \cdot 10^{-139} \lor \neg \left(t_1 \leq 5 \cdot 10^{-177}\right) \land t_1 \leq 2 \cdot 10^{+297}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Accuracy 97.4% Cost 7492
\[\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-177}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+263}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\frac{z}{t}}{\frac{1}{y - x}}\\
\end{array}
\]
Alternative 2 Accuracy 97.4% Cost 1993
\[\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-177} \lor \neg \left(t_1 \leq 5 \cdot 10^{+263}\right):\\
\;\;\;\;x + \frac{\frac{z}{t}}{\frac{1}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Accuracy 72.2% Cost 977
\[\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{-171}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.65 \cdot 10^{-201}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-174} \lor \neg \left(x \leq 9.5 \cdot 10^{-126}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\]
Alternative 4 Accuracy 92.3% Cost 841
\[\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{-229} \lor \neg \left(t \leq 7.2 \cdot 10^{-140}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{t}\\
\end{array}
\]
Alternative 5 Accuracy 96.5% Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-88} \lor \neg \left(x \leq 5.8 \cdot 10^{-247}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\end{array}
\]
Alternative 6 Accuracy 86.3% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.22 \cdot 10^{-63} \lor \neg \left(y \leq 2.3 \cdot 10^{-187}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\end{array}
\]
Alternative 7 Accuracy 86.4% Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-61} \lor \neg \left(y \leq 8.6 \cdot 10^{-187}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{x}{\frac{t}{z}}\\
\end{array}
\]
Alternative 8 Accuracy 58.9% Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-172}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-125}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 9 Accuracy 58.8% Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-172}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-125}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 10 Accuracy 50.3% Cost 64
\[x
\]