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 10^{+306}\right):\\
\;\;\;\;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 1e+306))) (* 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 <= 1e+306)) {
tmp = 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 <= 1e+306)) {
tmp = 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 <= 1e+306):
tmp = 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 <= 1e+306))
tmp = 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 <= 1e+306)))
tmp = 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, 1e+306]], $MachinePrecision]], N[(z * N[(t - x), $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 10^{+306}\right):\\
\;\;\;\;z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 1.4 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 7.7 Cost 13641
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.4 \cdot 10^{-7} \lor \neg \left(x \leq 6.5 \cdot 10^{-16}\right):\\
\;\;\;\;\mathsf{fma}\left(z, \tanh \left(\frac{x}{y}\right) \cdot \left(-y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y \cdot \tanh \left(\frac{t}{y}\right) - x, x\right)\\
\end{array}
\]
Alternative 3 Error 9.9 Cost 13577
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-10} \lor \neg \left(x \leq 1.2 \cdot 10^{-14}\right):\\
\;\;\;\;\mathsf{fma}\left(z, \tanh \left(\frac{x}{y}\right) \cdot \left(-y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot y\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\
\end{array}
\]
Alternative 4 Error 15.0 Cost 7504
\[\begin{array}{l}
t_1 := \tanh \left(\frac{t}{y}\right)\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+233}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.12 \cdot 10^{+132}:\\
\;\;\;\;z \cdot \left(t - x\right)\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+33}:\\
\;\;\;\;x + t_1 \cdot \left(z \cdot y\right)\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+265}:\\
\;\;\;\;z \cdot \left(y \cdot t_1 - x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 18.5 Cost 7372
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.12 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-166}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{elif}\;x \leq 9.4 \cdot 10^{-124}:\\
\;\;\;\;z \cdot \left(y \cdot \tanh \left(\frac{t}{y}\right) - x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 19.8 Cost 7244
\[\begin{array}{l}
t_1 := x + z \cdot \left(t - x\right)\\
\mathbf{if}\;x \leq -5.3 \cdot 10^{+23}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-219}:\\
\;\;\;\;\tanh \left(\frac{t}{y}\right) \cdot \left(z \cdot y\right)\\
\mathbf{elif}\;x \leq 6.6 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 7 Error 23.6 Cost 852
\[\begin{array}{l}
t_1 := z \cdot \left(t - x\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+235}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.55 \cdot 10^{+96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 60000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+259}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+306}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\\
\end{array}
\]
Alternative 8 Error 22.9 Cost 720
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.05 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-115}:\\
\;\;\;\;z \cdot \left(-x\right)\\
\mathbf{elif}\;x \leq -2.35 \cdot 10^{-174}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.75 \cdot 10^{-249}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 9 Error 15.3 Cost 713
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+121} \lor \neg \left(y \leq 3.5 \cdot 10^{+29}\right):\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 10 Error 22.4 Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{-172}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{-249}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 11 Error 22.2 Cost 64
\[x
\]