Math FPCore C Fortran 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 := \tanh \left(\frac{t}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+125}:\\
\;\;\;\;z \cdot t - x \cdot \left(-1 + z\right)\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+99}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(t_1 - \tanh \left(\frac{x}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t_1 \cdot y + \left(-x\right)\right) \cdot z\\
\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 (tanh (/ t y))))
(if (<= y -5.5e+125)
(- (* z t) (* x (+ -1.0 z)))
(if (<= y 1.06e+99)
(+ x (* (* y z) (- t_1 (tanh (/ x y)))))
(+ x (* (+ (* t_1 y) (- x)) z)))))) 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 = tanh((t / y));
double tmp;
if (y <= -5.5e+125) {
tmp = (z * t) - (x * (-1.0 + z));
} else if (y <= 1.06e+99) {
tmp = x + ((y * z) * (t_1 - tanh((x / y))));
} else {
tmp = x + (((t_1 * y) + -x) * z);
}
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 * z) * (tanh((t / y)) - tanh((x / y))))
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 = tanh((t / y))
if (y <= (-5.5d+125)) then
tmp = (z * t) - (x * ((-1.0d0) + z))
else if (y <= 1.06d+99) then
tmp = x + ((y * z) * (t_1 - tanh((x / y))))
else
tmp = x + (((t_1 * y) + -x) * z)
end if
code = tmp
end function
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 = Math.tanh((t / y));
double tmp;
if (y <= -5.5e+125) {
tmp = (z * t) - (x * (-1.0 + z));
} else if (y <= 1.06e+99) {
tmp = x + ((y * z) * (t_1 - Math.tanh((x / y))));
} else {
tmp = x + (((t_1 * y) + -x) * z);
}
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 = math.tanh((t / y))
tmp = 0
if y <= -5.5e+125:
tmp = (z * t) - (x * (-1.0 + z))
elif y <= 1.06e+99:
tmp = x + ((y * z) * (t_1 - math.tanh((x / y))))
else:
tmp = x + (((t_1 * y) + -x) * z)
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 = tanh(Float64(t / y))
tmp = 0.0
if (y <= -5.5e+125)
tmp = Float64(Float64(z * t) - Float64(x * Float64(-1.0 + z)));
elseif (y <= 1.06e+99)
tmp = Float64(x + Float64(Float64(y * z) * Float64(t_1 - tanh(Float64(x / y)))));
else
tmp = Float64(x + Float64(Float64(Float64(t_1 * y) + Float64(-x)) * z));
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 = tanh((t / y));
tmp = 0.0;
if (y <= -5.5e+125)
tmp = (z * t) - (x * (-1.0 + z));
elseif (y <= 1.06e+99)
tmp = x + ((y * z) * (t_1 - tanh((x / y))));
else
tmp = x + (((t_1 * y) + -x) * z);
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[Tanh[N[(t / y), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -5.5e+125], N[(N[(z * t), $MachinePrecision] - N[(x * N[(-1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+99], N[(x + N[(N[(y * z), $MachinePrecision] * N[(t$95$1 - N[Tanh[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t$95$1 * y), $MachinePrecision] + (-x)), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]]
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 := \tanh \left(\frac{t}{y}\right)\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+125}:\\
\;\;\;\;z \cdot t - x \cdot \left(-1 + z\right)\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+99}:\\
\;\;\;\;x + \left(y \cdot z\right) \cdot \left(t_1 - \tanh \left(\frac{x}{y}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t_1 \cdot y + \left(-x\right)\right) \cdot z\\
\end{array}
Alternatives Alternative 1 Error 0.8 Cost 27524
\[\begin{array}{l}
t_1 := \tanh \left(\frac{x}{y}\right)\\
t_2 := \tanh \left(\frac{t}{y}\right)\\
\mathbf{if}\;x + \left(y \cdot z\right) \cdot \left(t_2 - t_1\right) \leq 5 \cdot 10^{+305}:\\
\;\;\;\;x + \left(t_2 \cdot y + \left(-t_1 \cdot y\right)\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(t - x\right) \cdot z\\
\end{array}
\]
Alternative 2 Error 0.8 Cost 27332
\[\begin{array}{l}
t_1 := \tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\\
\mathbf{if}\;x + \left(y \cdot z\right) \cdot t_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;x + \left(t_1 \cdot y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(t - x\right) \cdot z\\
\end{array}
\]
Alternative 3 Error 1.9 Cost 13764
\[\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+152}:\\
\;\;\;\;z \cdot t - x \cdot \left(-1 + z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z \cdot \left(\tanh \left(\frac{t}{y}\right) - \tanh \left(\frac{x}{y}\right)\right)\right) \cdot y\\
\end{array}
\]
Alternative 4 Error 14.0 Cost 7432
\[\begin{array}{l}
t_1 := x + \left(t + \left(-\tanh \left(\frac{x}{y}\right) \cdot y\right)\right) \cdot z\\
\mathbf{if}\;y \leq -30000000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 9.7 Cost 7432
\[\begin{array}{l}
\mathbf{if}\;x \leq -32000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+63}:\\
\;\;\;\;x + \left(\tanh \left(\frac{t}{y}\right) \cdot y + \left(-x\right)\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 15.6 Cost 840
\[\begin{array}{l}
t_1 := z \cdot t - x \cdot \left(-1 + z\right)\\
\mathbf{if}\;y \leq -2.45 \cdot 10^{+117}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+62}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Error 21.3 Cost 716
\[\begin{array}{l}
t_1 := \left(1 - z\right) \cdot x\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+145}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+152}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 8 Error 15.6 Cost 712
\[\begin{array}{l}
t_1 := x + z \cdot \left(t - x\right)\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+119}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{+62}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 18.1 Cost 584
\[\begin{array}{l}
t_1 := t \cdot z + x\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 10^{+34}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 23.4 Cost 456
\[\begin{array}{l}
\mathbf{if}\;y \leq 7 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.6 \cdot 10^{+152}:\\
\;\;\;\;z \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 11 Error 22.9 Cost 64
\[x
\]