
(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 19 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.9%
sub-neg87.9%
+-commutative87.9%
associate-+l+87.9%
fma-define87.9%
sub-neg87.9%
metadata-eval87.9%
sub-neg87.9%
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.9%
+-commutative87.9%
fma-define87.9%
sub-neg87.9%
metadata-eval87.9%
sub-neg87.9%
log1p-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z (- (/ y z) y)) t))
(t_2 (* x (log y)))
(t_3 (- (- (log y)) t)))
(if (<= x -1950000000.0)
t_2
(if (<= x 3.05e-297)
t_3
(if (<= x 1e-187)
t_1
(if (<= x 3.6e-32) t_3 (if (<= x 1.2e+20) t_1 t_2)))))))
double code(double x, double y, double z, double t) {
double t_1 = (z * ((y / z) - y)) - t;
double t_2 = x * log(y);
double t_3 = -log(y) - t;
double tmp;
if (x <= -1950000000.0) {
tmp = t_2;
} else if (x <= 3.05e-297) {
tmp = t_3;
} else if (x <= 1e-187) {
tmp = t_1;
} else if (x <= 3.6e-32) {
tmp = t_3;
} else if (x <= 1.2e+20) {
tmp = t_1;
} 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 = (z * ((y / z) - y)) - t
t_2 = x * log(y)
t_3 = -log(y) - t
if (x <= (-1950000000.0d0)) then
tmp = t_2
else if (x <= 3.05d-297) then
tmp = t_3
else if (x <= 1d-187) then
tmp = t_1
else if (x <= 3.6d-32) then
tmp = t_3
else if (x <= 1.2d+20) then
tmp = t_1
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 = (z * ((y / z) - y)) - t;
double t_2 = x * Math.log(y);
double t_3 = -Math.log(y) - t;
double tmp;
if (x <= -1950000000.0) {
tmp = t_2;
} else if (x <= 3.05e-297) {
tmp = t_3;
} else if (x <= 1e-187) {
tmp = t_1;
} else if (x <= 3.6e-32) {
tmp = t_3;
} else if (x <= 1.2e+20) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t): t_1 = (z * ((y / z) - y)) - t t_2 = x * math.log(y) t_3 = -math.log(y) - t tmp = 0 if x <= -1950000000.0: tmp = t_2 elif x <= 3.05e-297: tmp = t_3 elif x <= 1e-187: tmp = t_1 elif x <= 3.6e-32: tmp = t_3 elif x <= 1.2e+20: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(z * Float64(Float64(y / z) - y)) - t) t_2 = Float64(x * log(y)) t_3 = Float64(Float64(-log(y)) - t) tmp = 0.0 if (x <= -1950000000.0) tmp = t_2; elseif (x <= 3.05e-297) tmp = t_3; elseif (x <= 1e-187) tmp = t_1; elseif (x <= 3.6e-32) tmp = t_3; elseif (x <= 1.2e+20) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (z * ((y / z) - y)) - t; t_2 = x * log(y); t_3 = -log(y) - t; tmp = 0.0; if (x <= -1950000000.0) tmp = t_2; elseif (x <= 3.05e-297) tmp = t_3; elseif (x <= 1e-187) tmp = t_1; elseif (x <= 3.6e-32) tmp = t_3; elseif (x <= 1.2e+20) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[((-N[Log[y], $MachinePrecision]) - t), $MachinePrecision]}, If[LessEqual[x, -1950000000.0], t$95$2, If[LessEqual[x, 3.05e-297], t$95$3, If[LessEqual[x, 1e-187], t$95$1, If[LessEqual[x, 3.6e-32], t$95$3, If[LessEqual[x, 1.2e+20], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(\frac{y}{z} - y\right) - t\\
t_2 := x \cdot \log y\\
t_3 := \left(-\log y\right) - t\\
\mathbf{if}\;x \leq -1950000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.05 \cdot 10^{-297}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.6 \cdot 10^{-32}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+20}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.95e9 or 1.2e20 < x Initial program 92.5%
Taylor expanded in y around 0 99.4%
Taylor expanded in x around inf 74.6%
*-commutative74.6%
Simplified74.6%
if -1.95e9 < x < 3.05e-297 or 1e-187 < x < 3.59999999999999993e-32Initial program 91.2%
Taylor expanded in x around inf 69.7%
associate--l+69.7%
+-commutative69.7%
mul-1-neg69.7%
unsub-neg69.7%
div-sub69.7%
unsub-neg69.7%
mul-1-neg69.7%
+-commutative69.7%
div-sub69.7%
Simplified77.5%
Taylor expanded in y around 0 68.7%
mul-1-neg68.7%
distribute-neg-frac268.7%
+-commutative68.7%
Simplified68.7%
Taylor expanded in x around 0 89.8%
mul-1-neg89.8%
distribute-neg-in89.8%
unsub-neg89.8%
Simplified89.8%
if 3.05e-297 < x < 1e-187 or 3.59999999999999993e-32 < x < 1.2e20Initial program 63.7%
Taylor expanded in y around 0 96.9%
mul-1-neg96.9%
distribute-rgt-neg-in96.9%
sub-neg96.9%
metadata-eval96.9%
+-commutative96.9%
distribute-neg-in96.9%
metadata-eval96.9%
unsub-neg96.9%
Simplified96.9%
Taylor expanded in z around inf 96.9%
+-commutative96.9%
mul-1-neg96.9%
unsub-neg96.9%
+-commutative96.9%
sub-neg96.9%
metadata-eval96.9%
associate-/l*96.9%
fma-define96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in y around inf 80.2%
Final simplification80.9%
(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.9%
Taylor expanded in y around 0 99.4%
Final simplification99.4%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* y (- 1.0 z))))
(if (or (<= (+ -1.0 x) -2000000000.0) (not (<= (+ -1.0 x) -0.5)))
(- (+ t_1 (* x (log y))) t)
(- (- t_1 (log y)) t))))
double code(double x, double y, double z, double t) {
double t_1 = y * (1.0 - z);
double tmp;
if (((-1.0 + x) <= -2000000000.0) || !((-1.0 + x) <= -0.5)) {
tmp = (t_1 + (x * log(y))) - t;
} else {
tmp = (t_1 - 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) :: t_1
real(8) :: tmp
t_1 = y * (1.0d0 - z)
if ((((-1.0d0) + x) <= (-2000000000.0d0)) .or. (.not. (((-1.0d0) + x) <= (-0.5d0)))) then
tmp = (t_1 + (x * log(y))) - t
else
tmp = (t_1 - log(y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = y * (1.0 - z);
double tmp;
if (((-1.0 + x) <= -2000000000.0) || !((-1.0 + x) <= -0.5)) {
tmp = (t_1 + (x * Math.log(y))) - t;
} else {
tmp = (t_1 - Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): t_1 = y * (1.0 - z) tmp = 0 if ((-1.0 + x) <= -2000000000.0) or not ((-1.0 + x) <= -0.5): tmp = (t_1 + (x * math.log(y))) - t else: tmp = (t_1 - math.log(y)) - t return tmp
function code(x, y, z, t) t_1 = Float64(y * Float64(1.0 - z)) tmp = 0.0 if ((Float64(-1.0 + x) <= -2000000000.0) || !(Float64(-1.0 + x) <= -0.5)) tmp = Float64(Float64(t_1 + Float64(x * log(y))) - t); else tmp = Float64(Float64(t_1 - log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = y * (1.0 - z); tmp = 0.0; if (((-1.0 + x) <= -2000000000.0) || ~(((-1.0 + x) <= -0.5))) tmp = (t_1 + (x * log(y))) - t; else tmp = (t_1 - log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -2000000000.0], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -0.5]], $MachinePrecision]], N[(N[(t$95$1 + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(t$95$1 - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(1 - z\right)\\
\mathbf{if}\;-1 + x \leq -2000000000 \lor \neg \left(-1 + x \leq -0.5\right):\\
\;\;\;\;\left(t\_1 + x \cdot \log y\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 - \log y\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -2e9 or -0.5 < (-.f64 x #s(literal 1 binary64)) Initial program 92.2%
Taylor expanded in y around 0 99.3%
mul-1-neg99.3%
distribute-rgt-neg-in99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
distribute-neg-in99.3%
metadata-eval99.3%
unsub-neg99.3%
Simplified99.3%
Taylor expanded in x around inf 98.1%
*-commutative98.1%
Simplified98.1%
if -2e9 < (-.f64 x #s(literal 1 binary64)) < -0.5Initial program 83.1%
Taylor expanded in y around 0 98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
distribute-neg-in98.5%
metadata-eval98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in x around 0 97.9%
+-commutative97.9%
mul-1-neg97.9%
unsub-neg97.9%
Simplified97.9%
Final simplification98.0%
(FPCore (x y z t) :precision binary64 (if (or (<= (+ -1.0 x) -1.0) (not (<= (+ -1.0 x) -0.1))) (- (* (log y) (+ -1.0 x)) t) (- (- (* y (- 1.0 z)) (log y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (((-1.0 + x) <= -1.0) || !((-1.0 + x) <= -0.1)) {
tmp = (log(y) * (-1.0 + x)) - t;
} else {
tmp = ((y * (1.0 - z)) - 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) <= (-1.0d0)) .or. (.not. (((-1.0d0) + x) <= (-0.1d0)))) then
tmp = (log(y) * ((-1.0d0) + x)) - t
else
tmp = ((y * (1.0d0 - z)) - 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) <= -1.0) || !((-1.0 + x) <= -0.1)) {
tmp = (Math.log(y) * (-1.0 + x)) - t;
} else {
tmp = ((y * (1.0 - z)) - Math.log(y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((-1.0 + x) <= -1.0) or not ((-1.0 + x) <= -0.1): tmp = (math.log(y) * (-1.0 + x)) - t else: tmp = ((y * (1.0 - z)) - math.log(y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(-1.0 + x) <= -1.0) || !(Float64(-1.0 + x) <= -0.1)) tmp = Float64(Float64(log(y) * Float64(-1.0 + x)) - t); else tmp = Float64(Float64(Float64(y * Float64(1.0 - z)) - log(y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((-1.0 + x) <= -1.0) || ~(((-1.0 + x) <= -0.1))) tmp = (log(y) * (-1.0 + x)) - t; else tmp = ((y * (1.0 - z)) - log(y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(-1.0 + x), $MachinePrecision], -1.0], N[Not[LessEqual[N[(-1.0 + x), $MachinePrecision], -0.1]], $MachinePrecision]], N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision], N[(N[(N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision] - N[Log[y], $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;-1 + x \leq -1 \lor \neg \left(-1 + x \leq -0.1\right):\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(1 - z\right) - \log y\right) - t\\
\end{array}
\end{array}
if (-.f64 x #s(literal 1 binary64)) < -1 or -0.10000000000000001 < (-.f64 x #s(literal 1 binary64)) Initial program 88.1%
Taylor expanded in y around 0 86.8%
if -1 < (-.f64 x #s(literal 1 binary64)) < -0.10000000000000001Initial program 75.3%
Taylor expanded in y around 0 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 91.6%
+-commutative91.6%
mul-1-neg91.6%
unsub-neg91.6%
Simplified91.6%
Final simplification86.8%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2e+14) (not (<= z 4.2e+128))) (- (* 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 <= -2e+14) || !(z <= 4.2e+128)) {
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 <= (-2d+14)) .or. (.not. (z <= 4.2d+128))) 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 <= -2e+14) || !(z <= 4.2e+128)) {
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 <= -2e+14) or not (z <= 4.2e+128): 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 <= -2e+14) || !(z <= 4.2e+128)) 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 <= -2e+14) || ~((z <= 4.2e+128))) 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, -2e+14], N[Not[LessEqual[z, 4.2e+128]], $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 -2 \cdot 10^{+14} \lor \neg \left(z \leq 4.2 \cdot 10^{+128}\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 < -2e14 or 4.1999999999999999e128 < z Initial program 69.9%
Taylor expanded in y around 0 98.2%
mul-1-neg98.2%
distribute-rgt-neg-in98.2%
sub-neg98.2%
metadata-eval98.2%
+-commutative98.2%
distribute-neg-in98.2%
metadata-eval98.2%
unsub-neg98.2%
Simplified98.2%
Taylor expanded in z around inf 98.2%
+-commutative98.2%
mul-1-neg98.2%
unsub-neg98.2%
+-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
associate-/l*98.1%
fma-define98.1%
+-commutative98.1%
Simplified98.1%
Taylor expanded in y around 0 98.2%
sub-neg98.2%
metadata-eval98.2%
associate-*r/98.1%
+-commutative98.1%
Simplified98.1%
if -2e14 < z < 4.1999999999999999e128Initial program 99.8%
Taylor expanded in y around 0 99.2%
Final simplification98.8%
(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.9%
Taylor expanded in y around 0 99.4%
Final simplification99.4%
(FPCore (x y z t) :precision binary64 (if (or (<= z -8e+112) (not (<= z 1.55e+133))) (- (* 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 <= -8e+112) || !(z <= 1.55e+133)) {
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 <= (-8d+112)) .or. (.not. (z <= 1.55d+133))) 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 <= -8e+112) || !(z <= 1.55e+133)) {
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 <= -8e+112) or not (z <= 1.55e+133): 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 <= -8e+112) || !(z <= 1.55e+133)) 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 <= -8e+112) || ~((z <= 1.55e+133))) 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, -8e+112], N[Not[LessEqual[z, 1.55e+133]], $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 -8 \cdot 10^{+112} \lor \neg \left(z \leq 1.55 \cdot 10^{+133}\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 < -7.9999999999999994e112 or 1.55e133 < z Initial program 60.4%
Taylor expanded in y around 0 97.6%
mul-1-neg97.6%
distribute-rgt-neg-in97.6%
sub-neg97.6%
metadata-eval97.6%
+-commutative97.6%
distribute-neg-in97.6%
metadata-eval97.6%
unsub-neg97.6%
Simplified97.6%
Taylor expanded in z around inf 97.6%
+-commutative97.6%
mul-1-neg97.6%
unsub-neg97.6%
+-commutative97.6%
sub-neg97.6%
metadata-eval97.6%
associate-/l*97.5%
fma-define97.5%
+-commutative97.5%
Simplified97.5%
Taylor expanded in x around inf 93.7%
associate-/l*93.6%
Simplified93.6%
if -7.9999999999999994e112 < z < 1.55e133Initial program 98.8%
Taylor expanded in y around 0 98.3%
Final simplification97.0%
(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.9%
Taylor expanded in y around 0 99.1%
Final simplification99.1%
(FPCore (x y z t) :precision binary64 (if (or (<= z -5.5e+242) (not (<= z 1.65e+265))) (- (* y (- z)) t) (- (* (log y) (+ -1.0 x)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -5.5e+242) || !(z <= 1.65e+265)) {
tmp = (y * -z) - 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 <= (-5.5d+242)) .or. (.not. (z <= 1.65d+265))) then
tmp = (y * -z) - 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 <= -5.5e+242) || !(z <= 1.65e+265)) {
tmp = (y * -z) - t;
} else {
tmp = (Math.log(y) * (-1.0 + x)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -5.5e+242) or not (z <= 1.65e+265): tmp = (y * -z) - t else: tmp = (math.log(y) * (-1.0 + x)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -5.5e+242) || !(z <= 1.65e+265)) tmp = Float64(Float64(y * Float64(-z)) - 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 <= -5.5e+242) || ~((z <= 1.65e+265))) tmp = (y * -z) - t; else tmp = (log(y) * (-1.0 + x)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -5.5e+242], N[Not[LessEqual[z, 1.65e+265]], $MachinePrecision]], N[(N[(y * (-z)), $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 -5.5 \cdot 10^{+242} \lor \neg \left(z \leq 1.65 \cdot 10^{+265}\right):\\
\;\;\;\;y \cdot \left(-z\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right) - t\\
\end{array}
\end{array}
if z < -5.50000000000000022e242 or 1.6499999999999999e265 < z Initial program 33.9%
Taylor expanded in y around 0 95.7%
mul-1-neg95.7%
distribute-rgt-neg-in95.7%
sub-neg95.7%
metadata-eval95.7%
+-commutative95.7%
distribute-neg-in95.7%
metadata-eval95.7%
unsub-neg95.7%
Simplified95.7%
Taylor expanded in z around inf 95.7%
+-commutative95.7%
mul-1-neg95.7%
unsub-neg95.7%
+-commutative95.7%
sub-neg95.7%
metadata-eval95.7%
associate-/l*95.7%
fma-define95.7%
+-commutative95.7%
Simplified95.7%
Taylor expanded in z around inf 84.2%
neg-mul-184.2%
Simplified84.2%
if -5.50000000000000022e242 < z < 1.6499999999999999e265Initial program 94.0%
Taylor expanded in y around 0 93.2%
Final simplification92.3%
(FPCore (x y z t) :precision binary64 (if (or (<= t -4.4e+27) (not (<= t 8e+46))) (- (* y (- z)) t) (* (log y) (+ -1.0 x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.4e+27) || !(t <= 8e+46)) {
tmp = (y * -z) - t;
} else {
tmp = log(y) * (-1.0 + x);
}
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 <= (-4.4d+27)) .or. (.not. (t <= 8d+46))) then
tmp = (y * -z) - t
else
tmp = log(y) * ((-1.0d0) + x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.4e+27) || !(t <= 8e+46)) {
tmp = (y * -z) - t;
} else {
tmp = Math.log(y) * (-1.0 + x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -4.4e+27) or not (t <= 8e+46): tmp = (y * -z) - t else: tmp = math.log(y) * (-1.0 + x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -4.4e+27) || !(t <= 8e+46)) tmp = Float64(Float64(y * Float64(-z)) - t); else tmp = Float64(log(y) * Float64(-1.0 + x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -4.4e+27) || ~((t <= 8e+46))) tmp = (y * -z) - t; else tmp = log(y) * (-1.0 + x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -4.4e+27], N[Not[LessEqual[t, 8e+46]], $MachinePrecision]], N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+27} \lor \neg \left(t \leq 8 \cdot 10^{+46}\right):\\
\;\;\;\;y \cdot \left(-z\right) - t\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot \left(-1 + x\right)\\
\end{array}
\end{array}
if t < -4.3999999999999997e27 or 7.9999999999999999e46 < t Initial program 93.7%
Taylor expanded in y around 0 98.8%
mul-1-neg98.8%
distribute-rgt-neg-in98.8%
sub-neg98.8%
metadata-eval98.8%
+-commutative98.8%
distribute-neg-in98.8%
metadata-eval98.8%
unsub-neg98.8%
Simplified98.8%
Taylor expanded in z around inf 90.9%
+-commutative90.9%
mul-1-neg90.9%
unsub-neg90.9%
+-commutative90.9%
sub-neg90.9%
metadata-eval90.9%
associate-/l*90.8%
fma-define90.8%
+-commutative90.8%
Simplified90.8%
Taylor expanded in z around inf 81.4%
neg-mul-181.4%
Simplified81.4%
if -4.3999999999999997e27 < t < 7.9999999999999999e46Initial program 84.5%
Taylor expanded in y around 0 83.3%
Taylor expanded in t around 0 82.7%
Final simplification82.2%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3300000000.0) (not (<= x 5.7e+16))) (* x (log y)) (- (* z (- (/ y z) y)) t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3300000000.0) || !(x <= 5.7e+16)) {
tmp = x * log(y);
} else {
tmp = (z * ((y / 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 ((x <= (-3300000000.0d0)) .or. (.not. (x <= 5.7d+16))) then
tmp = x * log(y)
else
tmp = (z * ((y / z) - y)) - t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3300000000.0) || !(x <= 5.7e+16)) {
tmp = x * Math.log(y);
} else {
tmp = (z * ((y / z) - y)) - t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3300000000.0) or not (x <= 5.7e+16): tmp = x * math.log(y) else: tmp = (z * ((y / z) - y)) - t return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3300000000.0) || !(x <= 5.7e+16)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(z * Float64(Float64(y / z) - y)) - t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3300000000.0) || ~((x <= 5.7e+16))) tmp = x * log(y); else tmp = (z * ((y / z) - y)) - t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3300000000.0], N[Not[LessEqual[x, 5.7e+16]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3300000000 \lor \neg \left(x \leq 5.7 \cdot 10^{+16}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{y}{z} - y\right) - t\\
\end{array}
\end{array}
if x < -3.3e9 or 5.7e16 < x Initial program 92.5%
Taylor expanded in y around 0 99.4%
Taylor expanded in x around inf 74.6%
*-commutative74.6%
Simplified74.6%
if -3.3e9 < x < 5.7e16Initial program 83.3%
Taylor expanded in y around 0 98.5%
mul-1-neg98.5%
distribute-rgt-neg-in98.5%
sub-neg98.5%
metadata-eval98.5%
+-commutative98.5%
distribute-neg-in98.5%
metadata-eval98.5%
unsub-neg98.5%
Simplified98.5%
Taylor expanded in z around inf 97.8%
+-commutative97.8%
mul-1-neg97.8%
unsub-neg97.8%
+-commutative97.8%
sub-neg97.8%
metadata-eval97.8%
associate-/l*97.7%
fma-define97.6%
+-commutative97.6%
Simplified97.6%
Taylor expanded in y around inf 59.0%
Final simplification66.7%
(FPCore (x y z t) :precision binary64 (- (+ (* (log y) (+ -1.0 x)) (* y (- 1.0 z))) t))
double code(double x, double y, double z, double t) {
return ((log(y) * (-1.0 + x)) + (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 = ((log(y) * ((-1.0d0) + x)) + (y * (1.0d0 - z))) - t
end function
public static double code(double x, double y, double z, double t) {
return ((Math.log(y) * (-1.0 + x)) + (y * (1.0 - z))) - t;
}
def code(x, y, z, t): return ((math.log(y) * (-1.0 + x)) + (y * (1.0 - z))) - t
function code(x, y, z, t) return Float64(Float64(Float64(log(y) * Float64(-1.0 + x)) + Float64(y * Float64(1.0 - z))) - t) end
function tmp = code(x, y, z, t) tmp = ((log(y) * (-1.0 + x)) + (y * (1.0 - z))) - t; end
code[x_, y_, z_, t_] := N[(N[(N[(N[Log[y], $MachinePrecision] * N[(-1.0 + x), $MachinePrecision]), $MachinePrecision] + N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
\left(\log y \cdot \left(-1 + x\right) + y \cdot \left(1 - z\right)\right) - t
\end{array}
Initial program 87.9%
Taylor expanded in y around 0 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
distribute-neg-in98.9%
metadata-eval98.9%
unsub-neg98.9%
Simplified98.9%
Final simplification98.9%
(FPCore (x y z t) :precision binary64 (if (or (<= t -10500.0) (not (<= t 3.5e+34))) (- t) (* y (- 1.0 z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -10500.0) || !(t <= 3.5e+34)) {
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 <= (-10500.0d0)) .or. (.not. (t <= 3.5d+34))) 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 <= -10500.0) || !(t <= 3.5e+34)) {
tmp = -t;
} else {
tmp = y * (1.0 - z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -10500.0) or not (t <= 3.5e+34): tmp = -t else: tmp = y * (1.0 - z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -10500.0) || !(t <= 3.5e+34)) 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 <= -10500.0) || ~((t <= 3.5e+34))) tmp = -t; else tmp = y * (1.0 - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -10500.0], N[Not[LessEqual[t, 3.5e+34]], $MachinePrecision]], (-t), N[(y * N[(1.0 - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -10500 \lor \neg \left(t \leq 3.5 \cdot 10^{+34}\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(1 - z\right)\\
\end{array}
\end{array}
if t < -10500 or 3.49999999999999998e34 < t Initial program 94.0%
Taylor expanded in t around inf 70.5%
mul-1-neg70.5%
Simplified70.5%
if -10500 < t < 3.49999999999999998e34Initial program 83.8%
Taylor expanded in y around 0 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
distribute-neg-in98.9%
metadata-eval98.9%
unsub-neg98.9%
Simplified98.9%
add-cube-cbrt97.4%
pow397.4%
sub-neg97.4%
metadata-eval97.4%
Applied egg-rr97.4%
Taylor expanded in y around inf 18.3%
Final simplification39.1%
(FPCore (x y z t) :precision binary64 (if (or (<= t -3.2e+18) (not (<= t 34000000000000.0))) (- t) (* y (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.2e+18) || !(t <= 34000000000000.0)) {
tmp = -t;
} else {
tmp = y * -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 <= (-3.2d+18)) .or. (.not. (t <= 34000000000000.0d0))) then
tmp = -t
else
tmp = y * -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -3.2e+18) || !(t <= 34000000000000.0)) {
tmp = -t;
} else {
tmp = y * -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -3.2e+18) or not (t <= 34000000000000.0): tmp = -t else: tmp = y * -z return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -3.2e+18) || !(t <= 34000000000000.0)) tmp = Float64(-t); else tmp = Float64(y * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -3.2e+18) || ~((t <= 34000000000000.0))) tmp = -t; else tmp = y * -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -3.2e+18], N[Not[LessEqual[t, 34000000000000.0]], $MachinePrecision]], (-t), N[(y * (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+18} \lor \neg \left(t \leq 34000000000000\right):\\
\;\;\;\;-t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(-z\right)\\
\end{array}
\end{array}
if t < -3.2e18 or 3.4e13 < t Initial program 94.2%
Taylor expanded in t around inf 69.8%
mul-1-neg69.8%
Simplified69.8%
if -3.2e18 < t < 3.4e13Initial program 83.6%
Taylor expanded in y around 0 99.1%
Taylor expanded in z around inf 18.0%
Taylor expanded in y around 0 17.8%
associate-*r*17.8%
mul-1-neg17.8%
Simplified17.8%
Final simplification38.7%
(FPCore (x y z t) :precision binary64 (- (* z (- (/ y z) y)) t))
double code(double x, double y, double z, double t) {
return (z * ((y / z) - 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 = (z * ((y / z) - y)) - t
end function
public static double code(double x, double y, double z, double t) {
return (z * ((y / z) - y)) - t;
}
def code(x, y, z, t): return (z * ((y / z) - y)) - t
function code(x, y, z, t) return Float64(Float64(z * Float64(Float64(y / z) - y)) - t) end
function tmp = code(x, y, z, t) tmp = (z * ((y / z) - y)) - t; end
code[x_, y_, z_, t_] := N[(N[(z * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(\frac{y}{z} - y\right) - t
\end{array}
Initial program 87.9%
Taylor expanded in y around 0 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
distribute-neg-in98.9%
metadata-eval98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in z around inf 86.1%
+-commutative86.1%
mul-1-neg86.1%
unsub-neg86.1%
+-commutative86.1%
sub-neg86.1%
metadata-eval86.1%
associate-/l*86.0%
fma-define86.0%
+-commutative86.0%
Simplified86.0%
Taylor expanded in y around inf 41.4%
Final simplification41.4%
(FPCore (x y z t) :precision binary64 (- (* y (- z)) t))
double code(double x, double y, double z, double t) {
return (y * -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 * -z) - t
end function
public static double code(double x, double y, double z, double t) {
return (y * -z) - t;
}
def code(x, y, z, t): return (y * -z) - t
function code(x, y, z, t) return Float64(Float64(y * Float64(-z)) - t) end
function tmp = code(x, y, z, t) tmp = (y * -z) - t; end
code[x_, y_, z_, t_] := N[(N[(y * (-z)), $MachinePrecision] - t), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(-z\right) - t
\end{array}
Initial program 87.9%
Taylor expanded in y around 0 98.9%
mul-1-neg98.9%
distribute-rgt-neg-in98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
distribute-neg-in98.9%
metadata-eval98.9%
unsub-neg98.9%
Simplified98.9%
Taylor expanded in z around inf 86.1%
+-commutative86.1%
mul-1-neg86.1%
unsub-neg86.1%
+-commutative86.1%
sub-neg86.1%
metadata-eval86.1%
associate-/l*86.0%
fma-define86.0%
+-commutative86.0%
Simplified86.0%
Taylor expanded in z around inf 41.1%
neg-mul-141.1%
Simplified41.1%
Final simplification41.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.9%
Taylor expanded in t around inf 29.8%
mul-1-neg29.8%
Simplified29.8%
Final simplification29.8%
herbie shell --seed 2024078
(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))