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 := z \cdot \left(t - x\right)\\
t_2 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(y \cdot z\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_2\\
\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 (* z (- t x)))
(t_2 (+ x (* (- (tanh (/ t y)) (tanh (/ x y))) (* y z)))))
(if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 2e+307) t_2 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 = z * (t - x);
double t_2 = x + ((tanh((t / y)) - tanh((x / y))) * (y * z));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= 2e+307) {
tmp = t_2;
} 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 = z * (t - x);
double t_2 = x + ((Math.tanh((t / y)) - Math.tanh((x / y))) * (y * z));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= 2e+307) {
tmp = t_2;
} 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 = z * (t - x)
t_2 = x + ((math.tanh((t / y)) - math.tanh((x / y))) * (y * z))
tmp = 0
if t_2 <= -math.inf:
tmp = t_1
elif t_2 <= 2e+307:
tmp = t_2
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(z * Float64(t - x))
t_2 = Float64(x + Float64(Float64(tanh(Float64(t / y)) - tanh(Float64(x / y))) * Float64(y * z)))
tmp = 0.0
if (t_2 <= Float64(-Inf))
tmp = t_1;
elseif (t_2 <= 2e+307)
tmp = t_2;
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 = z * (t - x);
t_2 = x + ((tanh((t / y)) - tanh((x / y))) * (y * z));
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= 2e+307)
tmp = t_2;
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[(z * N[(t - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision] - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 2e+307], t$95$2, 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 := z \cdot \left(t - x\right)\\
t_2 := x + \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right) \cdot \left(y \cdot z\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 1.3 Cost 19904
\[\mathsf{fma}\left(y \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right), z, x\right)
\]
Alternative 2 Error 14.1 Cost 14032
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2462922869921212 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.394427818558781 \cdot 10^{-99}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\
\mathbf{elif}\;x \leq 3.08157187829623 \cdot 10^{+124}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+201}:\\
\;\;\;\;\mathsf{fma}\left(y \cdot \left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right), z, x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 3 Error 14.2 Cost 7760
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2462922869921212 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.394427818558781 \cdot 10^{-99}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\
\mathbf{elif}\;x \leq 3.08157187829623 \cdot 10^{+124}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+201}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(\frac{t}{y} - \tanh \left(\frac{x}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 4 Error 13.5 Cost 7496
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.2462922869921212 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.394427818558781 \cdot 10^{-99}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(\tanh \left(\frac{t}{y}\right) - \frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 16.2 Cost 712
\[\begin{array}{l}
t_1 := x + z \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -1.9014828040752715 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+152}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 6 Error 16.2 Cost 712
\[\begin{array}{l}
\mathbf{if}\;y \leq -1.9014828040752715 \cdot 10^{+49}:\\
\;\;\;\;x + \left(t \cdot z - x \cdot z\right)\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+152}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(t - x\right)\\
\end{array}
\]
Alternative 7 Error 22.2 Cost 584
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.80067266479522 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.513726612687245 \cdot 10^{-216}:\\
\;\;\;\;z \cdot \left(t - x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 18.6 Cost 584
\[\begin{array}{l}
t_1 := x + t \cdot z\\
\mathbf{if}\;y \leq -2.6321891418350098 \cdot 10^{-27}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+122}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 22.5 Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.80067266479522 \cdot 10^{-198}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.513726612687245 \cdot 10^{-216}:\\
\;\;\;\;t \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 10 Error 22.9 Cost 64
\[x
\]