
(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 23 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 (* x (log y)))
(t_2 (+ (+ (+ (+ (+ t_1 z) t) a) (* (- b 0.5) (log c))) (* y i)))
(t_3 (+ t_1 (* y i))))
(if (<= t_2 -5e+292)
t_3
(if (<= t_2 200.0)
(fma (log c) (+ b -0.5) z)
(if (<= t_2 INFINITY) (+ t (+ a (* b (log c)))) t_3)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double t_3 = t_1 + (y * i);
double tmp;
if (t_2 <= -5e+292) {
tmp = t_3;
} else if (t_2 <= 200.0) {
tmp = fma(log(c), (b + -0.5), z);
} else if (t_2 <= ((double) INFINITY)) {
tmp = t + (a + (b * log(c)));
} else {
tmp = t_3;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(Float64(Float64(Float64(Float64(t_1 + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) t_3 = Float64(t_1 + Float64(y * i)) tmp = 0.0 if (t_2 <= -5e+292) tmp = t_3; elseif (t_2 <= 200.0) tmp = fma(log(c), Float64(b + -0.5), z); elseif (t_2 <= Inf) tmp = Float64(t + Float64(a + Float64(b * log(c)))); else tmp = t_3; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(t$95$1 + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+292], t$95$3, If[LessEqual[t$95$2, 200.0], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[(t + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \left(\left(\left(\left(t\_1 + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
t_3 := t\_1 + y \cdot i\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+292}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_2 \leq 200:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\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.9999999999999996e292 or +inf.0 < (+.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 inf
*-lowering-*.f64N/A
log-lowering-log.f6485.6
Simplified85.6%
if -4.9999999999999996e292 < (+.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)) < 200Initial program 99.9%
Taylor expanded in z around inf
Simplified50.6%
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-+.f6442.1
Simplified42.1%
if 200 < (+.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)) < +inf.0Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6490.7
Simplified90.7%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.1
Simplified84.1%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6449.0
Simplified49.0%
Final simplification50.0%
(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 -4e+303)
(fma (* a (* y i)) (/ 1.0 a) a)
(if (<= t_1 200.0)
(fma (log c) (+ b -0.5) z)
(if (<= t_1 INFINITY) (+ t (+ a (* b (log c)))) (* 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 <= -4e+303) {
tmp = fma((a * (y * i)), (1.0 / a), a);
} else if (t_1 <= 200.0) {
tmp = fma(log(c), (b + -0.5), z);
} else if (t_1 <= ((double) INFINITY)) {
tmp = t + (a + (b * log(c)));
} 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 <= -4e+303) tmp = fma(Float64(a * Float64(y * i)), Float64(1.0 / a), a); elseif (t_1 <= 200.0) tmp = fma(log(c), Float64(b + -0.5), z); elseif (t_1 <= Inf) tmp = Float64(t + Float64(a + Float64(b * log(c)))); 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, -4e+303], N[(N[(a * N[(y * i), $MachinePrecision]), $MachinePrecision] * N[(1.0 / a), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$1, 200.0], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(t + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 -4 \cdot 10^{+303}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(y \cdot i\right), \frac{1}{a}, a\right)\\
\mathbf{elif}\;t\_1 \leq 200:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t + \left(a + b \cdot \log c\right)\\
\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)) < -4e303Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified99.9%
Taylor expanded in i around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6494.5
Simplified94.5%
associate-*r/N/A
div-invN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6495.1
Applied egg-rr95.1%
if -4e303 < (+.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)) < 200Initial program 99.9%
Taylor expanded in z around inf
Simplified48.5%
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.9
Simplified39.9%
if 200 < (+.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)) < +inf.0Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6490.7
Simplified90.7%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.1
Simplified84.1%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6449.0
Simplified49.0%
if +inf.0 < (+.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 y around inf
*-lowering-*.f6420.2
Simplified20.2%
Final simplification48.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 -4e+303)
(fma (* a (* y i)) (/ 1.0 a) a)
(if (<= t_1 200.0)
(fma (log c) (+ b -0.5) z)
(if (<= t_1 1e+271) (fma x (log y) a) (+ a (fma y i t)))))))
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 <= -4e+303) {
tmp = fma((a * (y * i)), (1.0 / a), a);
} else if (t_1 <= 200.0) {
tmp = fma(log(c), (b + -0.5), z);
} else if (t_1 <= 1e+271) {
tmp = fma(x, log(y), a);
} else {
tmp = a + fma(y, i, t);
}
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 <= -4e+303) tmp = fma(Float64(a * Float64(y * i)), Float64(1.0 / a), a); elseif (t_1 <= 200.0) tmp = fma(log(c), Float64(b + -0.5), z); elseif (t_1 <= 1e+271) tmp = fma(x, log(y), a); else tmp = Float64(a + fma(y, i, t)); 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, -4e+303], N[(N[(a * N[(y * i), $MachinePrecision]), $MachinePrecision] * N[(1.0 / a), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$1, 200.0], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision], If[LessEqual[t$95$1, 1e+271], N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision], N[(a + N[(y * i + t), $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 -4 \cdot 10^{+303}:\\
\;\;\;\;\mathsf{fma}\left(a \cdot \left(y \cdot i\right), \frac{1}{a}, a\right)\\
\mathbf{elif}\;t\_1 \leq 200:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+271}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, a\right)\\
\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(y, i, t\right)\\
\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)) < -4e303Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified99.9%
Taylor expanded in i around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6494.5
Simplified94.5%
associate-*r/N/A
div-invN/A
accelerator-lowering-fma.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
/-lowering-/.f6495.1
Applied egg-rr95.1%
if -4e303 < (+.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)) < 200Initial program 99.9%
Taylor expanded in z around inf
Simplified48.5%
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.9
Simplified39.9%
if 200 < (+.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.99999999999999953e270Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified71.5%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6428.2
Simplified28.2%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6435.5
Simplified35.5%
if 9.99999999999999953e270 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified72.0%
Taylor expanded in t around inf
Simplified57.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6457.4
Simplified57.4%
Final simplification45.1%
(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 -4e+303)
(* y i)
(if (<= t_1 -20.0) (+ z t) (if (<= t_1 INFINITY) (+ 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 <= -4e+303) {
tmp = y * i;
} else if (t_1 <= -20.0) {
tmp = z + t;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t + a;
} else {
tmp = y * i;
}
return tmp;
}
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 <= -4e+303) {
tmp = y * i;
} else if (t_1 <= -20.0) {
tmp = z + t;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t + 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 <= -4e+303: tmp = y * i elif t_1 <= -20.0: tmp = z + t elif t_1 <= math.inf: 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 <= -4e+303) tmp = Float64(y * i); elseif (t_1 <= -20.0) tmp = Float64(z + t); elseif (t_1 <= Inf) tmp = Float64(t + 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 <= -4e+303) tmp = y * i; elseif (t_1 <= -20.0) tmp = z + t; elseif (t_1 <= Inf) tmp = t + 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, -4e+303], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, -20.0], N[(z + t), $MachinePrecision], If[LessEqual[t$95$1, Infinity], 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 -4 \cdot 10^{+303}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq -20:\\
\;\;\;\;z + t\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;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)) < -4e303 or +inf.0 < (+.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 y around inf
*-lowering-*.f6494.7
Simplified94.7%
if -4e303 < (+.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)) < -20Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6486.6
Simplified86.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/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
Simplified37.6%
if -20 < (+.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)) < +inf.0Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.3
Simplified84.3%
Taylor expanded in a around inf
Simplified32.7%
Final simplification39.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c)))
(t_2 (* x (log y)))
(t_3 (+ (+ (+ (+ (+ t_2 z) t) a) t_1) (* y i))))
(if (<= t_3 -5e+292)
(+ t_2 (* y i))
(if (<= t_3 200.0)
(+ t (+ a (fma (log c) (+ b -0.5) z)))
(+ (* y i) (+ a t_1))))))
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 t_2 = x * log(y);
double t_3 = ((((t_2 + z) + t) + a) + t_1) + (y * i);
double tmp;
if (t_3 <= -5e+292) {
tmp = t_2 + (y * i);
} else if (t_3 <= 200.0) {
tmp = t + (a + fma(log(c), (b + -0.5), z));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) t_2 = Float64(x * log(y)) t_3 = Float64(Float64(Float64(Float64(Float64(t_2 + z) + t) + a) + t_1) + Float64(y * i)) tmp = 0.0 if (t_3 <= -5e+292) tmp = Float64(t_2 + Float64(y * i)); elseif (t_3 <= 200.0) tmp = Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z))); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); 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]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(N[(t$95$2 + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+292], N[(t$95$2 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 200.0], N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
t_2 := x \cdot \log y\\
t_3 := \left(\left(\left(\left(t\_2 + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+292}:\\
\;\;\;\;t\_2 + y \cdot i\\
\mathbf{elif}\;t\_3 \leq 200:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\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.9999999999999996e292Initial program 99.9%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6485.6
Simplified85.6%
if -4.9999999999999996e292 < (+.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)) < 200Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6488.2
Simplified88.2%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6486.9
Simplified86.9%
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-+.f6478.3
Simplified78.3%
if 200 < (+.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
Simplified45.1%
Final simplification63.0%
(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 -4e+33)
(+ t (fma y i z))
(if (<= t_1 1e+271) (fma x (log y) a) (+ a (fma y i t))))))
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 <= -4e+33) {
tmp = t + fma(y, i, z);
} else if (t_1 <= 1e+271) {
tmp = fma(x, log(y), a);
} else {
tmp = a + fma(y, i, t);
}
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 <= -4e+33) tmp = Float64(t + fma(y, i, z)); elseif (t_1 <= 1e+271) tmp = fma(x, log(y), a); else tmp = Float64(a + fma(y, i, t)); 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, -4e+33], N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+271], N[(x * N[Log[y], $MachinePrecision] + a), $MachinePrecision], N[(a + N[(y * i + t), $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 -4 \cdot 10^{+33}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+271}:\\
\;\;\;\;\mathsf{fma}\left(x, \log y, a\right)\\
\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(y, i, t\right)\\
\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)) < -3.9999999999999998e33Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified76.4%
Taylor expanded in t around inf
Simplified60.5%
Taylor expanded in a around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6456.0
Simplified56.0%
if -3.9999999999999998e33 < (+.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.99999999999999953e270Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified74.3%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
log-lowering-log.f6426.9
Simplified26.9%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6433.5
Simplified33.5%
if 9.99999999999999953e270 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified72.0%
Taylor expanded in t around inf
Simplified57.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6457.4
Simplified57.4%
(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 -4e+303) (* y i) (if (<= t_1 -20.0) (+ z t) (fma i y a)))))
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 <= -4e+303) {
tmp = y * i;
} else if (t_1 <= -20.0) {
tmp = z + t;
} else {
tmp = fma(i, y, a);
}
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 <= -4e+303) tmp = Float64(y * i); elseif (t_1 <= -20.0) tmp = Float64(z + t); else tmp = fma(i, y, a); 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, -4e+303], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, -20.0], N[(z + t), $MachinePrecision], N[(i * y + a), $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 -4 \cdot 10^{+303}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq -20:\\
\;\;\;\;z + t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, a\right)\\
\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)) < -4e303Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f6494.7
Simplified94.7%
if -4e303 < (+.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)) < -20Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6486.6
Simplified86.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/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
Simplified37.6%
if -20 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified71.9%
Taylor expanded in i around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6428.8
Simplified28.8%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f6430.1
Simplified30.1%
Final simplification38.0%
(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 -4e+303) (* y i) (if (<= t_1 INFINITY) (+ a (+ z t)) (* 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 <= -4e+303) {
tmp = y * i;
} else if (t_1 <= ((double) INFINITY)) {
tmp = a + (z + t);
} else {
tmp = y * i;
}
return tmp;
}
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 <= -4e+303) {
tmp = y * i;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = a + (z + t);
} 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 <= -4e+303: tmp = y * i elif t_1 <= math.inf: tmp = a + (z + t) 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 <= -4e+303) tmp = Float64(y * i); elseif (t_1 <= Inf) tmp = Float64(a + Float64(z + t)); 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 <= -4e+303) tmp = y * i; elseif (t_1 <= Inf) tmp = a + (z + t); 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, -4e+303], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[(a + N[(z + t), $MachinePrecision]), $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 -4 \cdot 10^{+303}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;a + \left(z + t\right)\\
\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)) < -4e303 or +inf.0 < (+.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 y around inf
*-lowering-*.f6494.7
Simplified94.7%
if -4e303 < (+.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)) < +inf.0Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified73.1%
Taylor expanded in t around inf
Simplified51.7%
Taylor expanded in i around 0
+-lowering-+.f64N/A
+-lowering-+.f6453.3
Simplified53.3%
Final simplification56.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= (+ (+ (+ (+ (+ (* x (log y)) z) t) a) t_1) (* y i)) 200.0)
(+ (* y i) (+ z t_1))
(+ (* y i) (+ a t_1)))))
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 (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 200.0) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
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 = (b - 0.5d0) * log(c)
if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 200.0d0) then
tmp = (y * i) + (z + t_1)
else
tmp = (y * i) + (a + t_1)
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 = (b - 0.5) * Math.log(c);
double tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 200.0) {
tmp = (y * i) + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b - 0.5) * math.log(c) tmp = 0 if ((((((x * math.log(y)) + z) + t) + a) + t_1) + (y * i)) <= 200.0: tmp = (y * i) + (z + t_1) else: tmp = (y * i) + (a + t_1) 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 (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + t_1) + Float64(y * i)) <= 200.0) tmp = Float64(Float64(y * i) + Float64(z + t_1)); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (b - 0.5) * log(c); tmp = 0.0; if (((((((x * log(y)) + z) + t) + a) + t_1) + (y * i)) <= 200.0) tmp = (y * i) + (z + t_1); else tmp = (y * i) + (a + t_1); end tmp_2 = 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[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + t$95$1), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], 200.0], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i \leq 200:\\
\;\;\;\;y \cdot i + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\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)) < 200Initial program 99.9%
Taylor expanded in z around inf
Simplified54.8%
if 200 < (+.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
Simplified45.1%
Final simplification50.1%
(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))
-20.0)
(+ t (fma y i z))
(+ a (fma y i t))))
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)) <= -20.0) {
tmp = t + fma(y, i, z);
} else {
tmp = a + fma(y, i, t);
}
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)) <= -20.0) tmp = Float64(t + fma(y, i, z)); else tmp = Float64(a + fma(y, i, t)); 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], -20.0], N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i + t), $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 -20:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(y, i, t\right)\\
\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)) < -20Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified77.9%
Taylor expanded in t around inf
Simplified57.0%
Taylor expanded in a around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6452.9
Simplified52.9%
if -20 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified71.9%
Taylor expanded in t around inf
Simplified52.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6448.5
Simplified48.5%
(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))
-20.0)
(+ z (* y i))
(+ a (fma y i t))))
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)) <= -20.0) {
tmp = z + (y * i);
} else {
tmp = a + fma(y, i, t);
}
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)) <= -20.0) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + fma(y, i, t)); 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], -20.0], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i + t), $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 -20:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + \mathsf{fma}\left(y, i, t\right)\\
\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)) < -20Initial program 99.9%
Taylor expanded in z around inf
Simplified36.6%
if -20 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified71.9%
Taylor expanded in t around inf
Simplified52.4%
Taylor expanded in z around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6448.5
Simplified48.5%
(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))
-20.0)
(+ z (* y i))
(fma i y 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)) <= -20.0) {
tmp = z + (y * i);
} else {
tmp = fma(i, y, 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)) <= -20.0) tmp = Float64(z + Float64(y * i)); else tmp = fma(i, y, a); 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], -20.0], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(i * y + 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 -20:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, a\right)\\
\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)) < -20Initial program 99.9%
Taylor expanded in z around inf
Simplified36.6%
if -20 < (+.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
associate-*r*N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified71.9%
Taylor expanded in i around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6428.8
Simplified28.8%
Taylor expanded in a around 0
+-commutativeN/A
accelerator-lowering-fma.f6430.1
Simplified30.1%
(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))
-20.0)
(+ z t)
(+ 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)) <= -20.0) {
tmp = z + t;
} 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)) <= (-20.0d0)) then
tmp = z + t
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)) <= -20.0) {
tmp = z + t;
} 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)) <= -20.0: tmp = z + t 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)) <= -20.0) tmp = Float64(z + t); 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)) <= -20.0) tmp = z + t; 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], -20.0], N[(z + t), $MachinePrecision], 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 -20:\\
\;\;\;\;z + t\\
\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)) < -20Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6486.9
Simplified86.9%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6485.8
Simplified85.8%
Taylor expanded in z around inf
Simplified32.7%
if -20 < (+.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 z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.3
Simplified84.3%
Taylor expanded in a around inf
Simplified32.7%
Final simplification32.7%
(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))
-20.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)) <= -20.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)) <= (-20.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)) <= -20.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)) <= -20.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)) <= -20.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)) <= -20.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], -20.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 -20:\\
\;\;\;\;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)) < -20Initial program 99.9%
Taylor expanded in z around inf
Simplified16.5%
if -20 < (+.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 z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6490.8
Simplified90.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6484.3
Simplified84.3%
Taylor expanded in a around inf
Simplified32.7%
(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))
-20.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)) <= -20.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)) <= (-20.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)) <= -20.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)) <= -20.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)) <= -20.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)) <= -20.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], -20.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 -20:\\
\;\;\;\;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)) < -20Initial program 99.9%
Taylor expanded in z around inf
Simplified16.5%
if -20 < (+.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
Simplified14.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (log c) (+ b -0.5) z)))
(if (<= y 8.4e+37)
(+ a (+ t_1 (fma x (log y) t)))
(+ t (+ a (fma y i t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(log(c), (b + -0.5), z);
double tmp;
if (y <= 8.4e+37) {
tmp = a + (t_1 + fma(x, log(y), t));
} else {
tmp = t + (a + fma(y, i, t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(c), Float64(b + -0.5), z) tmp = 0.0 if (y <= 8.4e+37) tmp = Float64(a + Float64(t_1 + fma(x, log(y), t))); else tmp = Float64(t + Float64(a + fma(y, i, t_1))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[y, 8.4e+37], N[(a + N[(t$95$1 + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(a + N[(y * i + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b + -0.5, z\right)\\
\mathbf{if}\;y \leq 8.4 \cdot 10^{+37}:\\
\;\;\;\;a + \left(t\_1 + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(y, i, t\_1\right)\right)\\
\end{array}
\end{array}
if y < 8.4000000000000004e37Initial program 99.9%
Taylor expanded in y around 0
+-lowering-+.f64N/A
associate-+r+N/A
cancel-sign-subN/A
log-recN/A
unsub-negN/A
mul-1-negN/A
+-commutativeN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
Simplified99.2%
if 8.4000000000000004e37 < y Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6488.1
Simplified88.1%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6489.4
Simplified89.4%
Final simplification95.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -5.2e+198)
(+ (* x (log y)) (* y i))
(if (<= x 8.5e+227)
(+ t (+ a (fma y i (fma (log c) (+ b -0.5) z))))
(* x (+ (log y) (/ z x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -5.2e+198) {
tmp = (x * log(y)) + (y * i);
} else if (x <= 8.5e+227) {
tmp = t + (a + fma(y, i, fma(log(c), (b + -0.5), z)));
} else {
tmp = x * (log(y) + (z / x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -5.2e+198) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (x <= 8.5e+227) tmp = Float64(t + Float64(a + fma(y, i, fma(log(c), Float64(b + -0.5), z)))); else tmp = Float64(x * Float64(log(y) + Float64(z / x))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -5.2e+198], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8.5e+227], N[(t + N[(a + N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+198}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+227}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < -5.19999999999999961e198Initial program 99.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6492.1
Simplified92.1%
if -5.19999999999999961e198 < x < 8.4999999999999995e227Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6493.5
Simplified93.5%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6493.3
Simplified93.3%
if 8.4999999999999995e227 < x Initial program 99.7%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
Simplified99.9%
Taylor expanded in z around inf
/-lowering-/.f6469.3
Simplified69.3%
Final simplification92.1%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -3.6e+205)
(+ (* x (log y)) (* y i))
(if (<= x 3.8e+228)
(+ a (+ (fma i y z) (fma (log c) (+ b -0.5) t)))
(* x (+ (log y) (/ z x))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -3.6e+205) {
tmp = (x * log(y)) + (y * i);
} else if (x <= 3.8e+228) {
tmp = a + (fma(i, y, z) + fma(log(c), (b + -0.5), t));
} else {
tmp = x * (log(y) + (z / x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -3.6e+205) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (x <= 3.8e+228) tmp = Float64(a + Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), t))); else tmp = Float64(x * Float64(log(y) + Float64(z / x))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -3.6e+205], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.8e+228], N[(a + N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+205}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+228}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\end{array}
\end{array}
if x < -3.60000000000000002e205Initial program 99.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6492.1
Simplified92.1%
if -3.60000000000000002e205 < x < 3.8000000000000002e228Initial 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-+.f6493.3
Simplified93.3%
if 3.8000000000000002e228 < x Initial program 99.7%
Taylor expanded in x around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
log-lowering-log.f64N/A
/-lowering-/.f64N/A
Simplified99.9%
Taylor expanded in z around inf
/-lowering-/.f6469.3
Simplified69.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* i (+ y (/ (+ a (+ z t)) i)))))
(if (<= i -9.6e+62)
t_1
(if (<= i 2e+46) (+ t (+ a (fma (log c) (+ b -0.5) z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = i * (y + ((a + (z + t)) / i));
double tmp;
if (i <= -9.6e+62) {
tmp = t_1;
} else if (i <= 2e+46) {
tmp = t + (a + fma(log(c), (b + -0.5), z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(i * Float64(y + Float64(Float64(a + Float64(z + t)) / i))) tmp = 0.0 if (i <= -9.6e+62) tmp = t_1; elseif (i <= 2e+46) tmp = Float64(t + Float64(a + fma(log(c), Float64(b + -0.5), z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(i * N[(y + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -9.6e+62], t$95$1, If[LessEqual[i, 2e+46], N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := i \cdot \left(y + \frac{a + \left(z + t\right)}{i}\right)\\
\mathbf{if}\;i \leq -9.6 \cdot 10^{+62}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 2 \cdot 10^{+46}:\\
\;\;\;\;t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -9.6e62 or 2e46 < i Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified82.6%
Taylor expanded in t around inf
Simplified69.0%
Taylor expanded in i around -inf
associate-*r*N/A
*-lowering-*.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f6479.5
Simplified79.5%
if -9.6e62 < i < 2e46Initial program 99.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
log-lowering-log.f6488.6
Simplified88.6%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
*-commutativeN/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
+-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6483.5
Simplified83.5%
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-+.f6481.1
Simplified81.1%
Final simplification80.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.12e-159) (+ t (fma y i z)) (if (<= a 7.8e-115) (* x (log y)) (fma a (/ (+ t (fma i y z)) a) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.12e-159) {
tmp = t + fma(y, i, z);
} else if (a <= 7.8e-115) {
tmp = x * log(y);
} else {
tmp = fma(a, ((t + fma(i, y, z)) / a), a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.12e-159) tmp = Float64(t + fma(y, i, z)); elseif (a <= 7.8e-115) tmp = Float64(x * log(y)); else tmp = fma(a, Float64(Float64(t + fma(i, y, z)) / a), a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.12e-159], N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e-115], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.12 \cdot 10^{-159}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, z\right)\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-115}:\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t + \mathsf{fma}\left(i, y, z\right)}{a}, a\right)\\
\end{array}
\end{array}
if a < 1.12000000000000006e-159Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified68.3%
Taylor expanded in t around inf
Simplified47.4%
Taylor expanded in a around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6451.1
Simplified51.1%
if 1.12000000000000006e-159 < a < 7.7999999999999997e-115Initial program 99.6%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6444.0
Simplified44.0%
if 7.7999999999999997e-115 < a Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified90.3%
Taylor expanded in t around inf
Simplified70.7%
Final simplification57.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 32.0) (+ t (fma y i z)) (fma a (/ (+ t (fma i y z)) a) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 32.0) {
tmp = t + fma(y, i, z);
} else {
tmp = fma(a, ((t + fma(i, y, z)) / a), a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 32.0) tmp = Float64(t + fma(y, i, z)); else tmp = fma(a, Float64(Float64(t + fma(i, y, z)) / a), a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 32.0], N[(t + N[(y * i + z), $MachinePrecision]), $MachinePrecision], N[(a * N[(N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 32:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, z\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{t + \mathsf{fma}\left(i, y, z\right)}{a}, a\right)\\
\end{array}
\end{array}
if a < 32Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified67.9%
Taylor expanded in t around inf
Simplified47.9%
Taylor expanded in a around 0
+-lowering-+.f64N/A
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f6454.2
Simplified54.2%
if 32 < a Initial program 99.9%
Taylor expanded in a 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-*r*N/A
metadata-evalN/A
*-lft-identityN/A
associate-*r*N/A
metadata-evalN/A
*-lft-identityN/A
Simplified99.8%
Taylor expanded in t around inf
Simplified78.5%
Final simplification59.6%
(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
Simplified15.7%
herbie shell --seed 2024195
(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)))