
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (fma x (log y) z) (+ t a)))
(t_2
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_2 -7e+307)
(* y i)
(if (<= t_2 -1e+109)
t_1
(if (<= t_2 5e+44)
(fma (log c) -0.5 (fma i y z))
(if (<= t_2 1e+262) t_1 (+ a (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(x, log(y), z) + (t + a);
double t_2 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -7e+307) {
tmp = y * i;
} else if (t_2 <= -1e+109) {
tmp = t_1;
} else if (t_2 <= 5e+44) {
tmp = fma(log(c), -0.5, fma(i, y, z));
} else if (t_2 <= 1e+262) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(fma(x, log(y), z) + Float64(t + a)) t_2 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_2 <= -7e+307) tmp = Float64(y * i); elseif (t_2 <= -1e+109) tmp = t_1; elseif (t_2 <= 5e+44) tmp = fma(log(c), -0.5, fma(i, y, z)); elseif (t_2 <= 1e+262) tmp = t_1; else tmp = Float64(a + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -7e+307], N[(y * i), $MachinePrecision], If[LessEqual[t$95$2, -1e+109], t$95$1, If[LessEqual[t$95$2, 5e+44], N[(N[Log[c], $MachinePrecision] * -0.5 + N[(i * y + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+262], t$95$1, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\\
t_2 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -7 \cdot 10^{+307}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{+109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(\log c, -0.5, \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+262}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -7.00000000000000028e307Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64100.0
Simplified100.0%
if -7.00000000000000028e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -9.99999999999999982e108 or 4.9999999999999996e44 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 1e262Initial program 99.9%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified71.5%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.7%
Taylor expanded in z around inf
Simplified89.9%
Taylor expanded in y around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6483.1
Simplified83.1%
if -9.99999999999999982e108 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 4.9999999999999996e44Initial program 99.9%
Taylor expanded in z around inf
Simplified75.8%
Taylor expanded in b around 0
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f6464.4
Simplified64.4%
if 1e262 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 100.0%
Taylor expanded in a around inf
Simplified59.6%
Final simplification77.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 -7e+307)
(* y i)
(if (<= t_1 1e+262) (+ (fma x (log y) z) (+ t a)) (+ a (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -7e+307) {
tmp = y * i;
} else if (t_1 <= 1e+262) {
tmp = fma(x, log(y), z) + (t + a);
} else {
tmp = a + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= -7e+307) tmp = Float64(y * i); elseif (t_1 <= 1e+262) tmp = Float64(fma(x, log(y), z) + Float64(t + a)); else tmp = Float64(a + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -7e+307], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, 1e+262], N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -7 \cdot 10^{+307}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq 10^{+262}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -7.00000000000000028e307Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64100.0
Simplified100.0%
if -7.00000000000000028e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 1e262Initial program 99.9%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified72.2%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.7%
Taylor expanded in z around inf
Simplified86.9%
Taylor expanded in y around 0
+-commutativeN/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
+-lowering-+.f6478.1
Simplified78.1%
if 1e262 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 100.0%
Taylor expanded in a around inf
Simplified59.6%
Final simplification75.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 -1e+233)
(fma y i z)
(if (<= t_1 50.0) (fma (log c) (+ b -0.5) z) (+ a (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -1e+233) {
tmp = fma(y, i, z);
} else if (t_1 <= 50.0) {
tmp = fma(log(c), (b + -0.5), z);
} else {
tmp = a + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= -1e+233) tmp = fma(y, i, z); elseif (t_1 <= 50.0) tmp = fma(log(c), Float64(b + -0.5), z); else tmp = Float64(a + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+233], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 50.0], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+233}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_1 \leq 50:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -9.99999999999999974e232Initial program 99.9%
Taylor expanded in z around inf
Simplified41.4%
+-commutativeN/A
accelerator-lowering-fma.f6441.4
Applied egg-rr41.4%
if -9.99999999999999974e232 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 50Initial program 99.9%
Taylor expanded in z around inf
Simplified49.7%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6439.8
Simplified39.8%
if 50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.9%
Taylor expanded in a around inf
Simplified49.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 5e+44) (fma y i z) (if (<= t_1 5e+307) (+ t a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= 5e+44) {
tmp = fma(y, i, z);
} else if (t_1 <= 5e+307) {
tmp = t + a;
} else {
tmp = y * i;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= 5e+44) tmp = fma(y, i, z); elseif (t_1 <= 5e+307) tmp = Float64(t + a); else tmp = Float64(y * i); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+44], N[(y * i + z), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(t + a), $MachinePrecision], N[(y * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+44}:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;t + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 4.9999999999999996e44Initial program 99.9%
Taylor expanded in z around inf
Simplified36.5%
+-commutativeN/A
accelerator-lowering-fma.f6436.5
Applied egg-rr36.5%
if 4.9999999999999996e44 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6483.9
Simplified83.9%
Taylor expanded in t around inf
Simplified45.1%
if 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6495.1
Simplified95.1%
Final simplification43.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 -7e+307) (* y i) (if (<= t_1 5e+307) (+ z a) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -7e+307) {
tmp = y * i;
} else if (t_1 <= 5e+307) {
tmp = z + a;
} else {
tmp = y * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
if (t_1 <= (-7d+307)) then
tmp = y * i
else if (t_1 <= 5d+307) then
tmp = z + a
else
tmp = y * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_1 <= -7e+307) {
tmp = y * i;
} else if (t_1 <= 5e+307) {
tmp = z + a;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i) tmp = 0 if t_1 <= -7e+307: tmp = y * i elif t_1 <= 5e+307: tmp = z + a else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if (t_1 <= -7e+307) tmp = Float64(y * i); elseif (t_1 <= 5e+307) tmp = Float64(z + a); else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); tmp = 0.0; if (t_1 <= -7e+307) tmp = y * i; elseif (t_1 <= 5e+307) tmp = z + a; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -7e+307], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(z + a), $MachinePrecision], N[(y * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -7 \cdot 10^{+307}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -7.00000000000000028e307 or 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6497.1
Simplified97.1%
if -7.00000000000000028e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6482.6
Simplified82.6%
Taylor expanded in z around inf
Simplified39.8%
Final simplification47.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
50.0)
(fma y i z)
(+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= 50.0) {
tmp = fma(y, i, z);
} else {
tmp = a + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= 50.0) tmp = fma(y, i, z); else tmp = Float64(a + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], 50.0], N[(y * i + z), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq 50:\\
\;\;\;\;\mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 50Initial program 99.9%
Taylor expanded in z around inf
Simplified36.1%
+-commutativeN/A
accelerator-lowering-fma.f6436.1
Applied egg-rr36.1%
if 50 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.9%
Taylor expanded in a around inf
Simplified49.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-10.0)
z
(+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -10.0) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-10.0d0)) then
tmp = z
else
tmp = t + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -10.0) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -10.0: tmp = z else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -10.0) tmp = z; else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -10.0) tmp = z; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -10.0], z, N[(t + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -10:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -10Initial program 99.9%
Taylor expanded in z around inf
Simplified20.8%
if -10 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6486.1
Simplified86.1%
Taylor expanded in t around inf
Simplified36.7%
Final simplification27.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-10.0)
z
a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -10.0) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-10.0d0)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -10.0) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)) <= -10.0: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -10.0) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -10.0) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -10.0], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -10:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -10Initial program 99.9%
Taylor expanded in z around inf
Simplified20.8%
if -10 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.9%
Taylor expanded in a around inf
Simplified22.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= t_1 5e+194)
(+ t (+ z (fma x (log y) (fma y i a))))
(+ (+ z t_1) (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if (t_1 <= 5e+194) {
tmp = t + (z + fma(x, log(y), fma(y, i, a)));
} else {
tmp = (z + t_1) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_1 <= 5e+194) tmp = Float64(t + Float64(z + fma(x, log(y), fma(y, i, a)))); else tmp = Float64(Float64(z + t_1) + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+194], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(y * i + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+194}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(y, i, a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + t\_1\right) + y \cdot i\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 4.99999999999999989e194Initial program 99.9%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified75.7%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.7%
Taylor expanded in z around inf
Simplified92.5%
*-inversesN/A
div-invN/A
remove-double-divN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6492.6
Applied egg-rr92.6%
if 4.99999999999999989e194 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.9%
Taylor expanded in z around inf
Simplified77.5%
Final simplification91.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 5.6e+45) (+ (fma i y z) (fma (log c) (+ b -0.5) (fma x (log y) t))) (+ t (+ z (fma x (log y) (fma y i a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 5.6e+45) {
tmp = fma(i, y, z) + fma(log(c), (b + -0.5), fma(x, log(y), t));
} else {
tmp = t + (z + fma(x, log(y), fma(y, i, a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 5.6e+45) tmp = Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), fma(x, log(y), t))); else tmp = Float64(t + Float64(z + fma(x, log(y), fma(y, i, a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 5.6e+45], N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(y * i + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 5.6 \cdot 10^{+45}:\\
\;\;\;\;\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(y, i, a\right)\right)\right)\\
\end{array}
\end{array}
if a < 5.5999999999999999e45Initial program 99.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
associate-+r+N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6488.3
Simplified88.3%
if 5.5999999999999999e45 < a Initial program 99.9%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified75.7%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.7%
Taylor expanded in z around inf
Simplified94.4%
*-inversesN/A
div-invN/A
remove-double-divN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6494.6
Applied egg-rr94.6%
Final simplification89.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ t (+ z (fma x (log y) (fma y i a))))))
(if (<= x -8.6e+80)
t_1
(if (<= x 8.5e+129)
(+ a (+ (fma i y z) (fma (log c) (+ b -0.5) t)))
t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = t + (z + fma(x, log(y), fma(y, i, a)));
double tmp;
if (x <= -8.6e+80) {
tmp = t_1;
} else if (x <= 8.5e+129) {
tmp = a + (fma(i, y, z) + fma(log(c), (b + -0.5), t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(t + Float64(z + fma(x, log(y), fma(y, i, a)))) tmp = 0.0 if (x <= -8.6e+80) tmp = t_1; elseif (x <= 8.5e+129) tmp = Float64(a + Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(y * i + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.6e+80], t$95$1, If[LessEqual[x, 8.5e+129], N[(a + N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(z + \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(y, i, a\right)\right)\right)\\
\mathbf{if}\;x \leq -8.6 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+129}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -8.60000000000000008e80 or 8.5000000000000001e129 < x Initial program 99.8%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified70.4%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.6%
Taylor expanded in z around inf
Simplified94.1%
*-inversesN/A
div-invN/A
remove-double-divN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6494.2
Applied egg-rr94.2%
if -8.60000000000000008e80 < x < 8.5000000000000001e129Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6499.1
Simplified99.1%
Final simplification97.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (- b 0.5) -1e+223) (fma (log c) (+ b -0.5) z) (+ t (+ z (fma x (log y) (fma y i a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= -1e+223) {
tmp = fma(log(c), (b + -0.5), z);
} else {
tmp = t + (z + fma(x, log(y), fma(y, i, a)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(b - 0.5) <= -1e+223) tmp = fma(log(c), Float64(b + -0.5), z); else tmp = Float64(t + Float64(z + fma(x, log(y), fma(y, i, a)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+223], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision], N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(y * i + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+223}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(z + \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(y, i, a\right)\right)\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -1.00000000000000005e223Initial program 100.0%
Taylor expanded in z around inf
Simplified91.7%
Taylor expanded in y around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6475.9
Simplified75.9%
if -1.00000000000000005e223 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.9%
Taylor expanded in t around -inf
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*l*N/A
metadata-evalN/A
*-rgt-identityN/A
associate-*r*N/A
metadata-evalN/A
Simplified75.5%
clear-numN/A
associate-*r/N/A
div-invN/A
times-fracN/A
Applied egg-rr99.7%
Taylor expanded in z around inf
Simplified91.8%
*-inversesN/A
div-invN/A
remove-double-divN/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
*-commutativeN/A
accelerator-lowering-fma.f6492.0
Applied egg-rr92.0%
Final simplification91.2%
(FPCore (x y z t a b c i) :precision binary64 (+ z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z + a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = z + a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z + a;
}
def code(x, y, z, t, a, b, c, i): return z + a
function code(x, y, z, t, a, b, c, i) return Float64(z + a) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z + a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(z + a), $MachinePrecision]
\begin{array}{l}
\\
z + a
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-lowering-+.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.5
Simplified84.5%
Taylor expanded in z around inf
Simplified35.2%
Final simplification35.2%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.9%
Taylor expanded in a around inf
Simplified19.6%
herbie shell --seed 2024205
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))