
(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 10 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) y) z)))
double code(double x, double y, double z, double t) {
return fma(log(y), x, ((log(t) - y) - z));
}
function code(x, y, z, t) return fma(log(y), x, Float64(Float64(log(t) - y) - z)) end
code[x_, y_, z_, t_] := N[(N[Log[y], $MachinePrecision] * x + N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\log y, x, \left(\log t - y\right) - z\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x)) (t_2 (- t_1 y))) (if (<= t_2 -1e+84) (- y) (if (<= t_2 5e+93) (- (log t) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double t_2 = t_1 - y;
double tmp;
if (t_2 <= -1e+84) {
tmp = -y;
} else if (t_2 <= 5e+93) {
tmp = log(t) - 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) :: t_2
real(8) :: tmp
t_1 = log(y) * x
t_2 = t_1 - y
if (t_2 <= (-1d+84)) then
tmp = -y
else if (t_2 <= 5d+93) then
tmp = log(t) - 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 t_2 = t_1 - y;
double tmp;
if (t_2 <= -1e+84) {
tmp = -y;
} else if (t_2 <= 5e+93) {
tmp = Math.log(t) - z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x t_2 = t_1 - y tmp = 0 if t_2 <= -1e+84: tmp = -y elif t_2 <= 5e+93: tmp = math.log(t) - z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(log(y) * x) t_2 = Float64(t_1 - y) tmp = 0.0 if (t_2 <= -1e+84) tmp = Float64(-y); elseif (t_2 <= 5e+93) tmp = Float64(log(t) - z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = log(y) * x; t_2 = t_1 - y; tmp = 0.0; if (t_2 <= -1e+84) tmp = -y; elseif (t_2 <= 5e+93) tmp = log(t) - 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]}, Block[{t$95$2 = N[(t$95$1 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+84], (-y), If[LessEqual[t$95$2, 5e+93], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+84}:\\
\;\;\;\;-y\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+93}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.00000000000000006e84Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6449.7
Applied rewrites49.7%
if -1.00000000000000006e84 < (-.f64 (*.f64 x (log.f64 y)) y) < 5.0000000000000001e93Initial program 99.9%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6493.0
Applied rewrites93.0%
Taylor expanded in x around 0
Applied rewrites81.5%
if 5.0000000000000001e93 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.6%
lift-+.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
clear-numN/A
flip3-+N/A
Applied rewrites99.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6466.4
Applied rewrites66.4%
Final simplification65.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (- (log t) y) z)))
(if (<= z -1.12e+74)
t_1
(if (<= z 1.65e+23) (- (fma (log y) x (log t)) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (log(t) - y) - z;
double tmp;
if (z <= -1.12e+74) {
tmp = t_1;
} else if (z <= 1.65e+23) {
tmp = fma(log(y), x, log(t)) - y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = Float64(Float64(log(t) - y) - z) tmp = 0.0 if (z <= -1.12e+74) tmp = t_1; elseif (z <= 1.65e+23) tmp = Float64(fma(log(y), x, log(t)) - y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision]}, If[LessEqual[z, -1.12e+74], t$95$1, If[LessEqual[z, 1.65e+23], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\log t - y\right) - z\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+23}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.12000000000000003e74 or 1.65000000000000015e23 < z Initial program 99.9%
Taylor expanded in x around 0
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
lower-log.f6483.3
Applied rewrites83.3%
if -1.12000000000000003e74 < z < 1.65000000000000015e23Initial program 99.8%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6497.2
Applied rewrites97.2%
(FPCore (x y z t) :precision binary64 (if (<= y 6.6e+59) (fma (log y) x (- (log t) z)) (fma (log y) x (- (log t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.6e+59) {
tmp = fma(log(y), x, (log(t) - z));
} else {
tmp = fma(log(y), x, (log(t) - y));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 6.6e+59) tmp = fma(log(y), x, Float64(log(t) - z)); else tmp = fma(log(y), x, Float64(log(t) - y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t - z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\
\end{array}
\end{array}
if y < 6.5999999999999999e59Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower--.f64N/A
lower-log.f6496.2
Applied rewrites96.2%
if 6.5999999999999999e59 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around 0
Applied rewrites82.8%
(FPCore (x y z t) :precision binary64 (if (<= y 6.6e+59) (- (fma (log y) x (log t)) z) (fma (log y) x (- (log t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.6e+59) {
tmp = fma(log(y), x, log(t)) - z;
} else {
tmp = fma(log(y), x, (log(t) - y));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (y <= 6.6e+59) tmp = Float64(fma(log(y), x, log(t)) - z); else tmp = fma(log(y), x, Float64(log(t) - y)); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t\right) - z\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log y, x, \log t - y\right)\\
\end{array}
\end{array}
if y < 6.5999999999999999e59Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6496.2
Applied rewrites96.2%
if 6.5999999999999999e59 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in z around 0
Applied rewrites82.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma (log y) x (log t)))) (if (<= y 6.6e+59) (- t_1 z) (- t_1 y))))
double code(double x, double y, double z, double t) {
double t_1 = fma(log(y), x, log(t));
double tmp;
if (y <= 6.6e+59) {
tmp = t_1 - z;
} else {
tmp = t_1 - y;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(log(y), x, log(t)) tmp = 0.0 if (y <= 6.6e+59) tmp = Float64(t_1 - z); else tmp = Float64(t_1 - y); end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 6.6e+59], N[(t$95$1 - z), $MachinePrecision], N[(t$95$1 - y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, x, \log t\right)\\
\mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
\;\;\;\;t\_1 - z\\
\mathbf{else}:\\
\;\;\;\;t\_1 - y\\
\end{array}
\end{array}
if y < 6.5999999999999999e59Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6496.2
Applied rewrites96.2%
if 6.5999999999999999e59 < y Initial program 99.9%
Taylor expanded in z around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6482.8
Applied rewrites82.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (log y) x))) (if (<= x -6.2e+115) t_1 (if (<= x 4.4e+96) (- (- (log t) y) z) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = log(y) * x;
double tmp;
if (x <= -6.2e+115) {
tmp = t_1;
} else if (x <= 4.4e+96) {
tmp = (log(t) - 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 <= (-6.2d+115)) then
tmp = t_1
else if (x <= 4.4d+96) then
tmp = (log(t) - 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 <= -6.2e+115) {
tmp = t_1;
} else if (x <= 4.4e+96) {
tmp = (Math.log(t) - y) - z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = math.log(y) * x tmp = 0 if x <= -6.2e+115: tmp = t_1 elif x <= 4.4e+96: tmp = (math.log(t) - 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 <= -6.2e+115) tmp = t_1; elseif (x <= 4.4e+96) tmp = Float64(Float64(log(t) - 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 <= -6.2e+115) tmp = t_1; elseif (x <= 4.4e+96) tmp = (log(t) - 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, -6.2e+115], t$95$1, If[LessEqual[x, 4.4e+96], N[(N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision] - z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log y \cdot x\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+96}:\\
\;\;\;\;\left(\log t - y\right) - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -6.2000000000000001e115 or 4.3999999999999998e96 < x Initial program 99.7%
lift-+.f64N/A
flip3-+N/A
clear-numN/A
lower-/.f64N/A
clear-numN/A
flip3-+N/A
Applied rewrites99.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6468.2
Applied rewrites68.2%
if -6.2000000000000001e115 < x < 4.3999999999999998e96Initial program 99.9%
Taylor expanded in x around 0
associate--r+N/A
lower--.f64N/A
lower--.f64N/A
lower-log.f6491.8
Applied rewrites91.8%
(FPCore (x y z t) :precision binary64 (if (<= y 6.6e+59) (- (log t) z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6.6e+59) {
tmp = log(t) - 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 <= 6.6d+59) then
tmp = log(t) - 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 <= 6.6e+59) {
tmp = Math.log(t) - z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 6.6e+59: tmp = math.log(t) - z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 6.6e+59) tmp = Float64(log(t) - z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 6.6e+59) tmp = log(t) - z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 6.6e+59], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.6 \cdot 10^{+59}:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 6.5999999999999999e59Initial program 99.8%
Taylor expanded in y around 0
lower--.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-log.f6496.2
Applied rewrites96.2%
Taylor expanded in x around 0
Applied rewrites63.6%
if 6.5999999999999999e59 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6460.3
Applied rewrites60.3%
(FPCore (x y z t) :precision binary64 (if (<= y 6e+59) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 6e+59) {
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 <= 6d+59) 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 <= 6e+59) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 6e+59: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 6e+59) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 6e+59) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 6e+59], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6 \cdot 10^{+59}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 6.0000000000000001e59Initial program 99.8%
Taylor expanded in z around inf
mul-1-negN/A
lower-neg.f6443.0
Applied rewrites43.0%
if 6.0000000000000001e59 < y Initial program 99.9%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6460.3
Applied rewrites60.3%
(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%
Taylor expanded in x around 0
+-commutativeN/A
associate--l+N/A
remove-double-negN/A
mul-1-negN/A
*-commutativeN/A
distribute-rgt-neg-inN/A
metadata-evalN/A
cancel-sign-subN/A
mul-1-negN/A
*-inversesN/A
associate-/l*N/A
associate-*l/N/A
associate-*r/N/A
sub-negN/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in y around inf
mul-1-negN/A
lower-neg.f6427.0
Applied rewrites27.0%
herbie shell --seed 2024296
(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)))