
(FPCore (x y z t) :precision binary64 (- (+ (* (- 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) * log((1.0 - y)))) - 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
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;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - 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 tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - 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]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 27 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (- (+ (* (- 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) * log((1.0 - y)))) - 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
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;
}
def code(x, y, z, t): return (((x - 1.0) * math.log(y)) + ((z - 1.0) * math.log((1.0 - y)))) - 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 tmp = code(x, y, z, t) tmp = (((x - 1.0) * log(y)) + ((z - 1.0) * log((1.0 - y)))) - 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]
\begin{array}{l}
\\
\left(\left(x - 1\right) \cdot \log y + \left(z - 1\right) \cdot \log \left(1 - y\right)\right) - t
\end{array}
(FPCore (x y z t) :precision binary64 (fma (+ z -1.0) (log1p (- y)) (fma (+ -1.0 x) (log y) (- t))))
double code(double x, double y, double z, double t) {
return fma((z + -1.0), log1p(-y), fma((-1.0 + x), log(y), -t));
}
function code(x, y, z, t) return fma(Float64(z + -1.0), log1p(Float64(-y)), fma(Float64(-1.0 + x), log(y), Float64(-t))) end
code[x_, y_, z_, t_] := N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[(-1.0 + x), $MachinePrecision] * N[Log[y], $MachinePrecision] + (-t)), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \mathsf{fma}\left(-1 + x, \log y, -t\right)\right)
\end{array}
Initial program 87.6%
sub-neg87.6%
+-commutative87.6%
associate-+l+87.6%
fma-define87.6%
sub-neg87.6%
metadata-eval87.6%
sub-neg87.6%
log1p-define99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t) :precision binary64 (- (fma (+ z -1.0) (log1p (- y)) (* (log y) (+ -1.0 x))) t))
double code(double x, double y, double z, double t) {
return fma((z + -1.0), log1p(-y), (log(y) * (-1.0 + x))) - t;
}
function code(x, y, z, t) return Float64(fma(Float64(z + -1.0), log1p(Float64(-y)), Float64(log(y) * Float64(-1.0 + x))) - t) end
code[x_, y_, z_, t_] := N[(N[(N[(z + -1.0), $MachinePrecision] * N[Log[1 + (-y)], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(z + -1, \mathsf{log1p}\left(-y\right), \log y \cdot \left(-1 + x\right)\right) - t
\end{array}
Initial program 87.6%
+-commutative87.6%
fma-define87.6%
sub-neg87.6%
metadata-eval87.6%
sub-neg87.6%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (log y))) (t_2 (* x (log y))) (t_3 (- (* y (- 1.0 z)) t)))
(if (<= x -3.7e+27)
t_2
(if (<= x -1.9e-124)
t_3
(if (<= x -2.9e-167)
t_1
(if (<= x 1.62e-292)
t_3
(if (<= x 1.06e-261)
t_1
(if (<= x 2.7e+48)
(- (* y (* z (+ -1.0 (* y -0.5)))) t)
t_2))))))))
double code(double x, double y, double z, double t) {
double t_1 = -log(y);
double t_2 = x * log(y);
double t_3 = (y * (1.0 - z)) - t;
double tmp;
if (x <= -3.7e+27) {
tmp = t_2;
} else if (x <= -1.9e-124) {
tmp = t_3;
} else if (x <= -2.9e-167) {
tmp = t_1;
} else if (x <= 1.62e-292) {
tmp = t_3;
} else if (x <= 1.06e-261) {
tmp = t_1;
} else if (x <= 2.7e+48) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else {
tmp = t_2;
}
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
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = -log(y)
t_2 = x * log(y)
t_3 = (y * (1.0d0 - z)) - t
if (x <= (-3.7d+27)) then
tmp = t_2
else if (x <= (-1.9d-124)) then
tmp = t_3
else if (x <= (-2.9d-167)) then
tmp = t_1
else if (x <= 1.62d-292) then
tmp = t_3
else if (x <= 1.06d-261) then
tmp = t_1
else if (x <= 2.7d+48) then
tmp = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -Math.log(y);
double t_2 = x * Math.log(y);
double t_3 = (y * (1.0 - z)) - t;
double tmp;
if (x <= -3.7e+27) {
tmp = t_2;
} else if (x <= -1.9e-124) {
tmp = t_3;
} else if (x <= -2.9e-167) {
tmp = t_1;
} else if (x <= 1.62e-292) {
tmp = t_3;
} else if (x <= 1.06e-261) {
tmp = t_1;
} else if (x <= 2.7e+48) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = -math.log(y) t_2 = x * math.log(y) t_3 = (y * (1.0 - z)) - t tmp = 0 if x <= -3.7e+27: tmp = t_2 elif x <= -1.9e-124: tmp = t_3 elif x <= -2.9e-167: tmp = t_1 elif x <= 1.62e-292: tmp = t_3 elif x <= 1.06e-261: tmp = t_1 elif x <= 2.7e+48: tmp = (y * (z * (-1.0 + (y * -0.5)))) - t else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(-log(y)) t_2 = Float64(x * log(y)) t_3 = Float64(Float64(y * Float64(1.0 - z)) - t) tmp = 0.0 if (x <= -3.7e+27) tmp = t_2; elseif (x <= -1.9e-124) tmp = t_3; elseif (x <= -2.9e-167) tmp = t_1; elseif (x <= 1.62e-292) tmp = t_3; elseif (x <= 1.06e-261) tmp = t_1; elseif (x <= 2.7e+48) tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -log(y); t_2 = x * log(y); t_3 = (y * (1.0 - z)) - t; tmp = 0.0; if (x <= -3.7e+27) tmp = t_2; elseif (x <= -1.9e-124) tmp = t_3; elseif (x <= -2.9e-167) tmp = t_1; elseif (x <= 1.62e-292) tmp = t_3; elseif (x <= 1.06e-261) tmp = t_1; elseif (x <= 2.7e+48) tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = (-N[Log[y], $MachinePrecision])}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, If[LessEqual[x, -3.7e+27], t$95$2, If[LessEqual[x, -1.9e-124], t$95$3, If[LessEqual[x, -2.9e-167], t$95$1, If[LessEqual[x, 1.62e-292], t$95$3, If[LessEqual[x, 1.06e-261], t$95$1, If[LessEqual[x, 2.7e+48], N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\log y\\
t_2 := x \cdot \log y\\
t_3 := y \cdot \left(1 - z\right) - t\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+27}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-124}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-167}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{-292}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{-261}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2.7 \cdot 10^{+48}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -3.70000000000000002e27 or 2.70000000000000004e48 < x Initial program 97.2%
Taylor expanded in y around 0 97.2%
Taylor expanded in x around inf 80.4%
if -3.70000000000000002e27 < x < -1.90000000000000006e-124 or -2.90000000000000003e-167 < x < 1.61999999999999991e-292Initial program 82.2%
Taylor expanded in y around 0 97.7%
+-commutative97.7%
sub-neg97.7%
metadata-eval97.7%
fma-define97.7%
mul-1-neg97.7%
fma-neg97.7%
+-commutative97.7%
sub-neg97.7%
metadata-eval97.7%
+-commutative97.7%
Simplified97.7%
Taylor expanded in x around 0 94.9%
mul-1-neg94.9%
Simplified94.9%
Taylor expanded in y around inf 68.2%
if -1.90000000000000006e-124 < x < -2.90000000000000003e-167 or 1.61999999999999991e-292 < x < 1.06e-261Initial program 82.3%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
fma-define100.0%
mul-1-neg100.0%
fma-neg100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
mul-1-neg100.0%
Simplified100.0%
Taylor expanded in y around 0 82.3%
mul-1-neg82.3%
Simplified82.3%
Taylor expanded in t around 0 69.6%
mul-1-neg69.6%
Simplified69.6%
if 1.06e-261 < x < 2.70000000000000004e48Initial program 75.8%
Taylor expanded in y around 0 99.9%
Taylor expanded in x around 0 98.3%
mul-1-neg98.3%
Simplified98.3%
Taylor expanded in y around 0 98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in z around inf 75.7%
Final simplification75.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (log y))))
(if (<= t -18000.0)
(- (* y (* z (+ -1.0 (* y -0.5)))) t)
(if (<= t -1.35e-106)
t_1
(if (<= t -7e-177)
(- (- t) (* z y))
(if (<= t 5.2e-171)
t_1
(if (<= t 2e-159)
(- (* y (- 1.0 z)) t)
(if (<= t 1.75e-121)
t_1
(-
(*
y
(*
z
(+
-1.0
(* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5)))))
t)))))))))
double code(double x, double y, double z, double t) {
double t_1 = -log(y);
double tmp;
if (t <= -18000.0) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else if (t <= -1.35e-106) {
tmp = t_1;
} else if (t <= -7e-177) {
tmp = -t - (z * y);
} else if (t <= 5.2e-171) {
tmp = t_1;
} else if (t <= 2e-159) {
tmp = (y * (1.0 - z)) - t;
} else if (t <= 1.75e-121) {
tmp = t_1;
} else {
tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t;
}
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
real(8) :: t_1
real(8) :: tmp
t_1 = -log(y)
if (t <= (-18000.0d0)) then
tmp = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
else if (t <= (-1.35d-106)) then
tmp = t_1
else if (t <= (-7d-177)) then
tmp = -t - (z * y)
else if (t <= 5.2d-171) then
tmp = t_1
else if (t <= 2d-159) then
tmp = (y * (1.0d0 - z)) - t
else if (t <= 1.75d-121) then
tmp = t_1
else
tmp = (y * (z * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = -Math.log(y);
double tmp;
if (t <= -18000.0) {
tmp = (y * (z * (-1.0 + (y * -0.5)))) - t;
} else if (t <= -1.35e-106) {
tmp = t_1;
} else if (t <= -7e-177) {
tmp = -t - (z * y);
} else if (t <= 5.2e-171) {
tmp = t_1;
} else if (t <= 2e-159) {
tmp = (y * (1.0 - z)) - t;
} else if (t <= 1.75e-121) {
tmp = t_1;
} else {
tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t;
}
return tmp;
}
def code(x, y, z, t): t_1 = -math.log(y) tmp = 0 if t <= -18000.0: tmp = (y * (z * (-1.0 + (y * -0.5)))) - t elif t <= -1.35e-106: tmp = t_1 elif t <= -7e-177: tmp = -t - (z * y) elif t <= 5.2e-171: tmp = t_1 elif t <= 2e-159: tmp = (y * (1.0 - z)) - t elif t <= 1.75e-121: tmp = t_1 else: tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t return tmp
function code(x, y, z, t) t_1 = Float64(-log(y)) tmp = 0.0 if (t <= -18000.0) tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t); elseif (t <= -1.35e-106) tmp = t_1; elseif (t <= -7e-177) tmp = Float64(Float64(-t) - Float64(z * y)); elseif (t <= 5.2e-171) tmp = t_1; elseif (t <= 2e-159) tmp = Float64(Float64(y * Float64(1.0 - z)) - t); elseif (t <= 1.75e-121) tmp = t_1; else tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -log(y); tmp = 0.0; if (t <= -18000.0) tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; elseif (t <= -1.35e-106) tmp = t_1; elseif (t <= -7e-177) tmp = -t - (z * y); elseif (t <= 5.2e-171) tmp = t_1; elseif (t <= 2e-159) tmp = (y * (1.0 - z)) - t; elseif (t <= 1.75e-121) tmp = t_1; else tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = (-N[Log[y], $MachinePrecision])}, If[LessEqual[t, -18000.0], N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, -1.35e-106], t$95$1, If[LessEqual[t, -7e-177], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-171], t$95$1, If[LessEqual[t, 2e-159], N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[t, 1.75e-121], t$95$1, N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\log y\\
\mathbf{if}\;t \leq -18000:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-106}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-177}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-171}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-159}:\\
\;\;\;\;y \cdot \left(1 - z\right) - t\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) - t\\
\end{array}
\end{array}
if t < -18000Initial program 91.4%
Taylor expanded in y around 0 99.9%
Taylor expanded in x around 0 74.2%
mul-1-neg74.2%
Simplified74.2%
Taylor expanded in y around 0 74.2%
*-commutative74.2%
Simplified74.2%
Taylor expanded in z around inf 74.2%
if -18000 < t < -1.35000000000000011e-106 or -7.0000000000000003e-177 < t < 5.2000000000000001e-171 or 1.99999999999999998e-159 < t < 1.74999999999999996e-121Initial program 87.9%
Taylor expanded in y around 0 98.0%
+-commutative98.0%
sub-neg98.0%
metadata-eval98.0%
fma-define98.0%
mul-1-neg98.0%
fma-neg98.0%
+-commutative98.0%
sub-neg98.0%
metadata-eval98.0%
+-commutative98.0%
Simplified98.0%
Taylor expanded in x around 0 61.8%
mul-1-neg61.8%
Simplified61.8%
Taylor expanded in y around 0 48.1%
mul-1-neg48.1%
Simplified48.1%
Taylor expanded in t around 0 46.1%
mul-1-neg46.1%
Simplified46.1%
if -1.35000000000000011e-106 < t < -7.0000000000000003e-177Initial program 65.4%
Taylor expanded in y around 0 99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
fma-define99.8%
mul-1-neg99.8%
fma-neg99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 48.6%
mul-1-neg48.6%
Simplified48.6%
Taylor expanded in z around inf 36.9%
associate-*r*36.9%
neg-mul-136.9%
Simplified36.9%
if 5.2000000000000001e-171 < t < 1.99999999999999998e-159Initial program 76.7%
Taylor expanded in y around 0 100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
fma-define100.0%
mul-1-neg100.0%
fma-neg100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 28.1%
mul-1-neg28.1%
Simplified28.1%
Taylor expanded in y around inf 27.6%
if 1.74999999999999996e-121 < t Initial program 89.5%
Taylor expanded in y around 0 99.8%
Taylor expanded in x around 0 59.5%
mul-1-neg59.5%
Simplified59.5%
Taylor expanded in z around inf 54.5%
Final simplification54.4%
(FPCore (x y z t)
:precision binary64
(-
(+
(* (log y) (+ -1.0 x))
(*
(+ z -1.0)
(* y (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5))))))
t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - 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 = ((log(y) * ((-1.0d0) + x)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5)))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.7%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4e+119) (not (<= z 3.1e-131))) (- (* z (- (* (log y) (/ (+ -1.0 x) z)) y)) t) (- (* (log y) (+ -1.0 x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4e+119) || !(z <= 3.1e-131)) {
tmp = (z * ((log(y) * ((-1.0 + x) / z)) - y)) - t;
} else {
tmp = (log(y) * (-1.0 + x)) - t;
}
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
real(8) :: tmp
if ((z <= (-4d+119)) .or. (.not. (z <= 3.1d-131))) then
tmp = (z * ((log(y) * (((-1.0d0) + x) / z)) - y)) - t
else
tmp = (log(y) * ((-1.0d0) + x)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4e+119) || !(z <= 3.1e-131)) {
tmp = (z * ((Math.log(y) * ((-1.0 + x) / z)) - y)) - t;
} else {
tmp = (Math.log(y) * (-1.0 + x)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4e+119) or not (z <= 3.1e-131): tmp = (z * ((math.log(y) * ((-1.0 + x) / z)) - y)) - t else: tmp = (math.log(y) * (-1.0 + x)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4e+119) || !(z <= 3.1e-131)) tmp = Float64(Float64(z * Float64(Float64(log(y) * Float64(Float64(-1.0 + x) / z)) - y)) - t); else tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4e+119) || ~((z <= 3.1e-131))) tmp = (z * ((log(y) * ((-1.0 + x) / z)) - y)) - t; else tmp = (log(y) * (-1.0 + x)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4e+119], N[Not[LessEqual[z, 3.1e-131]], $MachinePrecision]], N[(N[(z * N[(N[(N[Log[y], $MachinePrecision] * N[(N[(-1.0 + x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+119} \lor \neg \left(z \leq 3.1 \cdot 10^{-131}\right):\\
\;\;\;\;z \cdot \left(\log y \cdot \frac{-1 + x}{z} - y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\end{array}
\end{array}
if z < -3.99999999999999978e119 or 3.10000000000000021e-131 < z Initial program 77.2%
Taylor expanded in y around 0 98.9%
+-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
fma-define98.9%
mul-1-neg98.9%
fma-neg98.9%
+-commutative98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
Simplified98.9%
Taylor expanded in z around inf 97.6%
associate-/l*97.5%
sub-neg97.5%
metadata-eval97.5%
+-commutative97.5%
mul-1-neg97.5%
unsub-neg97.5%
Simplified97.5%
Taylor expanded in z around inf 97.1%
if -3.99999999999999978e119 < z < 3.10000000000000021e-131Initial program 99.8%
Taylor expanded in y around 0 98.8%
Final simplification97.9%
(FPCore (x y z t)
:precision binary64
(if (<= (+ -1.0 x) -1e+22)
(- (* x (log y)) t)
(if (<= (+ -1.0 x) -1.0)
(- (- (* y (- 1.0 z)) (log y)) t)
(- (* (log y) (+ -1.0 x)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + x) <= -1e+22) {
tmp = (x * log(y)) - t;
} else if ((-1.0 + x) <= -1.0) {
tmp = ((y * (1.0 - z)) - log(y)) - t;
} else {
tmp = (log(y) * (-1.0 + x)) - t;
}
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
real(8) :: tmp
if (((-1.0d0) + x) <= (-1d+22)) then
tmp = (x * log(y)) - t
else if (((-1.0d0) + x) <= (-1.0d0)) then
tmp = ((y * (1.0d0 - z)) - log(y)) - t
else
tmp = (log(y) * ((-1.0d0) + x)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((-1.0 + x) <= -1e+22) {
tmp = (x * Math.log(y)) - t;
} else if ((-1.0 + x) <= -1.0) {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
} else {
tmp = (Math.log(y) * (-1.0 + x)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (-1.0 + x) <= -1e+22: tmp = (x * math.log(y)) - t elif (-1.0 + x) <= -1.0: tmp = ((y * (1.0 - z)) - math.log(y)) - t else: tmp = (math.log(y) * (-1.0 + x)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(-1.0 + x) <= -1e+22) tmp = Float64(Float64(x * log(y)) - t); elseif (Float64(-1.0 + x) <= -1.0) tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); else tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((-1.0 + x) <= -1e+22) tmp = (x * log(y)) - t; elseif ((-1.0 + x) <= -1.0) tmp = ((y * (1.0 - z)) - log(y)) - t; else tmp = (log(y) * (-1.0 + x)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1e+22], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1 \cdot 10^{+22}:\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{elif}\;-1 + x \leq -1:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1e22Initial program 98.1%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
mul-1-neg99.7%
fma-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 77.3%
associate-/l*77.2%
sub-neg77.2%
metadata-eval77.2%
+-commutative77.2%
mul-1-neg77.2%
unsub-neg77.2%
Simplified77.2%
Taylor expanded in x around inf 98.1%
*-commutative98.1%
Simplified98.1%
if -1e22 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 78.4%
Taylor expanded in y around 0 98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
fma-define98.4%
mul-1-neg98.4%
fma-neg98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 97.7%
mul-1-neg97.7%
Simplified97.7%
Taylor expanded in y around 0 97.7%
if -1 < (-.f64 x #s(literal 1 binary64)) Initial program 95.4%
Taylor expanded in y around 0 95.4%
Final simplification97.2%
(FPCore (x y z t) :precision binary64 (- (+ (* (log y) (+ -1.0 x)) (* (+ z -1.0) (* y (+ -1.0 (* y (- (* y -0.3333333333333333) 0.5)))))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - 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 = ((log(y) * ((-1.0d0) + x)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * ((y * (-0.3333333333333333d0)) - 0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * Float64(Float64(y * -0.3333333333333333) - 0.5)))))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5)))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * N[(N[(y * -0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.7%
Final simplification99.7%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2e+120) (not (<= z 0.09))) (- (* z (- (* x (/ (log y) z)) y)) t) (- (* (log y) (+ -1.0 x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e+120) || !(z <= 0.09)) {
tmp = (z * ((x * (log(y) / z)) - y)) - t;
} else {
tmp = (log(y) * (-1.0 + x)) - t;
}
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
real(8) :: tmp
if ((z <= (-2d+120)) .or. (.not. (z <= 0.09d0))) then
tmp = (z * ((x * (log(y) / z)) - y)) - t
else
tmp = (log(y) * ((-1.0d0) + x)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2e+120) || !(z <= 0.09)) {
tmp = (z * ((x * (Math.log(y) / z)) - y)) - t;
} else {
tmp = (Math.log(y) * (-1.0 + x)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2e+120) or not (z <= 0.09): tmp = (z * ((x * (math.log(y) / z)) - y)) - t else: tmp = (math.log(y) * (-1.0 + x)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2e+120) || !(z <= 0.09)) tmp = Float64(Float64(z * Float64(Float64(x * Float64(log(y) / z)) - y)) - t); else tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2e+120) || ~((z <= 0.09))) tmp = (z * ((x * (log(y) / z)) - y)) - t; else tmp = (log(y) * (-1.0 + x)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2e+120], N[Not[LessEqual[z, 0.09]], $MachinePrecision]], N[(N[(z * N[(N[(x * N[(N[Log[y], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+120} \lor \neg \left(z \leq 0.09\right):\\
\;\;\;\;z \cdot \left(x \cdot \frac{\log y}{z} - y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\end{array}
\end{array}
if z < -2e120 or 0.089999999999999997 < z Initial program 70.1%
Taylor expanded in y around 0 99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
fma-define99.1%
mul-1-neg99.1%
fma-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in z around inf 99.1%
associate-/l*99.0%
sub-neg99.0%
metadata-eval99.0%
+-commutative99.0%
mul-1-neg99.0%
unsub-neg99.0%
Simplified99.0%
Taylor expanded in z around inf 99.0%
Taylor expanded in x around inf 95.0%
associate-/l*95.0%
Simplified95.0%
if -2e120 < z < 0.089999999999999997Initial program 99.8%
Taylor expanded in y around 0 98.4%
Final simplification97.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -5.8e+120)
(- (* z (- (* x (/ (log y) z)) y)) t)
(if (<= z 0.09)
(- (* (log y) (+ -1.0 x)) t)
(- (* z (- (/ (log y) (/ z x)) y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+120) {
tmp = (z * ((x * (log(y) / z)) - y)) - t;
} else if (z <= 0.09) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = (z * ((log(y) / (z / x)) - y)) - t;
}
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
real(8) :: tmp
if (z <= (-5.8d+120)) then
tmp = (z * ((x * (log(y) / z)) - y)) - t
else if (z <= 0.09d0) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = (z * ((log(y) / (z / x)) - y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -5.8e+120) {
tmp = (z * ((x * (Math.log(y) / z)) - y)) - t;
} else if (z <= 0.09) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = (z * ((Math.log(y) / (z / x)) - y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -5.8e+120: tmp = (z * ((x * (math.log(y) / z)) - y)) - t elif z <= 0.09: tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = (z * ((math.log(y) / (z / x)) - y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -5.8e+120) tmp = Float64(Float64(z * Float64(Float64(x * Float64(log(y) / z)) - y)) - t); elseif (z <= 0.09) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(z * Float64(Float64(log(y) / Float64(z / x)) - y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -5.8e+120) tmp = (z * ((x * (log(y) / z)) - y)) - t; elseif (z <= 0.09) tmp = (log(y) * (-1.0 + x)) - t; else tmp = (z * ((log(y) / (z / x)) - y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -5.8e+120], N[(N[(z * N[(N[(x * N[(N[Log[y], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[z, 0.09], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(z * N[(N[(N[Log[y], $MachinePrecision] / N[(z / x), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+120}:\\
\;\;\;\;z \cdot \left(x \cdot \frac{\log y}{z} - y\right) - t\\
\mathbf{elif}\;z \leq 0.09:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{\log y}{\frac{z}{x}} - y\right) - t\\
\end{array}
\end{array}
if z < -5.8000000000000003e120Initial program 62.5%
Taylor expanded in y around 0 97.9%
+-commutative97.9%
sub-neg97.9%
metadata-eval97.9%
fma-define97.9%
mul-1-neg97.9%
fma-neg97.9%
+-commutative97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in z around inf 97.9%
associate-/l*97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in z around inf 97.9%
Taylor expanded in x around inf 97.0%
associate-/l*97.0%
Simplified97.0%
if -5.8000000000000003e120 < z < 0.089999999999999997Initial program 99.8%
Taylor expanded in y around 0 98.4%
if 0.089999999999999997 < z Initial program 74.2%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
mul-1-neg99.7%
fma-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
Taylor expanded in x around inf 93.9%
clear-num93.8%
un-div-inv94.0%
Applied egg-rr94.0%
Final simplification97.0%
(FPCore (x y z t)
:precision binary64
(if (<= z -1e+120)
(- (* z (- (* x (/ (log y) z)) y)) t)
(if (<= z 0.09)
(- (* (log y) (+ -1.0 x)) t)
(- (* z (- (* (log y) (/ x z)) y)) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+120) {
tmp = (z * ((x * (log(y) / z)) - y)) - t;
} else if (z <= 0.09) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = (z * ((log(y) * (x / z)) - y)) - t;
}
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
real(8) :: tmp
if (z <= (-1d+120)) then
tmp = (z * ((x * (log(y) / z)) - y)) - t
else if (z <= 0.09d0) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = (z * ((log(y) * (x / z)) - y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -1e+120) {
tmp = (z * ((x * (Math.log(y) / z)) - y)) - t;
} else if (z <= 0.09) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = (z * ((Math.log(y) * (x / z)) - y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -1e+120: tmp = (z * ((x * (math.log(y) / z)) - y)) - t elif z <= 0.09: tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = (z * ((math.log(y) * (x / z)) - y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -1e+120) tmp = Float64(Float64(z * Float64(Float64(x * Float64(log(y) / z)) - y)) - t); elseif (z <= 0.09) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(z * Float64(Float64(log(y) * Float64(x / z)) - y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -1e+120) tmp = (z * ((x * (log(y) / z)) - y)) - t; elseif (z <= 0.09) tmp = (log(y) * (-1.0 + x)) - t; else tmp = (z * ((log(y) * (x / z)) - y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -1e+120], N[(N[(z * N[(N[(x * N[(N[Log[y], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], If[LessEqual[z, 0.09], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(z * N[(N[(N[Log[y], $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+120}:\\
\;\;\;\;z \cdot \left(x \cdot \frac{\log y}{z} - y\right) - t\\
\mathbf{elif}\;z \leq 0.09:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\log y \cdot \frac{x}{z} - y\right) - t\\
\end{array}
\end{array}
if z < -9.9999999999999998e119Initial program 62.5%
Taylor expanded in y around 0 97.9%
+-commutative97.9%
sub-neg97.9%
metadata-eval97.9%
fma-define97.9%
mul-1-neg97.9%
fma-neg97.9%
+-commutative97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
Simplified97.9%
Taylor expanded in z around inf 97.9%
associate-/l*97.9%
sub-neg97.9%
metadata-eval97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Taylor expanded in z around inf 97.9%
Taylor expanded in x around inf 97.0%
associate-/l*97.0%
Simplified97.0%
if -9.9999999999999998e119 < z < 0.089999999999999997Initial program 99.8%
Taylor expanded in y around 0 98.4%
if 0.089999999999999997 < z Initial program 74.2%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
mul-1-neg99.7%
fma-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 99.7%
associate-/l*99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
mul-1-neg99.5%
unsub-neg99.5%
Simplified99.5%
Taylor expanded in z around inf 99.5%
Taylor expanded in x around inf 93.9%
Final simplification97.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -1e+22) (not (<= (+ -1.0 x) -1.0))) (- (* x (log y)) t) (- y (+ (log y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -1e+22) || !((-1.0 + x) <= -1.0)) {
tmp = (x * log(y)) - t;
} else {
tmp = y - (log(y) + t);
}
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
real(8) :: tmp
if ((((-1.0d0) + x) <= (-1d+22)) .or. (.not. (((-1.0d0) + x) <= (-1.0d0)))) then
tmp = (x * log(y)) - t
else
tmp = y - (log(y) + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -1e+22) || !((-1.0 + x) <= -1.0)) {
tmp = (x * Math.log(y)) - t;
} else {
tmp = y - (Math.log(y) + t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -1e+22) or not ((-1.0 + x) <= -1.0): tmp = (x * math.log(y)) - t else: tmp = y - (math.log(y) + t) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -1e+22) || !(Float64(-1.0 + x) <= -1.0)) tmp = Float64(Float64(x * log(y)) - t); else tmp = Float64(y - Float64(log(y) + t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -1e+22) || ~(((-1.0 + x) <= -1.0))) tmp = (x * log(y)) - t; else tmp = y - (log(y) + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -1e+22], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(y - N[(N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1 \cdot 10^{+22} \lor \neg \left(-1 + x \leq -1\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;y - \left(\log y + t\right)\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1e22 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 96.7%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
mul-1-neg99.7%
fma-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 76.6%
associate-/l*76.5%
sub-neg76.5%
metadata-eval76.5%
+-commutative76.5%
mul-1-neg76.5%
unsub-neg76.5%
Simplified76.5%
Taylor expanded in x around inf 96.1%
*-commutative96.1%
Simplified96.1%
if -1e22 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 78.4%
Taylor expanded in y around 0 98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
fma-define98.4%
mul-1-neg98.4%
fma-neg98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 97.7%
mul-1-neg97.7%
Simplified97.7%
Taylor expanded in z around 0 75.6%
neg-mul-175.6%
associate-+r+75.6%
distribute-lft-in75.6%
mul-1-neg75.6%
distribute-neg-in75.6%
sub-neg75.6%
neg-mul-175.6%
remove-double-neg75.6%
Simplified75.6%
Final simplification85.9%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -400000.0) (not (<= (+ -1.0 x) -1.0))) (- (* x (log y)) t) (- (- t) (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -400000.0) || !((-1.0 + x) <= -1.0)) {
tmp = (x * log(y)) - t;
} else {
tmp = -t - log(y);
}
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
real(8) :: tmp
if ((((-1.0d0) + x) <= (-400000.0d0)) .or. (.not. (((-1.0d0) + x) <= (-1.0d0)))) then
tmp = (x * log(y)) - t
else
tmp = -t - log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -400000.0) || !((-1.0 + x) <= -1.0)) {
tmp = (x * Math.log(y)) - t;
} else {
tmp = -t - Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -400000.0) or not ((-1.0 + x) <= -1.0): tmp = (x * math.log(y)) - t else: tmp = -t - math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -400000.0) || !(Float64(-1.0 + x) <= -1.0)) tmp = Float64(Float64(x * log(y)) - t); else tmp = Float64(Float64(-t) - log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -400000.0) || ~(((-1.0 + x) <= -1.0))) tmp = (x * log(y)) - t; else tmp = -t - log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -400000.0], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -400000 \lor \neg \left(-1 + x \leq -1\right):\\
\;\;\;\;x \cdot \log y - t\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \log y\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -4e5 or -1 < (-.f64 x #s(literal 1 binary64)) Initial program 96.7%
Taylor expanded in y around 0 99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
fma-define99.7%
mul-1-neg99.7%
fma-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 76.8%
associate-/l*76.7%
sub-neg76.7%
metadata-eval76.7%
+-commutative76.7%
mul-1-neg76.7%
unsub-neg76.7%
Simplified76.7%
Taylor expanded in x around inf 95.7%
*-commutative95.7%
Simplified95.7%
if -4e5 < (-.f64 x #s(literal 1 binary64)) < -1Initial program 78.2%
Taylor expanded in y around 0 98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
fma-define98.4%
mul-1-neg98.4%
fma-neg98.4%
+-commutative98.4%
sub-neg98.4%
metadata-eval98.4%
+-commutative98.4%
Simplified98.4%
Taylor expanded in x around 0 98.4%
mul-1-neg98.4%
Simplified98.4%
Taylor expanded in y around 0 75.3%
mul-1-neg75.3%
Simplified75.3%
Final simplification85.7%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.4e+165)
(- (- t) (* z y))
(if (<= z 7e+166)
(- (* (log y) (+ -1.0 x)) t)
(* z (- (/ (* x (log y)) z) y)))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.4e+165) {
tmp = -t - (z * y);
} else if (z <= 7e+166) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = z * (((x * log(y)) / z) - y);
}
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
real(8) :: tmp
if (z <= (-7.4d+165)) then
tmp = -t - (z * y)
else if (z <= 7d+166) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = z * (((x * log(y)) / z) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.4e+165) {
tmp = -t - (z * y);
} else if (z <= 7e+166) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = z * (((x * Math.log(y)) / z) - y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.4e+165: tmp = -t - (z * y) elif z <= 7e+166: tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = z * (((x * math.log(y)) / z) - y) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.4e+165) tmp = Float64(Float64(-t) - Float64(z * y)); elseif (z <= 7e+166) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(z * Float64(Float64(Float64(x * log(y)) / z) - y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.4e+165) tmp = -t - (z * y); elseif (z <= 7e+166) tmp = (log(y) * (-1.0 + x)) - t; else tmp = z * (((x * log(y)) / z) - y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.4e+165], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+166], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(z * N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.4 \cdot 10^{+165}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+166}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{x \cdot \log y}{z} - y\right)\\
\end{array}
\end{array}
if z < -7.40000000000000012e165Initial program 56.3%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
fma-define99.9%
mul-1-neg99.9%
fma-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 75.8%
mul-1-neg75.8%
Simplified75.8%
Taylor expanded in z around inf 74.4%
associate-*r*74.4%
neg-mul-174.4%
Simplified74.4%
if -7.40000000000000012e165 < z < 6.9999999999999997e166Initial program 96.9%
Taylor expanded in y around 0 95.2%
if 6.9999999999999997e166 < z Initial program 59.6%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
fma-define99.6%
mul-1-neg99.6%
fma-neg99.6%
+-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in z around inf 99.5%
associate-/l*99.4%
sub-neg99.4%
metadata-eval99.4%
+-commutative99.4%
mul-1-neg99.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in z around inf 99.4%
Taylor expanded in x around inf 96.8%
Taylor expanded in t around 0 81.5%
Final simplification91.3%
(FPCore (x y z t) :precision binary64 (- (+ (* (log y) (+ -1.0 x)) (* (+ z -1.0) (* y (+ -1.0 (* y -0.5))))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - 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 = ((log(y) * ((-1.0d0) + x)) + ((z + (-1.0d0)) * (y * ((-1.0d0) + (y * (-0.5d0)))))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(Float64(z + -1.0) * Float64(y * Float64(-1.0 + Float64(y * -0.5))))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) + ((z + -1.0) * (y * (-1.0 + (y * -0.5))))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(N[(z + -1.0), $MachinePrecision] * N[(y * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) + \left(z + -1\right) \cdot \left(y \cdot \left(-1 + y \cdot -0.5\right)\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.6%
Final simplification99.6%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -5e+70) (not (<= (+ -1.0 x) 5e+15))) (* x (log y)) (- (- t) (log y))))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -5e+70) || !((-1.0 + x) <= 5e+15)) {
tmp = x * log(y);
} else {
tmp = -t - log(y);
}
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
real(8) :: tmp
if ((((-1.0d0) + x) <= (-5d+70)) .or. (.not. (((-1.0d0) + x) <= 5d+15))) then
tmp = x * log(y)
else
tmp = -t - log(y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -5e+70) || !((-1.0 + x) <= 5e+15)) {
tmp = x * Math.log(y);
} else {
tmp = -t - Math.log(y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -5e+70) or not ((-1.0 + x) <= 5e+15): tmp = x * math.log(y) else: tmp = -t - math.log(y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -5e+70) || !(Float64(-1.0 + x) <= 5e+15)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(-t) - log(y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -5e+70) || ~(((-1.0 + x) <= 5e+15))) tmp = x * log(y); else tmp = -t - log(y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -5e+70], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], 5e+15]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[((-t) - N[Log[y], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -5 \cdot 10^{+70} \lor \neg \left(-1 + x \leq 5 \cdot 10^{+15}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\left(-t\right) - \log y\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -5.0000000000000002e70 or 5e15 < (-.f64 x #s(literal 1 binary64)) Initial program 97.1%
Taylor expanded in y around 0 97.1%
Taylor expanded in x around inf 79.6%
if -5.0000000000000002e70 < (-.f64 x #s(literal 1 binary64)) < 5e15Initial program 80.1%
Taylor expanded in y around 0 98.6%
+-commutative98.6%
sub-neg98.6%
metadata-eval98.6%
fma-define98.6%
mul-1-neg98.6%
fma-neg98.6%
+-commutative98.6%
sub-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified98.6%
Taylor expanded in x around 0 94.0%
mul-1-neg94.0%
Simplified94.0%
Taylor expanded in y around 0 73.0%
mul-1-neg73.0%
Simplified73.0%
Final simplification75.9%
(FPCore (x y z t)
:precision binary64
(if (<= z -7.2e+165)
(- (- t) (* z y))
(if (<= z 2.7e+225)
(- (* (log y) (+ -1.0 x)) t)
(-
(*
y
(* z (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5)))))
t))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e+165) {
tmp = -t - (z * y);
} else if (z <= 2.7e+225) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t;
}
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
real(8) :: tmp
if (z <= (-7.2d+165)) then
tmp = -t - (z * y)
else if (z <= 2.7d+225) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = (y * (z * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0))))) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -7.2e+165) {
tmp = -t - (z * y);
} else if (z <= 2.7e+225) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -7.2e+165: tmp = -t - (z * y) elif z <= 2.7e+225: tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -7.2e+165) tmp = Float64(Float64(-t) - Float64(z * y)); elseif (z <= 2.7e+225) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5))))) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -7.2e+165) tmp = -t - (z * y); elseif (z <= 2.7e+225) tmp = (log(y) * (-1.0 + x)) - t; else tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -7.2e+165], N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+225], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+165}:\\
\;\;\;\;\left(-t\right) - z \cdot y\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+225}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(z \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) - t\\
\end{array}
\end{array}
if z < -7.1999999999999996e165Initial program 56.3%
Taylor expanded in y around 0 99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
fma-define99.9%
mul-1-neg99.9%
fma-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 75.8%
mul-1-neg75.8%
Simplified75.8%
Taylor expanded in z around inf 74.4%
associate-*r*74.4%
neg-mul-174.4%
Simplified74.4%
if -7.1999999999999996e165 < z < 2.6999999999999999e225Initial program 95.5%
Taylor expanded in y around 0 93.7%
if 2.6999999999999999e225 < z Initial program 44.3%
Taylor expanded in y around 0 99.9%
Taylor expanded in x around 0 68.3%
mul-1-neg68.3%
Simplified68.3%
Taylor expanded in z around inf 68.1%
Final simplification89.8%
(FPCore (x y z t) :precision binary64 (- (- (* (log y) (+ -1.0 x)) (* (+ z -1.0) y)) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) - ((z + -1.0) * y)) - 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 = ((log(y) * ((-1.0d0) + x)) - ((z + (-1.0d0)) * y)) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) - ((z + -1.0) * y)) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) - ((z + -1.0) * y)) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) - Float64(Float64(z + -1.0) * y)) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) - ((z + -1.0) * y)) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - N[(N[(z + -1.0), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) - \left(z + -1\right) \cdot y\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
fma-define99.1%
mul-1-neg99.1%
fma-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (- (* y (* z (+ -1.0 (* y (- (* y (- (* y -0.25) 0.3333333333333333)) 0.5))))) t))
double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - 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 = (y * (z * ((-1.0d0) + (y * ((y * ((y * (-0.25d0)) - 0.3333333333333333d0)) - 0.5d0))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t;
}
def code(x, y, z, t): return (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(Float64(y * Float64(Float64(y * -0.25) - 0.3333333333333333)) - 0.5))))) - t) end
function tmp = code(x, y, z, t) tmp = (y * (z * (-1.0 + (y * ((y * ((y * -0.25) - 0.3333333333333333)) - 0.5))))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(N[(y * N[(N[(y * -0.25), $MachinePrecision] - 0.3333333333333333), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(z \cdot \left(-1 + y \cdot \left(y \cdot \left(y \cdot -0.25 - 0.3333333333333333\right) - 0.5\right)\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.7%
Taylor expanded in x around 0 62.4%
mul-1-neg62.4%
Simplified62.4%
Taylor expanded in z around inf 45.4%
Final simplification45.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.2e+14) (not (<= t 5e-17))) (- t) (* y (- 1.0 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+14) || !(t <= 5e-17)) {
tmp = -t;
} else {
tmp = y * (1.0 - 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
real(8) :: tmp
if ((t <= (-1.2d+14)) .or. (.not. (t <= 5d-17))) then
tmp = -t
else
tmp = y * (1.0d0 - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.2e+14) || !(t <= 5e-17)) {
tmp = -t;
} else {
tmp = y * (1.0 - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.2e+14) or not (t <= 5e-17): tmp = -t else: tmp = y * (1.0 - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.2e+14) || !(t <= 5e-17)) tmp = Float64(-t); else tmp = Float64(y * Float64(1.0 - z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.2e+14) || ~((t <= 5e-17))) tmp = -t; else tmp = y * (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.2e+14], N[Not[LessEqual[t, 5e-17]], $MachinePrecision]], (-t), N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+14} \lor \neg \left(t \leq 5 \cdot 10^{-17}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\end{array}
if t < -1.2e14 or 4.9999999999999999e-17 < t Initial program 92.9%
Taylor expanded in t around inf 58.1%
mul-1-neg58.1%
Simplified58.1%
if -1.2e14 < t < 4.9999999999999999e-17Initial program 81.5%
Taylor expanded in y around 0 98.6%
+-commutative98.6%
sub-neg98.6%
metadata-eval98.6%
fma-define98.6%
mul-1-neg98.6%
fma-neg98.6%
+-commutative98.6%
sub-neg98.6%
metadata-eval98.6%
+-commutative98.6%
Simplified98.6%
Taylor expanded in y around inf 22.1%
Final simplification41.4%
(FPCore (x y z t) :precision binary64 (- (* y (* z (+ -1.0 (* y (- (* y -0.3333333333333333) 0.5))))) t))
double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) - 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 = (y * (z * ((-1.0d0) + (y * ((y * (-0.3333333333333333d0)) - 0.5d0))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) - t;
}
def code(x, y, z, t): return (y * (z * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * Float64(Float64(y * -0.3333333333333333) - 0.5))))) - t) end
function tmp = code(x, y, z, t) tmp = (y * (z * (-1.0 + (y * ((y * -0.3333333333333333) - 0.5))))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(z * N[(-1.0 + N[(y * N[(N[(y * -0.3333333333333333), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(z \cdot \left(-1 + y \cdot \left(y \cdot -0.3333333333333333 - 0.5\right)\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.7%
Taylor expanded in x around 0 62.4%
mul-1-neg62.4%
Simplified62.4%
Taylor expanded in y around 0 62.3%
Taylor expanded in z around inf 45.4%
Final simplification45.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -550000000.0) (not (<= t 7600000.0))) (- t) (* z (- y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -550000000.0) || !(t <= 7600000.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
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
real(8) :: tmp
if ((t <= (-550000000.0d0)) .or. (.not. (t <= 7600000.0d0))) then
tmp = -t
else
tmp = z * -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -550000000.0) || !(t <= 7600000.0)) {
tmp = -t;
} else {
tmp = z * -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -550000000.0) or not (t <= 7600000.0): tmp = -t else: tmp = z * -y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -550000000.0) || !(t <= 7600000.0)) tmp = Float64(-t); else tmp = Float64(z * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -550000000.0) || ~((t <= 7600000.0))) tmp = -t; else tmp = z * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -550000000.0], N[Not[LessEqual[t, 7600000.0]], $MachinePrecision]], (-t), N[(z * (-y)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -550000000 \lor \neg \left(t \leq 7600000\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\end{array}
\end{array}
if t < -5.5e8 or 7.6e6 < t Initial program 93.3%
Taylor expanded in t around inf 61.1%
mul-1-neg61.1%
Simplified61.1%
if -5.5e8 < t < 7.6e6Initial program 81.7%
Taylor expanded in y around 0 98.7%
+-commutative98.7%
sub-neg98.7%
metadata-eval98.7%
fma-define98.7%
mul-1-neg98.7%
fma-neg98.7%
+-commutative98.7%
sub-neg98.7%
metadata-eval98.7%
+-commutative98.7%
Simplified98.7%
Taylor expanded in z around inf 21.1%
mul-1-neg21.1%
distribute-rgt-neg-in21.1%
Simplified21.1%
Final simplification41.4%
(FPCore (x y z t) :precision binary64 (- (* y (* z (+ -1.0 (* y -0.5)))) t))
double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * -0.5)))) - 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 = (y * (z * ((-1.0d0) + (y * (-0.5d0))))) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (z * (-1.0 + (y * -0.5)))) - t;
}
def code(x, y, z, t): return (y * (z * (-1.0 + (y * -0.5)))) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(z * Float64(-1.0 + Float64(y * -0.5)))) - t) end
function tmp = code(x, y, z, t) tmp = (y * (z * (-1.0 + (y * -0.5)))) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(z * N[(-1.0 + N[(y * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(z \cdot \left(-1 + y \cdot -0.5\right)\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.7%
Taylor expanded in x around 0 62.4%
mul-1-neg62.4%
Simplified62.4%
Taylor expanded in y around 0 62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in z around inf 45.4%
Final simplification45.4%
(FPCore (x y z t) :precision binary64 (- (* y (- 1.0 z)) t))
double code(double x, double y, double z, double t) {
return (y * (1.0 - z)) - 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 = (y * (1.0d0 - z)) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * (1.0 - z)) - t;
}
def code(x, y, z, t): return (y * (1.0 - z)) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(1.0 - z)) - t) end
function tmp = code(x, y, z, t) tmp = (y * (1.0 - z)) - t; end
code[x_, y_, z_, t_] := N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(1 - z\right) - t
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
fma-define99.1%
mul-1-neg99.1%
fma-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
Simplified61.7%
Taylor expanded in y around inf 45.3%
(FPCore (x y z t) :precision binary64 (- (- t) (* z y)))
double code(double x, double y, double z, double t) {
return -t - (z * y);
}
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 = -t - (z * y)
end function
public static double code(double x, double y, double z, double t) {
return -t - (z * y);
}
def code(x, y, z, t): return -t - (z * y)
function code(x, y, z, t) return Float64(Float64(-t) - Float64(z * y)) end
function tmp = code(x, y, z, t) tmp = -t - (z * y); end
code[x_, y_, z_, t_] := N[((-t) - N[(z * y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-t\right) - z \cdot y
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
fma-define99.1%
mul-1-neg99.1%
fma-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
Simplified61.7%
Taylor expanded in z around inf 45.1%
associate-*r*45.1%
neg-mul-145.1%
Simplified45.1%
Final simplification45.1%
(FPCore (x y z t) :precision binary64 (- t))
double code(double x, double y, double z, double t) {
return -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 = -t
end function
public static double code(double x, double y, double z, double t) {
return -t;
}
def code(x, y, z, t): return -t
function code(x, y, z, t) return Float64(-t) end
function tmp = code(x, y, z, t) tmp = -t; end
code[x_, y_, z_, t_] := (-t)
\begin{array}{l}
\\
-t
\end{array}
Initial program 87.6%
Taylor expanded in t around inf 32.5%
mul-1-neg32.5%
Simplified32.5%
(FPCore (x y z t) :precision binary64 y)
double code(double x, double y, double z, double t) {
return y;
}
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 = y
end function
public static double code(double x, double y, double z, double t) {
return y;
}
def code(x, y, z, t): return y
function code(x, y, z, t) return y end
function tmp = code(x, y, z, t) tmp = y; end
code[x_, y_, z_, t_] := y
\begin{array}{l}
\\
y
\end{array}
Initial program 87.6%
Taylor expanded in y around 0 99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
fma-define99.1%
mul-1-neg99.1%
fma-neg99.1%
+-commutative99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
Simplified99.1%
Taylor expanded in x around 0 61.7%
mul-1-neg61.7%
Simplified61.7%
Taylor expanded in z around 0 49.2%
neg-mul-149.2%
associate-+r+49.2%
distribute-lft-in49.2%
mul-1-neg49.2%
distribute-neg-in49.2%
sub-neg49.2%
neg-mul-149.2%
remove-double-neg49.2%
Simplified49.2%
Taylor expanded in y around inf 2.8%
herbie shell --seed 2024107
(FPCore (x y z t)
:name "Statistics.Distribution.Beta:$cdensity from math-functions-0.1.5.2"
:precision binary64
(- (+ (* (- x 1.0) (log y)) (* (- z 1.0) (log (- 1.0 y)))) t))