Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\]
↓
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(-0.5 \cdot {y}^{2} + \left(-0.3333333333333333 \cdot {y}^{3} + \left(\left(-y\right) + -0.25 \cdot {y}^{4}\right)\right)\right)\right) - t
\]
(FPCore (x y z t)
:precision binary64
(- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t)) ↓
(FPCore (x y z t)
:precision binary64
(-
(+
(* (- x 1.0) (log y))
(*
(- z 1.0)
(+
(* -0.5 (pow y 2.0))
(+ (* -0.3333333333333333 (pow y 3.0)) (+ (- y) (* -0.25 (pow y 4.0)))))))
t)) double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
}
↓
double code(double x, double y, double z, double t) {
return (((x - 1.0) * log(y)) + ((z - 1.0) * ((-0.5 * pow(y, 2.0)) + ((-0.3333333333333333 * pow(y, 3.0)) + (-y + (-0.25 * pow(y, 4.0))))))) - t;
}
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 - 1.0d0) * log(y)) + ((z - 1.0d0) * log((1.0d0 - y)))) - t
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
code = (((x - 1.0d0) * log(y)) + ((z - 1.0d0) * (((-0.5d0) * (y ** 2.0d0)) + (((-0.3333333333333333d0) * (y ** 3.0d0)) + (-y + ((-0.25d0) * (y ** 4.0d0))))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * Math.log((1.0 - y)))) - t;
}
↓
public static double code(double x, double y, double z, double t) {
return (((x - 1.0) * Math.log(y)) + ((z - 1.0) * ((-0.5 * Math.pow(y, 2.0)) + ((-0.3333333333333333 * Math.pow(y, 3.0)) + (-y + (-0.25 * Math.pow(y, 4.0))))))) - t;
}
def code(x, y, z, t):
return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - t
↓
def code(x, y, z, t):
return (((x - 1.0) * math.log(y)) + ((z - 1.0) * ((-0.5 * math.pow(y, 2.0)) + ((-0.3333333333333333 * math.pow(y, 3.0)) + (-y + (-0.25 * math.pow(y, 4.0))))))) - t
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * log(Float64(1.0 - y)))) - t)
end
↓
function code(x, y, z, t)
return Float64(Float64(Float64(Float64(x - 1.0) * log(y)) + Float64(Float64(z - 1.0) * Float64(Float64(-0.5 * (y ^ 2.0)) + Float64(Float64(-0.3333333333333333 * (y ^ 3.0)) + Float64(Float64(-y) + Float64(-0.25 * (y ^ 4.0))))))) - t)
end
function tmp = code(x, y, z, t)
tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - t;
end
↓
function tmp = code(x, y, z, t)
tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * ((-0.5 * (y ^ 2.0)) + ((-0.3333333333333333 * (y ^ 3.0)) + (-y + (-0.25 * (y ^ 4.0))))))) - t;
end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[Log[N[(1.0 - y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
↓
code[x_, y_, z_, t_] := N[(N[(N[(N[(x - 1.0), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(z - 1.0), $MachinePrecision] * N[(N[(-0.5 * N[Power[y, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[(-0.3333333333333333 * N[Power[y, 3.0], $MachinePrecision]), $MachinePrecision] + N[((-y) + N[(-0.25 * N[Power[y, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
↓
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(-0.5 \cdot {y}^{2} + \left(-0.3333333333333333 \cdot {y}^{3} + \left(\left(-y\right) + -0.25 \cdot {y}^{4}\right)\right)\right)\right) - t
Alternatives Alternative 1 Error 0.3 Cost 20800
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(-0.5 \cdot {y}^{2} + \left(-0.3333333333333333 \cdot {y}^{3} + -1 \cdot y\right)\right)\right) - t
\]
Alternative 2 Error 0.3 Cost 20736
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\left(-y\right) + \left(-0.5 \cdot {y}^{2} + -0.3333333333333333 \cdot {y}^{3}\right)\right)\right) - t
\]
Alternative 3 Error 0.4 Cost 14016
\[\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \left(\left(-y\right) + -0.5 \cdot {y}^{2}\right)\right) - t
\]
Alternative 4 Error 7.7 Cost 7560
\[\begin{array}{l}
t_1 := x - 1 \leq -1\\
t_2 := \left(x - 1\right) \cdot \log y - t\\
\mathbf{if}\;t_1:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) + \left(-\log y\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 5 Error 6.1 Cost 7372
\[\begin{array}{l}
t_1 := y \cdot \left(1 - z\right)\\
t_2 := \log y \cdot x + t_1\\
\mathbf{if}\;z \leq -2.1 \cdot 10^{+228}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{+240}:\\
\;\;\;\;\left(x - 1\right) \cdot \log y - t\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t_1 - t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 3.7 Cost 7368
\[\begin{array}{l}
t_1 := \left(\log y \cdot x + y \cdot \left(1 - z\right)\right) - t\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+93}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 10^{+233}:\\
\;\;\;\;\left(x - 1\right) \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Error 0.5 Cost 7232
\[\left(\left(x - 1\right) \cdot \log y + y \cdot \left(1 - z\right)\right) - t
\]
Alternative 8 Error 13.6 Cost 6984
\[\begin{array}{l}
t_1 := y \cdot \left(1 - z\right) - t\\
\mathbf{if}\;t \leq -165000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 15000000000000:\\
\;\;\;\;\left(x - 1\right) \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 8.2 Cost 6984
\[\begin{array}{l}
t_1 := \log y \cdot x - t\\
\mathbf{if}\;t \leq -18000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{-5}:\\
\;\;\;\;\left(x - 1\right) \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 7.1 Cost 6980
\[\begin{array}{l}
\mathbf{if}\;z \leq 3.5 \cdot 10^{+238}:\\
\;\;\;\;\left(x - 1\right) \cdot \log y - t\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+296}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\]
Alternative 11 Error 15.2 Cost 6920
\[\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.95 \cdot 10^{+35}:\\
\;\;\;\;\left(-\log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 24.8 Cost 6856
\[\begin{array}{l}
t_1 := y \cdot \left(1 - z\right) - t\\
\mathbf{if}\;t \leq -100000000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 320000000000:\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 29.1 Cost 6792
\[\begin{array}{l}
t_1 := y \cdot \left(1 - z\right) - t\\
\mathbf{if}\;t \leq -0.32:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.85 \cdot 10^{-84}:\\
\;\;\;\;-\log y\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 14 Error 36.0 Cost 584
\[\begin{array}{l}
\mathbf{if}\;t \leq -15800000000000:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 3.6:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\]
Alternative 15 Error 36.2 Cost 520
\[\begin{array}{l}
\mathbf{if}\;t \leq -370000000000:\\
\;\;\;\;-t\\
\mathbf{elif}\;t \leq 3.6:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;-t\\
\end{array}
\]
Alternative 16 Error 34.2 Cost 448
\[y \cdot \left(1 - z\right) - t
\]
Alternative 17 Error 41.1 Cost 128
\[-t
\]