Math FPCore C Java Python Julia MATLAB Wolfram TeX \[x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
\]
↓
\[\begin{array}{l}
t_1 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right)\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+305}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y z t)
:precision binary64
(+ x (* (* y z) (- (tanh (/ t y)) (tanh (/ x y)))))) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* (- (tanh (/ t y)) (tanh (/ x y))) (* z y)))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+305)))
(+ x (* z (- t x)))
t_1))) double code(double x, double y, double z, double t) {
return x + ((y * z) * (tanh((t / y)) - tanh((x / y))));
}
↓
double code(double x, double y, double z, double t) {
double t_1 = x + ((tanh((t / y)) - tanh((x / y))) * (z * y));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+305)) {
tmp = x + (z * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
return x + ((y * z) * (Math.tanh((t / y)) - Math.tanh((x / y))));
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = x + ((Math.tanh((t / y)) - Math.tanh((x / y))) * (z * y));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+305)) {
tmp = x + (z * (t - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t):
return x + ((y * z) * (math.tanh((t / y)) - math.tanh((x / y))))
↓
def code(x, y, z, t):
t_1 = x + ((math.tanh((t / y)) - math.tanh((x / y))) * (z * y))
tmp = 0
if (t_1 <= -math.inf) or not (t_1 <= 5e+305):
tmp = x + (z * (t - x))
else:
tmp = t_1
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(y * z) * Float64(tanh(Float64(t / y)) - tanh(Float64(x / y)))))
end
↓
function code(x, y, z, t)
t_1 = Float64(x + Float64(Float64(tanh(Float64(t / y)) - tanh(Float64(x / y))) * Float64(z * y)))
tmp = 0.0
if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+305))
tmp = Float64(x + Float64(z * Float64(t - x)));
else
tmp = t_1;
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = x + ((y * z) * (tanh((t / y)) - tanh((x / y))));
end
↓
function tmp_2 = code(x, y, z, t)
t_1 = x + ((tanh((t / y)) - tanh((x / y))) * (z * y));
tmp = 0.0;
if ((t_1 <= -Inf) || ~((t_1 <= 5e+305)))
tmp = x + (z * (t - x));
else
tmp = t_1;
end
tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * z), $MachinePrecision] * N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+305]], $MachinePrecision]], N[(x + N[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]
x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)
↓
\begin{array}{l}
t_1 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(z \cdot y\right)\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 5 \cdot 10^{+305}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 1.3 Cost 19904
\[\mathsf{fma}\left(z, y \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right), x\right)
\]
Alternative 2 Error 9.1 Cost 13577
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-95} \lor \neg \left(x \leq 0.00011\right):\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot \left(-\tanh \left(\frac{x}{y}\right)\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot \tanh \left(\frac{t}{y}\right), x\right)\\
\end{array}
\]
Alternative 3 Error 9.9 Cost 13513
\[\begin{array}{l}
\mathbf{if}\;y \leq -6.8 \cdot 10^{+87} \lor \neg \left(y \leq 6 \cdot 10^{+52}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot \tanh \left(\frac{t}{y}\right), x\right)\\
\end{array}
\]
Alternative 4 Error 10.1 Cost 7241
\[\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+88} \lor \neg \left(y \leq 4.3 \cdot 10^{+45}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \tanh \left(\frac{t}{y}\right) \cdot \left(z \cdot y\right)\\
\end{array}
\]
Alternative 5 Error 22.8 Cost 720
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-172}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-276}:\\
\;\;\;\;z \cdot t\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-290}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{-229}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 20.1 Cost 716
\[\begin{array}{l}
t_1 := x - z \cdot x\\
\mathbf{if}\;y \leq -1.45 \cdot 10^{+87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+238}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot t\\
\end{array}
\]
Alternative 7 Error 14.8 Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+86} \lor \neg \left(y \leq 3.2 \cdot 10^{+46}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 17.9 Cost 585
\[\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-62} \lor \neg \left(y \leq 7.6 \cdot 10^{+47}\right):\\
\;\;\;\;x + z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 9 Error 22.5 Cost 64
\[x
\]