
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(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 * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ (- (- (* x (log y)) y) z) (log t)))
double code(double x, double y, double z, double t) {
return (((x * log(y)) - y) - z) + log(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 * log(y)) - y) - z) + log(t)
end function
public static double code(double x, double y, double z, double t) {
return (((x * Math.log(y)) - y) - z) + Math.log(t);
}
def code(x, y, z, t): return (((x * math.log(y)) - y) - z) + math.log(t)
function code(x, y, z, t) return Float64(Float64(Float64(Float64(x * log(y)) - y) - z) + log(t)) end
function tmp = code(x, y, z, t) tmp = (((x * log(y)) - y) - z) + log(t); end
code[x_, y_, z_, t_] := N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision] + N[Log[t], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x \cdot \log y - y\right) - z\right) + \log t
\end{array}
(FPCore (x y z t) :precision binary64 (+ (* x (log y)) (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
return (x * log(y)) + ((log(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 = (x * log(y)) + ((log(t) - z) - y)
end function
public static double code(double x, double y, double z, double t) {
return (x * Math.log(y)) + ((Math.log(t) - z) - y);
}
def code(x, y, z, t): return (x * math.log(y)) + ((math.log(t) - z) - y)
function code(x, y, z, t) return Float64(Float64(x * log(y)) + Float64(Float64(log(t) - z) - y)) end
function tmp = code(x, y, z, t) tmp = (x * log(y)) + ((log(t) - z) - y); end
code[x_, y_, z_, t_] := N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \log y + \left(\left(\log t - z\right) - y\right)
\end{array}
Initial program 99.8%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (+ (log t) (- (- (* x (log y)) y) z)))
double code(double x, double y, double z, double t) {
return log(t) + (((x * log(y)) - y) - z);
}
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(t) + (((x * log(y)) - y) - z)
end function
public static double code(double x, double y, double z, double t) {
return Math.log(t) + (((x * Math.log(y)) - y) - z);
}
def code(x, y, z, t): return math.log(t) + (((x * math.log(y)) - y) - z)
function code(x, y, z, t) return Float64(log(t) + Float64(Float64(Float64(x * log(y)) - y) - z)) end
function tmp = code(x, y, z, t) tmp = log(t) + (((x * log(y)) - y) - z); end
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] + N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log t + \left(\left(x \cdot \log y - y\right) - z\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- (log t) z)))
(if (<= x -9.8e+76)
t_1
(if (<= x -2.3e-41)
t_2
(if (<= x -5e-297) (- (log t) y) (if (<= x 5.6e+91) t_2 t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = log(t) - z;
double tmp;
if (x <= -9.8e+76) {
tmp = t_1;
} else if (x <= -2.3e-41) {
tmp = t_2;
} else if (x <= -5e-297) {
tmp = log(t) - y;
} else if (x <= 5.6e+91) {
tmp = t_2;
} else {
tmp = t_1;
}
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) :: tmp
t_1 = x * log(y)
t_2 = log(t) - z
if (x <= (-9.8d+76)) then
tmp = t_1
else if (x <= (-2.3d-41)) then
tmp = t_2
else if (x <= (-5d-297)) then
tmp = log(t) - y
else if (x <= 5.6d+91) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double t_2 = Math.log(t) - z;
double tmp;
if (x <= -9.8e+76) {
tmp = t_1;
} else if (x <= -2.3e-41) {
tmp = t_2;
} else if (x <= -5e-297) {
tmp = Math.log(t) - y;
} else if (x <= 5.6e+91) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = math.log(t) - z tmp = 0 if x <= -9.8e+76: tmp = t_1 elif x <= -2.3e-41: tmp = t_2 elif x <= -5e-297: tmp = math.log(t) - y elif x <= 5.6e+91: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(log(t) - z) tmp = 0.0 if (x <= -9.8e+76) tmp = t_1; elseif (x <= -2.3e-41) tmp = t_2; elseif (x <= -5e-297) tmp = Float64(log(t) - y); elseif (x <= 5.6e+91) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = log(t) - z; tmp = 0.0; if (x <= -9.8e+76) tmp = t_1; elseif (x <= -2.3e-41) tmp = t_2; elseif (x <= -5e-297) tmp = log(t) - y; elseif (x <= 5.6e+91) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[x, -9.8e+76], t$95$1, If[LessEqual[x, -2.3e-41], t$95$2, If[LessEqual[x, -5e-297], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 5.6e+91], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \log t - z\\
\mathbf{if}\;x \leq -9.8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-41}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-297}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+91}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.80000000000000053e76 or 5.5999999999999997e91 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 87.0%
Taylor expanded in z around -inf 58.7%
mul-1-neg58.7%
distribute-rgt-neg-in58.7%
mul-1-neg58.7%
associate-*r/58.7%
unsub-neg58.7%
associate-*r/58.7%
*-rgt-identity58.7%
times-frac58.7%
/-rgt-identity58.7%
associate-/r/58.7%
Simplified58.7%
Taylor expanded in z around 0 80.2%
if -9.80000000000000053e76 < x < -2.3000000000000001e-41 or -5e-297 < x < 5.5999999999999997e91Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in z around inf 64.0%
neg-mul-164.0%
Simplified64.0%
Taylor expanded in z around 0 64.0%
mul-1-neg64.0%
sub-neg64.0%
Simplified64.0%
if -2.3000000000000001e-41 < x < -5e-297Initial program 100.0%
sub-neg100.0%
associate--l+100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in y around inf 70.7%
mul-1-neg70.7%
Simplified70.7%
Taylor expanded in y around 0 70.7%
mul-1-neg70.7%
sub-neg70.7%
Simplified70.7%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -6.2e+75)
t_1
(if (<= x -3.4e-34)
(- z)
(if (<= x 1.85) (- (log t) y) (if (<= x 6.8e+88) (- z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -6.2e+75) {
tmp = t_1;
} else if (x <= -3.4e-34) {
tmp = -z;
} else if (x <= 1.85) {
tmp = log(t) - y;
} else if (x <= 6.8e+88) {
tmp = -z;
} else {
tmp = t_1;
}
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 = x * log(y)
if (x <= (-6.2d+75)) then
tmp = t_1
else if (x <= (-3.4d-34)) then
tmp = -z
else if (x <= 1.85d0) then
tmp = log(t) - y
else if (x <= 6.8d+88) then
tmp = -z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -6.2e+75) {
tmp = t_1;
} else if (x <= -3.4e-34) {
tmp = -z;
} else if (x <= 1.85) {
tmp = Math.log(t) - y;
} else if (x <= 6.8e+88) {
tmp = -z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -6.2e+75: tmp = t_1 elif x <= -3.4e-34: tmp = -z elif x <= 1.85: tmp = math.log(t) - y elif x <= 6.8e+88: tmp = -z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -6.2e+75) tmp = t_1; elseif (x <= -3.4e-34) tmp = Float64(-z); elseif (x <= 1.85) tmp = Float64(log(t) - y); elseif (x <= 6.8e+88) tmp = Float64(-z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -6.2e+75) tmp = t_1; elseif (x <= -3.4e-34) tmp = -z; elseif (x <= 1.85) tmp = log(t) - y; elseif (x <= 6.8e+88) tmp = -z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.2e+75], t$95$1, If[LessEqual[x, -3.4e-34], (-z), If[LessEqual[x, 1.85], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 6.8e+88], (-z), t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+75}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-34}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 1.85:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+88}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.2000000000000002e75 or 6.80000000000000008e88 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 87.0%
Taylor expanded in z around -inf 58.7%
mul-1-neg58.7%
distribute-rgt-neg-in58.7%
mul-1-neg58.7%
associate-*r/58.7%
unsub-neg58.7%
associate-*r/58.7%
*-rgt-identity58.7%
times-frac58.7%
/-rgt-identity58.7%
associate-/r/58.7%
Simplified58.7%
Taylor expanded in z around 0 80.2%
if -6.2000000000000002e75 < x < -3.4000000000000001e-34 or 1.8500000000000001 < x < 6.80000000000000008e88Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 57.7%
neg-mul-157.7%
Simplified57.7%
if -3.4000000000000001e-34 < x < 1.8500000000000001Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 62.1%
mul-1-neg62.1%
Simplified62.1%
Taylor expanded in y around 0 62.1%
mul-1-neg62.1%
sub-neg62.1%
Simplified62.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -3.2e+76)
t_1
(if (<= x -1.8e-41)
(- z)
(if (<= x -1.8e-297) (- y) (if (<= x 7.5e+88) (- z) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double tmp;
if (x <= -3.2e+76) {
tmp = t_1;
} else if (x <= -1.8e-41) {
tmp = -z;
} else if (x <= -1.8e-297) {
tmp = -y;
} else if (x <= 7.5e+88) {
tmp = -z;
} else {
tmp = t_1;
}
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 = x * log(y)
if (x <= (-3.2d+76)) then
tmp = t_1
else if (x <= (-1.8d-41)) then
tmp = -z
else if (x <= (-1.8d-297)) then
tmp = -y
else if (x <= 7.5d+88) then
tmp = -z
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -3.2e+76) {
tmp = t_1;
} else if (x <= -1.8e-41) {
tmp = -z;
} else if (x <= -1.8e-297) {
tmp = -y;
} else if (x <= 7.5e+88) {
tmp = -z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) tmp = 0 if x <= -3.2e+76: tmp = t_1 elif x <= -1.8e-41: tmp = -z elif x <= -1.8e-297: tmp = -y elif x <= 7.5e+88: tmp = -z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -3.2e+76) tmp = t_1; elseif (x <= -1.8e-41) tmp = Float64(-z); elseif (x <= -1.8e-297) tmp = Float64(-y); elseif (x <= 7.5e+88) tmp = Float64(-z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); tmp = 0.0; if (x <= -3.2e+76) tmp = t_1; elseif (x <= -1.8e-41) tmp = -z; elseif (x <= -1.8e-297) tmp = -y; elseif (x <= 7.5e+88) tmp = -z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e+76], t$95$1, If[LessEqual[x, -1.8e-41], (-z), If[LessEqual[x, -1.8e-297], (-y), If[LessEqual[x, 7.5e+88], (-z), t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-41}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq -1.8 \cdot 10^{-297}:\\
\;\;\;\;-y\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+88}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.19999999999999976e76 or 7.50000000000000031e88 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 87.0%
Taylor expanded in z around -inf 58.7%
mul-1-neg58.7%
distribute-rgt-neg-in58.7%
mul-1-neg58.7%
associate-*r/58.7%
unsub-neg58.7%
associate-*r/58.7%
*-rgt-identity58.7%
times-frac58.7%
/-rgt-identity58.7%
associate-/r/58.7%
Simplified58.7%
Taylor expanded in z around 0 80.2%
if -3.19999999999999976e76 < x < -1.8e-41 or -1.79999999999999997e-297 < x < 7.50000000000000031e88Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 46.9%
neg-mul-146.9%
Simplified46.9%
if -1.8e-41 < x < -1.79999999999999997e-297Initial program 100.0%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
add-cbrt-cube100.0%
pow3100.0%
Applied egg-rr100.0%
Taylor expanded in y around inf 52.7%
mul-1-neg52.7%
Simplified52.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -9.8e+76) (not (<= x 9e+64))) (- (* x (log y)) y) (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.8e+76) || !(x <= 9e+64)) {
tmp = (x * log(y)) - y;
} else {
tmp = (log(t) - 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 ((x <= (-9.8d+76)) .or. (.not. (x <= 9d+64))) then
tmp = (x * log(y)) - y
else
tmp = (log(t) - z) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -9.8e+76) || !(x <= 9e+64)) {
tmp = (x * Math.log(y)) - y;
} else {
tmp = (Math.log(t) - z) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -9.8e+76) or not (x <= 9e+64): tmp = (x * math.log(y)) - y else: tmp = (math.log(t) - z) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -9.8e+76) || !(x <= 9e+64)) tmp = Float64(Float64(x * log(y)) - y); else tmp = Float64(Float64(log(t) - z) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -9.8e+76) || ~((x <= 9e+64))) tmp = (x * log(y)) - y; else tmp = (log(t) - z) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -9.8e+76], N[Not[LessEqual[x, 9e+64]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{+76} \lor \neg \left(x \leq 9 \cdot 10^{+64}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\end{array}
\end{array}
if x < -9.80000000000000053e76 or 8.99999999999999946e64 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 91.7%
if -9.80000000000000053e76 < x < 8.99999999999999946e64Initial program 99.9%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
unpow399.9%
pow299.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 94.8%
+-commutative94.8%
associate--r+94.9%
Simplified94.9%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.3e+76) (not (<= x 7.8e+64))) (- (* x (log y)) y) (- (- (log t) y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.3e+76) || !(x <= 7.8e+64)) {
tmp = (x * log(y)) - y;
} else {
tmp = (log(t) - 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 ((x <= (-1.3d+76)) .or. (.not. (x <= 7.8d+64))) then
tmp = (x * log(y)) - y
else
tmp = (log(t) - y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.3e+76) || !(x <= 7.8e+64)) {
tmp = (x * Math.log(y)) - y;
} else {
tmp = (Math.log(t) - y) - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.3e+76) or not (x <= 7.8e+64): tmp = (x * math.log(y)) - y else: tmp = (math.log(t) - y) - z return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.3e+76) || !(x <= 7.8e+64)) tmp = Float64(Float64(x * log(y)) - y); else tmp = Float64(Float64(log(t) - y) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.3e+76) || ~((x <= 7.8e+64))) tmp = (x * log(y)) - y; else tmp = (log(t) - y) - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.3e+76], N[Not[LessEqual[x, 7.8e+64]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+76} \lor \neg \left(x \leq 7.8 \cdot 10^{+64}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - y\right) - z\\
\end{array}
\end{array}
if x < -1.3e76 or 7.7999999999999996e64 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 91.7%
if -1.3e76 < x < 7.7999999999999996e64Initial program 99.9%
associate-+l-100.0%
associate--l-100.0%
Simplified100.0%
add-cbrt-cube99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 94.8%
associate--r+94.9%
Simplified94.9%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -3.6e+75) (not (<= x 5.8e+65))) (- (* x (log y)) y) (- (log t) (+ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.6e+75) || !(x <= 5.8e+65)) {
tmp = (x * log(y)) - y;
} else {
tmp = log(t) - (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 ((x <= (-3.6d+75)) .or. (.not. (x <= 5.8d+65))) then
tmp = (x * log(y)) - y
else
tmp = log(t) - (z + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -3.6e+75) || !(x <= 5.8e+65)) {
tmp = (x * Math.log(y)) - y;
} else {
tmp = Math.log(t) - (z + y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -3.6e+75) or not (x <= 5.8e+65): tmp = (x * math.log(y)) - y else: tmp = math.log(t) - (z + y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -3.6e+75) || !(x <= 5.8e+65)) tmp = Float64(Float64(x * log(y)) - y); else tmp = Float64(log(t) - Float64(z + y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -3.6e+75) || ~((x <= 5.8e+65))) tmp = (x * log(y)) - y; else tmp = log(t) - (z + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -3.6e+75], N[Not[LessEqual[x, 5.8e+65]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(z + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+75} \lor \neg \left(x \leq 5.8 \cdot 10^{+65}\right):\\
\;\;\;\;x \cdot \log y - y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(z + y\right)\\
\end{array}
\end{array}
if x < -3.6e75 or 5.8000000000000001e65 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in y around inf 91.7%
if -3.6e75 < x < 5.8000000000000001e65Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 94.8%
Final simplification93.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.1e+78) (not (<= x 1.9e+89))) (* x (log y)) (- (log t) (+ z y))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.1e+78) || !(x <= 1.9e+89)) {
tmp = x * log(y);
} else {
tmp = log(t) - (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 ((x <= (-1.1d+78)) .or. (.not. (x <= 1.9d+89))) then
tmp = x * log(y)
else
tmp = log(t) - (z + y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.1e+78) || !(x <= 1.9e+89)) {
tmp = x * Math.log(y);
} else {
tmp = Math.log(t) - (z + y);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.1e+78) or not (x <= 1.9e+89): tmp = x * math.log(y) else: tmp = math.log(t) - (z + y) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.1e+78) || !(x <= 1.9e+89)) tmp = Float64(x * log(y)); else tmp = Float64(log(t) - Float64(z + y)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.1e+78) || ~((x <= 1.9e+89))) tmp = x * log(y); else tmp = log(t) - (z + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.1e+78], N[Not[LessEqual[x, 1.9e+89]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[Log[t], $MachinePrecision] - N[(z + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.1 \cdot 10^{+78} \lor \neg \left(x \leq 1.9 \cdot 10^{+89}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\log t - \left(z + y\right)\\
\end{array}
\end{array}
if x < -1.10000000000000007e78 or 1.90000000000000012e89 < x Initial program 99.7%
associate-+l-99.7%
associate--l-99.7%
Simplified99.7%
Taylor expanded in z around inf 87.0%
Taylor expanded in z around -inf 58.7%
mul-1-neg58.7%
distribute-rgt-neg-in58.7%
mul-1-neg58.7%
associate-*r/58.7%
unsub-neg58.7%
associate-*r/58.7%
*-rgt-identity58.7%
times-frac58.7%
/-rgt-identity58.7%
associate-/r/58.7%
Simplified58.7%
Taylor expanded in z around 0 80.2%
if -1.10000000000000007e78 < x < 1.90000000000000012e89Initial program 99.9%
sub-neg99.9%
associate--l+99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 94.3%
Final simplification89.2%
(FPCore (x y z t) :precision binary64 (if (<= y 3.4e+81) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.4e+81) {
tmp = -z;
} else {
tmp = -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 (y <= 3.4d+81) then
tmp = -z
else
tmp = -y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 3.4e+81) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 3.4e+81: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 3.4e+81) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 3.4e+81) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 3.4e+81], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.4 \cdot 10^{+81}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 3.40000000000000003e81Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
add-cbrt-cube99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in z around inf 36.0%
neg-mul-136.0%
Simplified36.0%
if 3.40000000000000003e81 < y Initial program 99.9%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.9%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 68.5%
mul-1-neg68.5%
Simplified68.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 Float64(-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 99.8%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 28.2%
mul-1-neg28.2%
Simplified28.2%
(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 99.8%
associate-+l-99.9%
associate--l-99.9%
Simplified99.9%
add-cbrt-cube99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in y around inf 28.2%
mul-1-neg28.2%
Simplified28.2%
neg-sub028.2%
sub-neg28.2%
add-sqr-sqrt0.0%
sqrt-unprod2.2%
sqr-neg2.2%
sqrt-unprod2.2%
add-sqr-sqrt2.2%
Applied egg-rr2.2%
+-lft-identity2.2%
Simplified2.2%
herbie shell --seed 2024185
(FPCore (x y z t)
:name "Numeric.SpecFunctions:incompleteGamma from math-functions-0.1.5.2, A"
:precision binary64
(+ (- (- (* x (log y)) y) z) (log t)))