
(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 15 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 x (log y) (- (log t) z)) y))
double code(double x, double y, double z, double t) {
return fma(x, log(y), (log(t) - z)) - y;
}
function code(x, y, z, t) return Float64(fma(x, log(y), Float64(log(t) - z)) - y) end
code[x_, y_, z_, t_] := N[(N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(x, \log y, \log t - z\right) - y
\end{array}
Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- t_1 y)))
(if (<= t_2 -2e+105)
t_2
(if (<= t_2 -20000000000000.0)
(- (* x (/ z (- x))) y)
(if (<= t_2 10.0) (- (log t) z) (- t_1 z))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+105) {
tmp = t_2;
} else if (t_2 <= -20000000000000.0) {
tmp = (x * (z / -x)) - y;
} else if (t_2 <= 10.0) {
tmp = log(t) - z;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (t_2 <= (-2d+105)) then
tmp = t_2
else if (t_2 <= (-20000000000000.0d0)) then
tmp = (x * (z / -x)) - y
else if (t_2 <= 10.0d0) then
tmp = log(t) - z
else
tmp = t_1 - z
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 = t_1 - y;
double tmp;
if (t_2 <= -2e+105) {
tmp = t_2;
} else if (t_2 <= -20000000000000.0) {
tmp = (x * (z / -x)) - y;
} else if (t_2 <= 10.0) {
tmp = Math.log(t) - z;
} else {
tmp = t_1 - z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if t_2 <= -2e+105: tmp = t_2 elif t_2 <= -20000000000000.0: tmp = (x * (z / -x)) - y elif t_2 <= 10.0: tmp = math.log(t) - z else: tmp = t_1 - z return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if (t_2 <= -2e+105) tmp = t_2; elseif (t_2 <= -20000000000000.0) tmp = Float64(Float64(x * Float64(z / Float64(-x))) - y); elseif (t_2 <= 10.0) tmp = Float64(log(t) - z); else tmp = Float64(t_1 - z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if (t_2 <= -2e+105) tmp = t_2; elseif (t_2 <= -20000000000000.0) tmp = (x * (z / -x)) - y; elseif (t_2 <= 10.0) tmp = log(t) - z; else tmp = t_1 - z; 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[(t$95$1 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+105], t$95$2, If[LessEqual[t$95$2, -20000000000000.0], N[(N[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[t$95$2, 10.0], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], N[(t$95$1 - z), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq -20000000000000:\\
\;\;\;\;x \cdot \frac{z}{-x} - y\\
\mathbf{elif}\;t\_2 \leq 10:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1 - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e105Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 88.5%
if -1.9999999999999999e105 < (-.f64 (*.f64 x (log.f64 y)) y) < -2e13Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
+-commutative100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 94.2%
associate--l+94.2%
div-sub94.2%
Simplified94.2%
Taylor expanded in z around inf 77.2%
neg-mul-177.2%
distribute-neg-frac77.2%
Simplified77.2%
if -2e13 < (-.f64 (*.f64 x (log.f64 y)) y) < 10Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 97.9%
Taylor expanded in y around 0 95.8%
if 10 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in z around inf 95.8%
Final simplification90.3%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* x (log y)) y)))
(if (<= t_1 -2e+105)
t_1
(if (<= t_1 -20000000000000.0)
(- (* x (/ z (- x))) y)
(if (<= t_1 10.0) (- (log t) z) t_1)))))
double code(double x, double y, double z, double t) {
double t_1 = (x * log(y)) - y;
double tmp;
if (t_1 <= -2e+105) {
tmp = t_1;
} else if (t_1 <= -20000000000000.0) {
tmp = (x * (z / -x)) - y;
} else if (t_1 <= 10.0) {
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) :: tmp
t_1 = (x * log(y)) - y
if (t_1 <= (-2d+105)) then
tmp = t_1
else if (t_1 <= (-20000000000000.0d0)) then
tmp = (x * (z / -x)) - y
else if (t_1 <= 10.0d0) 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 = (x * Math.log(y)) - y;
double tmp;
if (t_1 <= -2e+105) {
tmp = t_1;
} else if (t_1 <= -20000000000000.0) {
tmp = (x * (z / -x)) - y;
} else if (t_1 <= 10.0) {
tmp = Math.log(t) - z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (x * math.log(y)) - y tmp = 0 if t_1 <= -2e+105: tmp = t_1 elif t_1 <= -20000000000000.0: tmp = (x * (z / -x)) - y elif t_1 <= 10.0: tmp = math.log(t) - z else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(x * log(y)) - y) tmp = 0.0 if (t_1 <= -2e+105) tmp = t_1; elseif (t_1 <= -20000000000000.0) tmp = Float64(Float64(x * Float64(z / Float64(-x))) - y); elseif (t_1 <= 10.0) tmp = Float64(log(t) - z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (x * log(y)) - y; tmp = 0.0; if (t_1 <= -2e+105) tmp = t_1; elseif (t_1 <= -20000000000000.0) tmp = (x * (z / -x)) - y; elseif (t_1 <= 10.0) tmp = log(t) - z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+105], t$95$1, If[LessEqual[t$95$1, -20000000000000.0], N[(N[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], If[LessEqual[t$95$1, 10.0], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y - y\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq -20000000000000:\\
\;\;\;\;x \cdot \frac{z}{-x} - y\\
\mathbf{elif}\;t\_1 \leq 10:\\
\;\;\;\;\log t - z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e105 or 10 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 84.0%
if -1.9999999999999999e105 < (-.f64 (*.f64 x (log.f64 y)) y) < -2e13Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
+-commutative100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 94.2%
associate--l+94.2%
div-sub94.2%
Simplified94.2%
Taylor expanded in z around inf 77.2%
neg-mul-177.2%
distribute-neg-frac77.2%
Simplified77.2%
if -2e13 < (-.f64 (*.f64 x (log.f64 y)) y) < 10Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 97.9%
Taylor expanded in y around 0 95.8%
Final simplification86.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (log y))) (t_2 (- t_1 y))) (if (<= t_2 -2e+105) t_2 (if (<= t_2 10.0) (- (- (log t) z) y) (- t_1 z)))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = t_1 - y;
double tmp;
if (t_2 <= -2e+105) {
tmp = t_2;
} else if (t_2 <= 10.0) {
tmp = (log(t) - z) - y;
} else {
tmp = t_1 - 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 - y
if (t_2 <= (-2d+105)) then
tmp = t_2
else if (t_2 <= 10.0d0) then
tmp = (log(t) - z) - y
else
tmp = t_1 - z
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 = t_1 - y;
double tmp;
if (t_2 <= -2e+105) {
tmp = t_2;
} else if (t_2 <= 10.0) {
tmp = (Math.log(t) - z) - y;
} else {
tmp = t_1 - z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = t_1 - y tmp = 0 if t_2 <= -2e+105: tmp = t_2 elif t_2 <= 10.0: tmp = (math.log(t) - z) - y else: tmp = t_1 - z return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 - y) tmp = 0.0 if (t_2 <= -2e+105) tmp = t_2; elseif (t_2 <= 10.0) tmp = Float64(Float64(log(t) - z) - y); else tmp = Float64(t_1 - z); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * log(y); t_2 = t_1 - y; tmp = 0.0; if (t_2 <= -2e+105) tmp = t_2; elseif (t_2 <= 10.0) tmp = (log(t) - z) - y; else tmp = t_1 - z; 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[(t$95$1 - y), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+105], t$95$2, If[LessEqual[t$95$2, 10.0], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision], N[(t$95$1 - z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t\_1 - y\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+105}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 10:\\
\;\;\;\;\left(\log t - z\right) - y\\
\mathbf{else}:\\
\;\;\;\;t\_1 - z\\
\end{array}
\end{array}
if (-.f64 (*.f64 x (log.f64 y)) y) < -1.9999999999999999e105Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
Taylor expanded in y around inf 88.5%
if -1.9999999999999999e105 < (-.f64 (*.f64 x (log.f64 y)) y) < 10Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 92.6%
if 10 < (-.f64 (*.f64 x (log.f64 y)) y) Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in z around inf 95.8%
(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(x * log(y)) - Float64(y + Float64(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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] - N[(y + N[(z - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \log y - \left(y + \left(z - \log t\right)\right)
\end{array}
Initial program 99.8%
associate-+l-99.8%
associate--l-99.8%
Simplified99.8%
(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 (- (* x (/ z (- x))) y)))
(if (<= x -2.15e+136)
t_1
(if (<= x -7e-115)
t_2
(if (<= x 1.46e-248)
(- (log t) y)
(if (<= x 2e-45) (- (log t) z) (if (<= x 1.62e+109) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = (x * (z / -x)) - y;
double tmp;
if (x <= -2.15e+136) {
tmp = t_1;
} else if (x <= -7e-115) {
tmp = t_2;
} else if (x <= 1.46e-248) {
tmp = log(t) - y;
} else if (x <= 2e-45) {
tmp = log(t) - z;
} else if (x <= 1.62e+109) {
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 = (x * (z / -x)) - y
if (x <= (-2.15d+136)) then
tmp = t_1
else if (x <= (-7d-115)) then
tmp = t_2
else if (x <= 1.46d-248) then
tmp = log(t) - y
else if (x <= 2d-45) then
tmp = log(t) - z
else if (x <= 1.62d+109) 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 = (x * (z / -x)) - y;
double tmp;
if (x <= -2.15e+136) {
tmp = t_1;
} else if (x <= -7e-115) {
tmp = t_2;
} else if (x <= 1.46e-248) {
tmp = Math.log(t) - y;
} else if (x <= 2e-45) {
tmp = Math.log(t) - z;
} else if (x <= 1.62e+109) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = (x * (z / -x)) - y tmp = 0 if x <= -2.15e+136: tmp = t_1 elif x <= -7e-115: tmp = t_2 elif x <= 1.46e-248: tmp = math.log(t) - y elif x <= 2e-45: tmp = math.log(t) - z elif x <= 1.62e+109: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(x * Float64(z / Float64(-x))) - y) tmp = 0.0 if (x <= -2.15e+136) tmp = t_1; elseif (x <= -7e-115) tmp = t_2; elseif (x <= 1.46e-248) tmp = Float64(log(t) - y); elseif (x <= 2e-45) tmp = Float64(log(t) - z); elseif (x <= 1.62e+109) 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 = (x * (z / -x)) - y; tmp = 0.0; if (x <= -2.15e+136) tmp = t_1; elseif (x <= -7e-115) tmp = t_2; elseif (x <= 1.46e-248) tmp = log(t) - y; elseif (x <= 2e-45) tmp = log(t) - z; elseif (x <= 1.62e+109) 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[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[x, -2.15e+136], t$95$1, If[LessEqual[x, -7e-115], t$95$2, If[LessEqual[x, 1.46e-248], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 2e-45], N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision], If[LessEqual[x, 1.62e+109], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := x \cdot \frac{z}{-x} - y\\
\mathbf{if}\;x \leq -2.15 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 1.46 \cdot 10^{-248}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-45}:\\
\;\;\;\;\log t - z\\
\mathbf{elif}\;x \leq 1.62 \cdot 10^{+109}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.1499999999999999e136 or 1.62e109 < x Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in y around inf 89.9%
Taylor expanded in x around inf 80.3%
if -2.1499999999999999e136 < x < -7.0000000000000004e-115 or 1.99999999999999997e-45 < x < 1.62e109Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate--l+99.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in z around inf 71.7%
neg-mul-171.7%
distribute-neg-frac71.7%
Simplified71.7%
if -7.0000000000000004e-115 < x < 1.4599999999999999e-248Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
+-commutative100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around 0 75.5%
if 1.4599999999999999e-248 < x < 1.99999999999999997e-45Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
+-commutative100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 80.6%
Final simplification76.1%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (- (* x (/ z (- x))) y)))
(if (<= x -4e+135)
t_1
(if (<= x -3.6e-115)
t_2
(if (<= x 2.45e-185)
(- (log t) y)
(if (<= x 1.85e-45) (- z) (if (<= x 2.1e+108) t_2 t_1)))))))
double code(double x, double y, double z, double t) {
double t_1 = x * log(y);
double t_2 = (x * (z / -x)) - y;
double tmp;
if (x <= -4e+135) {
tmp = t_1;
} else if (x <= -3.6e-115) {
tmp = t_2;
} else if (x <= 2.45e-185) {
tmp = log(t) - y;
} else if (x <= 1.85e-45) {
tmp = -z;
} else if (x <= 2.1e+108) {
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 = (x * (z / -x)) - y
if (x <= (-4d+135)) then
tmp = t_1
else if (x <= (-3.6d-115)) then
tmp = t_2
else if (x <= 2.45d-185) then
tmp = log(t) - y
else if (x <= 1.85d-45) then
tmp = -z
else if (x <= 2.1d+108) 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 = (x * (z / -x)) - y;
double tmp;
if (x <= -4e+135) {
tmp = t_1;
} else if (x <= -3.6e-115) {
tmp = t_2;
} else if (x <= 2.45e-185) {
tmp = Math.log(t) - y;
} else if (x <= 1.85e-45) {
tmp = -z;
} else if (x <= 2.1e+108) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * math.log(y) t_2 = (x * (z / -x)) - y tmp = 0 if x <= -4e+135: tmp = t_1 elif x <= -3.6e-115: tmp = t_2 elif x <= 2.45e-185: tmp = math.log(t) - y elif x <= 1.85e-45: tmp = -z elif x <= 2.1e+108: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(x * Float64(z / Float64(-x))) - y) tmp = 0.0 if (x <= -4e+135) tmp = t_1; elseif (x <= -3.6e-115) tmp = t_2; elseif (x <= 2.45e-185) tmp = Float64(log(t) - y); elseif (x <= 1.85e-45) tmp = Float64(-z); elseif (x <= 2.1e+108) 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 = (x * (z / -x)) - y; tmp = 0.0; if (x <= -4e+135) tmp = t_1; elseif (x <= -3.6e-115) tmp = t_2; elseif (x <= 2.45e-185) tmp = log(t) - y; elseif (x <= 1.85e-45) tmp = -z; elseif (x <= 2.1e+108) 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[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]}, If[LessEqual[x, -4e+135], t$95$1, If[LessEqual[x, -3.6e-115], t$95$2, If[LessEqual[x, 2.45e-185], N[(N[Log[t], $MachinePrecision] - y), $MachinePrecision], If[LessEqual[x, 1.85e-45], (-z), If[LessEqual[x, 2.1e+108], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := x \cdot \frac{z}{-x} - y\\
\mathbf{if}\;x \leq -4 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-115}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.45 \cdot 10^{-185}:\\
\;\;\;\;\log t - y\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-45}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+108}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -3.99999999999999985e135 or 2.1000000000000001e108 < x Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in y around inf 89.9%
Taylor expanded in x around inf 80.3%
if -3.99999999999999985e135 < x < -3.60000000000000009e-115 or 1.85e-45 < x < 2.1000000000000001e108Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 99.8%
associate--l+99.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in z around inf 71.7%
neg-mul-171.7%
distribute-neg-frac71.7%
Simplified71.7%
if -3.60000000000000009e-115 < x < 2.4500000000000001e-185Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
Taylor expanded in z around 0 73.2%
if 2.4500000000000001e-185 < x < 1.85e-45Initial program 100.0%
associate-+l-100.0%
sub-neg100.0%
+-commutative100.0%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in z around inf 62.6%
neg-mul-162.6%
Simplified62.6%
Final simplification73.7%
(FPCore (x y z t) :precision binary64 (if (or (<= x -10500.0) (not (<= x 15500.0))) (- (* x (* z (+ (/ (log y) z) (/ -1.0 x)))) y) (- (- (log t) z) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -10500.0) || !(x <= 15500.0)) {
tmp = (x * (z * ((log(y) / z) + (-1.0 / x)))) - 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 <= (-10500.0d0)) .or. (.not. (x <= 15500.0d0))) then
tmp = (x * (z * ((log(y) / z) + ((-1.0d0) / x)))) - 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 <= -10500.0) || !(x <= 15500.0)) {
tmp = (x * (z * ((Math.log(y) / z) + (-1.0 / x)))) - y;
} else {
tmp = (Math.log(t) - z) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -10500.0) or not (x <= 15500.0): tmp = (x * (z * ((math.log(y) / z) + (-1.0 / x)))) - y else: tmp = (math.log(t) - z) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -10500.0) || !(x <= 15500.0)) tmp = Float64(Float64(x * Float64(z * Float64(Float64(log(y) / z) + Float64(-1.0 / x)))) - 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 <= -10500.0) || ~((x <= 15500.0))) tmp = (x * (z * ((log(y) / z) + (-1.0 / x)))) - y; else tmp = (log(t) - z) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -10500.0], N[Not[LessEqual[x, 15500.0]], $MachinePrecision]], N[(N[(x * N[(z * N[(N[(N[Log[y], $MachinePrecision] / z), $MachinePrecision] + N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision], N[(N[(N[Log[t], $MachinePrecision] - z), $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -10500 \lor \neg \left(x \leq 15500\right):\\
\;\;\;\;x \cdot \left(z \cdot \left(\frac{\log y}{z} + \frac{-1}{x}\right)\right) - y\\
\mathbf{else}:\\
\;\;\;\;\left(\log t - z\right) - y\\
\end{array}
\end{array}
if x < -10500 or 15500 < x Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
+-commutative99.7%
associate--l+99.7%
sub-neg99.7%
+-commutative99.7%
unsub-neg99.7%
fma-undefine99.7%
neg-sub099.7%
associate-+l-99.7%
neg-sub099.7%
+-commutative99.7%
unsub-neg99.7%
Simplified99.7%
Taylor expanded in x around inf 99.7%
associate--l+99.7%
div-sub99.7%
Simplified99.7%
Taylor expanded in z around -inf 99.6%
mul-1-neg99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
+-commutative99.6%
mul-1-neg99.6%
unsub-neg99.6%
Simplified99.6%
Taylor expanded in x around inf 98.9%
if -10500 < x < 15500Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+100.0%
sub-neg100.0%
+-commutative100.0%
unsub-neg100.0%
fma-undefine100.0%
neg-sub0100.0%
associate-+l-100.0%
neg-sub0100.0%
+-commutative100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 98.9%
Final simplification98.9%
(FPCore (x y z t) :precision binary64 (if (or (<= x -4.1e+135) (not (<= x 1.7e+109))) (* x (log y)) (- (* x (/ z (- x))) y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.1e+135) || !(x <= 1.7e+109)) {
tmp = x * log(y);
} else {
tmp = (x * (z / -x)) - 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 <= (-4.1d+135)) .or. (.not. (x <= 1.7d+109))) then
tmp = x * log(y)
else
tmp = (x * (z / -x)) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -4.1e+135) || !(x <= 1.7e+109)) {
tmp = x * Math.log(y);
} else {
tmp = (x * (z / -x)) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -4.1e+135) or not (x <= 1.7e+109): tmp = x * math.log(y) else: tmp = (x * (z / -x)) - y return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -4.1e+135) || !(x <= 1.7e+109)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(x * Float64(z / Float64(-x))) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -4.1e+135) || ~((x <= 1.7e+109))) tmp = x * log(y); else tmp = (x * (z / -x)) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -4.1e+135], N[Not[LessEqual[x, 1.7e+109]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.1 \cdot 10^{+135} \lor \neg \left(x \leq 1.7 \cdot 10^{+109}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{-x} - y\\
\end{array}
\end{array}
if x < -4.1e135 or 1.70000000000000003e109 < x Initial program 99.6%
associate-+l-99.6%
associate--l-99.6%
Simplified99.6%
Taylor expanded in y around inf 89.9%
Taylor expanded in x around inf 80.3%
if -4.1e135 < x < 1.70000000000000003e109Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 85.9%
associate--l+85.9%
div-sub85.9%
Simplified85.9%
Taylor expanded in z around inf 58.9%
neg-mul-158.9%
distribute-neg-frac58.9%
Simplified58.9%
Final simplification65.2%
(FPCore (x y z t) :precision binary64 (if (<= y 295000000.0) (- z) (- (* x (/ z (- x))) y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 295000000.0) {
tmp = -z;
} else {
tmp = (x * (z / -x)) - 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 <= 295000000.0d0) then
tmp = -z
else
tmp = (x * (z / -x)) - y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 295000000.0) {
tmp = -z;
} else {
tmp = (x * (z / -x)) - y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 295000000.0: tmp = -z else: tmp = (x * (z / -x)) - y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 295000000.0) tmp = Float64(-z); else tmp = Float64(Float64(x * Float64(z / Float64(-x))) - y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 295000000.0) tmp = -z; else tmp = (x * (z / -x)) - y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 295000000.0], (-z), N[(N[(x * N[(z / (-x)), $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 295000000:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z}{-x} - y\\
\end{array}
\end{array}
if y < 2.95e8Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
+-commutative99.7%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 37.6%
neg-mul-137.6%
Simplified37.6%
if 2.95e8 < y Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in x around inf 89.2%
associate--l+89.2%
div-sub89.2%
Simplified89.2%
Taylor expanded in z around inf 66.8%
neg-mul-166.8%
distribute-neg-frac66.8%
Simplified66.8%
Final simplification51.7%
(FPCore (x y z t) :precision binary64 (if (<= y 2650000000.0) (- z) (- y)))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2650000000.0) {
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 <= 2650000000.0d0) 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 <= 2650000000.0) {
tmp = -z;
} else {
tmp = -y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 2650000000.0: tmp = -z else: tmp = -y return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 2650000000.0) tmp = Float64(-z); else tmp = Float64(-y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 2650000000.0) tmp = -z; else tmp = -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 2650000000.0], (-z), (-y)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2650000000:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;-y\\
\end{array}
\end{array}
if y < 2.65e9Initial program 99.7%
associate-+l-99.7%
sub-neg99.7%
+-commutative99.7%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 37.6%
neg-mul-137.6%
Simplified37.6%
if 2.65e9 < y Initial program 99.9%
associate-+l-99.9%
sub-neg99.9%
+-commutative99.9%
associate--l+99.9%
sub-neg99.9%
+-commutative99.9%
unsub-neg99.9%
fma-undefine99.9%
neg-sub099.9%
associate-+l-99.9%
neg-sub099.9%
+-commutative99.9%
unsub-neg99.9%
Simplified99.9%
Taylor expanded in y around inf 61.3%
neg-mul-161.3%
Simplified61.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%
associate-+l-99.8%
sub-neg99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around inf 31.3%
neg-mul-131.3%
Simplified31.3%
(FPCore (x y z t) :precision binary64 z)
double code(double x, double y, double z, double t) {
return 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 = z
end function
public static double code(double x, double y, double z, double t) {
return z;
}
def code(x, y, z, t): return z
function code(x, y, z, t) return z end
function tmp = code(x, y, z, t) tmp = z; end
code[x_, y_, z_, t_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 99.8%
associate-+l-99.8%
sub-neg99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 27.5%
neg-mul-127.5%
Simplified27.5%
neg-sub027.5%
sub-neg27.5%
add-sqr-sqrt10.1%
sqrt-unprod4.6%
sqr-neg4.6%
sqrt-unprod0.9%
add-sqr-sqrt2.3%
Applied egg-rr2.3%
+-lft-identity2.3%
Simplified2.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 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.8%
sub-neg99.8%
+-commutative99.8%
associate--l+99.8%
sub-neg99.8%
+-commutative99.8%
unsub-neg99.8%
fma-undefine99.8%
neg-sub099.8%
associate-+l-99.8%
neg-sub099.8%
+-commutative99.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in y around inf 31.3%
neg-mul-131.3%
Simplified31.3%
neg-sub031.3%
sub-neg31.3%
add-sqr-sqrt0.0%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod2.1%
add-sqr-sqrt2.1%
Applied egg-rr2.1%
+-lft-identity2.1%
Simplified2.1%
herbie shell --seed 2024163
(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)))