
(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 (fma (log y) x (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
return fma(log(y), x, ((log(t) - z) - y));
}
function code(x, y, z, t) return fma(log(y), x, Float64(Float64(log(t) - z) - y)) end
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] * x + N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\log y, x, \left(\log t - z\right) - y\right)
\end{array}
Initial program 99.9%
associate--l-N/A
associate-+l-N/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
log-lowering-log.f64N/A
neg-lowering-neg.f64N/A
associate-+r-N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
log-lowering-log.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma (log y) x (- 0.0 y)))) (if (<= x -3.45e+93) t_1 (if (<= x 4.8e+114) (- (- (log t) z) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(log(y), x, (0.0 - y));
double tmp;
if (x <= -3.45e+93) {
tmp = t_1;
} else if (x <= 4.8e+114) {
tmp = (log(t) - z) - y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(log(y), x, Float64(0.0 - y)) tmp = 0.0 if (x <= -3.45e+93) tmp = t_1; elseif (x <= 4.8e+114) tmp = Float64(Float64(log(t) - z) - y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + N[(0.0 - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.45e+93], t$95$1, If[LessEqual[x, 4.8e+114], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, x, 0 - y\right)\\
\mathbf{if}\;x \leq -3.45 \cdot 10^{+93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+114}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.4499999999999998e93 or 4.8e114 < x Initial program 99.7%
associate--l-N/A
associate-+l-N/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
log-lowering-log.f64N/A
neg-lowering-neg.f64N/A
associate-+r-N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
log-lowering-log.f6499.7%
Applied egg-rr99.7%
Taylor expanded in y around inf
Simplified89.0%
if -3.4499999999999998e93 < x < 4.8e114Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6496.4%
Simplified96.4%
Final simplification93.8%
(FPCore (x y z t) :precision binary64 (if (<= y 1.35e+90) (+ (log t) (- (* (log y) x) z)) (fma (log y) x (- 0.0 y))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.35e+90) {
tmp = log(t) + ((log(y) * x) - z);
} else {
tmp = fma(log(y), x, (0.0 - y));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 1.35e+90) tmp = Float64(log(t) + Float64(Float64(log(y) * x) - z)); else tmp = fma(log(y), x, Float64(0.0 - y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.35e+90], N[(N[Log[t], $MachinePrecision] + N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + N[(0.0 - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.35 \cdot 10^{+90}:\\
\;\;\;\;\log t + \left(\log y \cdot x - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, 0 - y\right)\\
\end{array}
\end{array}
if y < 1.35e90Initial program 99.9%
Taylor expanded in y around 0
--lowering--.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6494.9%
Simplified94.9%
if 1.35e90 < y Initial program 99.9%
associate--l-N/A
associate-+l-N/A
*-commutativeN/A
fmm-defN/A
fma-lowering-fma.f64N/A
log-lowering-log.f64N/A
neg-lowering-neg.f64N/A
associate-+r-N/A
+-lowering-+.f64N/A
--lowering--.f64N/A
log-lowering-log.f6499.9%
Applied egg-rr99.9%
Taylor expanded in y around inf
Simplified92.3%
Final simplification93.9%
(FPCore (x y z t) :precision binary64 (+ (log t) (- (- (* (log y) x) y) z)))
double code(double x, double y, double z, double t) {
return log(t) + (((log(y) * x) - 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) + (((log(y) * x) - y) - z)
end function
public static double code(double x, double y, double z, double t) {
return Math.log(t) + (((Math.log(y) * x) - y) - z);
}
def code(x, y, z, t): return math.log(t) + (((math.log(y) * x) - y) - z)
function code(x, y, z, t) return Float64(log(t) + Float64(Float64(Float64(log(y) * x) - y) - z)) end
function tmp = code(x, y, z, t) tmp = log(t) + (((log(y) * x) - y) - z); end
code[x_, y_, z_, t_] := N[(N[Log[t], $MachinePrecision] + N[(N[(N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\log t + \left(\left(\log y \cdot x - y\right) - z\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x))) (if (<= x -7e+159) t_1 (if (<= x 7.2e+164) (- (- (log t) z) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if (x <= -7e+159) {
tmp = t_1;
} else if (x <= 7.2e+164) {
tmp = (log(t) - z) - y;
} 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 = log(y) * x
if (x <= (-7d+159)) then
tmp = t_1
else if (x <= 7.2d+164) then
tmp = (log(t) - z) - y
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 = Math.log(y) * x;
double tmp;
if (x <= -7e+159) {
tmp = t_1;
} else if (x <= 7.2e+164) {
tmp = (Math.log(t) - z) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if x <= -7e+159: tmp = t_1 elif x <= 7.2e+164: tmp = (math.log(t) - z) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (x <= -7e+159) tmp = t_1; elseif (x <= 7.2e+164) tmp = Float64(Float64(log(t) - z) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if (x <= -7e+159) tmp = t_1; elseif (x <= 7.2e+164) tmp = (log(t) - z) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -7e+159], t$95$1, If[LessEqual[x, 7.2e+164], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -7 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{+164}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.9999999999999999e159 or 7.19999999999999981e164 < x Initial program 99.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6475.0%
Simplified75.0%
if -6.9999999999999999e159 < x < 7.19999999999999981e164Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6491.9%
Simplified91.9%
Final simplification87.7%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (- (- 0.0 y) z))) (if (<= z -550.0) t_1 (if (<= z 5.5e-26) (- (log t) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (0.0 - y) - z;
double tmp;
if (z <= -550.0) {
tmp = t_1;
} else if (z <= 5.5e-26) {
tmp = log(t) - y;
} 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 = (0.0d0 - y) - z
if (z <= (-550.0d0)) then
tmp = t_1
else if (z <= 5.5d-26) then
tmp = log(t) - y
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 = (0.0 - y) - z;
double tmp;
if (z <= -550.0) {
tmp = t_1;
} else if (z <= 5.5e-26) {
tmp = Math.log(t) - y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (0.0 - y) - z tmp = 0 if z <= -550.0: tmp = t_1 elif z <= 5.5e-26: tmp = math.log(t) - y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(0.0 - y) - z) tmp = 0.0 if (z <= -550.0) tmp = t_1; elseif (z <= 5.5e-26) tmp = Float64(log(t) - y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (0.0 - y) - z; tmp = 0.0; if (z <= -550.0) tmp = t_1; elseif (z <= 5.5e-26) tmp = log(t) - y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[z, -550.0], t$95$1, If[LessEqual[z, 5.5e-26], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(0 - y\right) - z\\
\mathbf{if}\;z \leq -550:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-26}:\\
\;\;\;\;\log t - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -550 or 5.5000000000000005e-26 < z Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6482.6%
Simplified82.6%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6481.2%
Simplified81.2%
if -550 < z < 5.5000000000000005e-26Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6467.1%
Simplified67.1%
Taylor expanded in z around 0
--lowering--.f64N/A
log-lowering-log.f6466.5%
Simplified66.5%
Final simplification74.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x))) (if (<= x -9e+159) t_1 (if (<= x 6.2e+165) (- (- 0.0 y) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if (x <= -9e+159) {
tmp = t_1;
} else if (x <= 6.2e+165) {
tmp = (0.0 - y) - 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 = log(y) * x
if (x <= (-9d+159)) then
tmp = t_1
else if (x <= 6.2d+165) then
tmp = (0.0d0 - y) - 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 = Math.log(y) * x;
double tmp;
if (x <= -9e+159) {
tmp = t_1;
} else if (x <= 6.2e+165) {
tmp = (0.0 - y) - z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if x <= -9e+159: tmp = t_1 elif x <= 6.2e+165: tmp = (0.0 - y) - z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) tmp = 0.0 if (x <= -9e+159) tmp = t_1; elseif (x <= 6.2e+165) tmp = Float64(Float64(0.0 - y) - z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; tmp = 0.0; if (x <= -9e+159) tmp = t_1; elseif (x <= 6.2e+165) tmp = (0.0 - y) - z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -9e+159], t$95$1, If[LessEqual[x, 6.2e+165], N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -9 \cdot 10^{+159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+165}:\\
\;\;\;\;\left(0 - y\right) - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -9.00000000000000053e159 or 6.2000000000000003e165 < x Initial program 99.7%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6475.0%
Simplified75.0%
if -9.00000000000000053e159 < x < 6.2000000000000003e165Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6491.9%
Simplified91.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6471.2%
Simplified71.2%
Final simplification72.1%
(FPCore (x y z t) :precision binary64 (if (<= y 5.5e+14) (- (log t) z) (- (- 0.0 y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5.5e+14) {
tmp = log(t) - z;
} else {
tmp = (0.0 - 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 (y <= 5.5d+14) then
tmp = log(t) - z
else
tmp = (0.0d0 - y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 5.5e+14) {
tmp = Math.log(t) - z;
} else {
tmp = (0.0 - y) - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 5.5e+14: tmp = math.log(t) - z else: tmp = (0.0 - y) - z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 5.5e+14) tmp = Float64(log(t) - z); else tmp = Float64(Float64(0.0 - y) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 5.5e+14) tmp = log(t) - z; else tmp = (0.0 - y) - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 5.5e+14], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+14}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;\left(0 - y\right) - z\\
\end{array}
\end{array}
if y < 5.5e14Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6472.6%
Simplified72.6%
Taylor expanded in y around 0
--lowering--.f64N/A
log-lowering-log.f6471.7%
Simplified71.7%
if 5.5e14 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6478.0%
Simplified78.0%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6478.0%
Simplified78.0%
Final simplification74.8%
(FPCore (x y z t) :precision binary64 (if (<= y 1e-171) (log t) (- (- 0.0 y) z)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1e-171) {
tmp = log(t);
} else {
tmp = (0.0 - 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 (y <= 1d-171) then
tmp = log(t)
else
tmp = (0.0d0 - y) - z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1e-171) {
tmp = Math.log(t);
} else {
tmp = (0.0 - y) - z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1e-171: tmp = math.log(t) else: tmp = (0.0 - y) - z return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1e-171) tmp = log(t); else tmp = Float64(Float64(0.0 - y) - z); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1e-171) tmp = log(t); else tmp = (0.0 - y) - z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1e-171], N[Log[t], $MachinePrecision], N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{-171}:\\
\;\;\;\;\log t\\
\mathbf{else}:\\
\;\;\;\;\left(0 - y\right) - z\\
\end{array}
\end{array}
if y < 9.9999999999999998e-172Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6473.4%
Simplified73.4%
Taylor expanded in z around 0
--lowering--.f64N/A
log-lowering-log.f6441.6%
Simplified41.6%
Taylor expanded in y around 0
log-lowering-log.f6441.6%
Simplified41.6%
if 9.9999999999999998e-172 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6475.9%
Simplified75.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6468.3%
Simplified68.3%
Final simplification61.7%
(FPCore (x y z t) :precision binary64 (if (<= y 2.2e+93) (- 0.0 z) (- 0.0 y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.2e+93) {
tmp = 0.0 - z;
} else {
tmp = 0.0 - 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 <= 2.2d+93) then
tmp = 0.0d0 - z
else
tmp = 0.0d0 - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.2e+93) {
tmp = 0.0 - z;
} else {
tmp = 0.0 - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 2.2e+93: tmp = 0.0 - z else: tmp = 0.0 - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 2.2e+93) tmp = Float64(0.0 - z); else tmp = Float64(0.0 - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 2.2e+93) tmp = 0.0 - z; else tmp = 0.0 - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.2e+93], N[(0.0 - z), $MachinePrecision], N[(0.0 - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.2 \cdot 10^{+93}:\\
\;\;\;\;0 - z\\
\mathbf{else}:\\
\;\;\;\;0 - y\\
\end{array}
\end{array}
if y < 2.20000000000000021e93Initial program 99.9%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6442.8%
Simplified42.8%
sub0-negN/A
neg-lowering-neg.f6442.8%
Applied egg-rr42.8%
if 2.20000000000000021e93 < y Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6470.7%
Simplified70.7%
sub0-negN/A
neg-lowering-neg.f6470.7%
Applied egg-rr70.7%
Final simplification54.0%
(FPCore (x y z t) :precision binary64 (- (- 0.0 y) z))
double code(double x, double y, double z, double t) {
return (0.0 - 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 = (0.0d0 - y) - z
end function
public static double code(double x, double y, double z, double t) {
return (0.0 - y) - z;
}
def code(x, y, z, t): return (0.0 - y) - z
function code(x, y, z, t) return Float64(Float64(0.0 - y) - z) end
function tmp = code(x, y, z, t) tmp = (0.0 - y) - z; end
code[x_, y_, z_, t_] := N[(N[(0.0 - y), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
\left(0 - y\right) - z
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--r+N/A
unsub-negN/A
--lowering--.f64N/A
unsub-negN/A
--lowering--.f64N/A
log-lowering-log.f6475.3%
Simplified75.3%
Taylor expanded in z around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6459.7%
Simplified59.7%
Final simplification59.7%
(FPCore (x y z t) :precision binary64 (- 0.0 y))
double code(double x, double y, double z, double t) {
return 0.0 - 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 = 0.0d0 - y
end function
public static double code(double x, double y, double z, double t) {
return 0.0 - y;
}
def code(x, y, z, t): return 0.0 - y
function code(x, y, z, t) return Float64(0.0 - y) end
function tmp = code(x, y, z, t) tmp = 0.0 - y; end
code[x_, y_, z_, t_] := N[(0.0 - y), $MachinePrecision]
\begin{array}{l}
\\
0 - y
\end{array}
Initial program 99.9%
Taylor expanded in y around inf
mul-1-negN/A
neg-sub0N/A
--lowering--.f6432.5%
Simplified32.5%
sub0-negN/A
neg-lowering-neg.f6432.5%
Applied egg-rr32.5%
Final simplification32.5%
herbie shell --seed 2024158
(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)))