\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}
\]
↓
\[\frac{wj \cdot x + \left({wj}^{2} \cdot \left(\left(0.5 \cdot x + -1 \cdot x\right) - 1\right) + -1 \cdot x\right)}{-1 - wj}
\]
(FPCore (wj x)
:precision binary64
(- wj (/ (- (* wj (exp wj)) x) (+ (exp wj) (* wj (exp wj))))))
↓
(FPCore (wj x)
:precision binary64
(/
(+ (* wj x) (+ (* (pow wj 2.0) (- (+ (* 0.5 x) (* -1.0 x)) 1.0)) (* -1.0 x)))
(- -1.0 wj)))
double code(double wj, double x) {
return wj - (((wj * exp(wj)) - x) / (exp(wj) + (wj * exp(wj))));
}
↓
double code(double wj, double x) {
return ((wj * x) + ((pow(wj, 2.0) * (((0.5 * x) + (-1.0 * x)) - 1.0)) + (-1.0 * x))) / (-1.0 - wj);
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = wj - (((wj * exp(wj)) - x) / (exp(wj) + (wj * exp(wj))))
end function
↓
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = ((wj * x) + (((wj ** 2.0d0) * (((0.5d0 * x) + ((-1.0d0) * x)) - 1.0d0)) + ((-1.0d0) * x))) / ((-1.0d0) - wj)
end function
public static double code(double wj, double x) {
return wj - (((wj * Math.exp(wj)) - x) / (Math.exp(wj) + (wj * Math.exp(wj))));
}
↓
public static double code(double wj, double x) {
return ((wj * x) + ((Math.pow(wj, 2.0) * (((0.5 * x) + (-1.0 * x)) - 1.0)) + (-1.0 * x))) / (-1.0 - wj);
}
def code(wj, x):
return wj - (((wj * math.exp(wj)) - x) / (math.exp(wj) + (wj * math.exp(wj))))
↓
def code(wj, x):
return ((wj * x) + ((math.pow(wj, 2.0) * (((0.5 * x) + (-1.0 * x)) - 1.0)) + (-1.0 * x))) / (-1.0 - wj)
function code(wj, x)
return Float64(wj - Float64(Float64(Float64(wj * exp(wj)) - x) / Float64(exp(wj) + Float64(wj * exp(wj)))))
end
↓
function code(wj, x)
return Float64(Float64(Float64(wj * x) + Float64(Float64((wj ^ 2.0) * Float64(Float64(Float64(0.5 * x) + Float64(-1.0 * x)) - 1.0)) + Float64(-1.0 * x))) / Float64(-1.0 - wj))
end
function tmp = code(wj, x)
tmp = wj - (((wj * exp(wj)) - x) / (exp(wj) + (wj * exp(wj))));
end
↓
function tmp = code(wj, x)
tmp = ((wj * x) + (((wj ^ 2.0) * (((0.5 * x) + (-1.0 * x)) - 1.0)) + (-1.0 * x))) / (-1.0 - wj);
end
code[wj_, x_] := N[(wj - N[(N[(N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] / N[(N[Exp[wj], $MachinePrecision] + N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[wj_, x_] := N[(N[(N[(wj * x), $MachinePrecision] + N[(N[(N[Power[wj, 2.0], $MachinePrecision] * N[(N[(N[(0.5 * x), $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision] + N[(-1.0 * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - wj), $MachinePrecision]), $MachinePrecision]
wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}
↓
\frac{wj \cdot x + \left({wj}^{2} \cdot \left(\left(0.5 \cdot x + -1 \cdot x\right) - 1\right) + -1 \cdot x\right)}{-1 - wj}
Alternatives
| Alternative 1 |
|---|
| Error | 9.0 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{\left(1 + wj\right) \cdot e^{wj}}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.2 \cdot 10^{-256}:\\
\;\;\;\;\frac{\left(-wj\right) \cdot wj}{-1 - wj}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 2.2 |
|---|
| Cost | 7040 |
|---|
\[{wj}^{2} + \left(-2 \cdot \left(wj \cdot x\right) + x\right)
\]
| Alternative 3 |
|---|
| Error | 9.5 |
|---|
| Cost | 840 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{-292}:\\
\;\;\;\;\frac{x}{wj \cdot 2 - -1}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-257}:\\
\;\;\;\;\frac{\left(-wj\right) \cdot wj}{-1 - wj}\\
\mathbf{else}:\\
\;\;\;\;\frac{wj \cdot x - x}{-1 - wj}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 9.5 |
|---|
| Cost | 776 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{wj \cdot 2 - -1}\\
\mathbf{if}\;x \leq -3.5 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{-257}:\\
\;\;\;\;\frac{\left(-wj\right) \cdot wj}{-1 - wj}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 9.7 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := -2 \cdot \left(wj \cdot x\right) + x\\
\mathbf{if}\;x \leq -3.15 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 9.5 \cdot 10^{-257}:\\
\;\;\;\;wj \cdot wj\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 9.6 |
|---|
| Cost | 712 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{wj \cdot 2 - -1}\\
\mathbf{if}\;x \leq -2.3 \cdot 10^{-291}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-256}:\\
\;\;\;\;wj \cdot wj\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 10.1 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -3.1 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3 \cdot 10^{-255}:\\
\;\;\;\;wj \cdot wj\\
\mathbf{else}:\\
\;\;\;\;x - wj \cdot x\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 10.0 |
|---|
| Cost | 584 |
|---|
\[\begin{array}{l}
t_0 := \frac{x}{wj - -1}\\
\mathbf{if}\;x \leq -9 \cdot 10^{-292}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-255}:\\
\;\;\;\;wj \cdot wj\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 10.1 |
|---|
| Cost | 456 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -7.4 \cdot 10^{-291}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-257}:\\
\;\;\;\;wj \cdot wj\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 61.2 |
|---|
| Cost | 64 |
|---|
\[wj
\]
| Alternative 11 |
|---|
| Error | 9.8 |
|---|
| Cost | 64 |
|---|
\[x
\]