
(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 20 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 (* (- b 0.5) (log c)))
(t_2 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) t_1) (* y i))))
(if (<= t_2 -2e+306)
(+ z (* y i))
(if (<= t_2 1e+39)
(+ a (+ z (fma (log c) (+ b -0.5) t)))
(+ (* 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)) + z) + t) + a) + t_1) + (y * i);
double tmp;
if (t_2 <= -2e+306) {
tmp = z + (y * i);
} else if (t_2 <= 1e+39) {
tmp = a + (z + fma(log(c), (b + -0.5), t));
} 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(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + t_1) + Float64(y * i)) tmp = 0.0 if (t_2 <= -2e+306) tmp = Float64(z + Float64(y * i)); elseif (t_2 <= 1e+39) tmp = Float64(a + Float64(z + fma(log(c), Float64(b + -0.5), t))); 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[(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]}, If[LessEqual[t$95$2, -2e+306], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+39], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $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 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + t\_1\right) + y \cdot i\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+306}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;t\_2 \leq 10^{+39}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(\log c, b + -0.5, t\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)) < -2.00000000000000003e306Initial program 100.0%
Taylor expanded in z around inf
Simplified80.1%
if -2.00000000000000003e306 < (+.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.9999999999999994e38Initial 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.0
Simplified84.0%
Taylor expanded in i around 0
Simplified76.3%
if 9.9999999999999994e38 < (+.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
Simplified51.7%
Final simplification65.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ t (fma i y z)))) (t_2 (* (- b 0.5) (log c))))
(if (<= t_2 -5e+220)
(+ (* y i) (* b (log c)))
(if (<= t_2 -100.0)
t_1
(if (<= t_2 192.0)
(+ a (+ z (fma x (log y) t)))
(if (<= t_2 1e+162) t_1 (fma (log c) b a)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (t + fma(i, y, z));
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -5e+220) {
tmp = (y * i) + (b * log(c));
} else if (t_2 <= -100.0) {
tmp = t_1;
} else if (t_2 <= 192.0) {
tmp = a + (z + fma(x, log(y), t));
} else if (t_2 <= 1e+162) {
tmp = t_1;
} else {
tmp = fma(log(c), b, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(t + fma(i, y, z))) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -5e+220) tmp = Float64(Float64(y * i) + Float64(b * log(c))); elseif (t_2 <= -100.0) tmp = t_1; elseif (t_2 <= 192.0) tmp = Float64(a + Float64(z + fma(x, log(y), t))); elseif (t_2 <= 1e+162) tmp = t_1; else tmp = fma(log(c), b, a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+220], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -100.0], t$95$1, If[LessEqual[t$95$2, 192.0], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+162], t$95$1, N[(N[Log[c], $MachinePrecision] * b + a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+220}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{elif}\;t\_2 \leq -100:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 192:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b, a\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.0000000000000002e220Initial program 99.5%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6482.2
Simplified82.2%
if -5.0000000000000002e220 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -100 or 192 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161Initial 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-+.f6486.8
Simplified86.8%
Taylor expanded in t around inf
Simplified77.5%
if -100 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 192Initial 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
Simplified89.5%
Taylor expanded in z around inf
Simplified82.9%
if 9.9999999999999994e161 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.7%
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.7%
Taylor expanded in x around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified59.7%
Taylor expanded in b around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
neg-lowering-neg.f6444.3
Simplified44.3%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6475.9
Simplified75.9%
Final simplification78.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (log c) b a))
(t_2 (+ a (+ t (fma i y z))))
(t_3 (* (- b 0.5) (log c))))
(if (<= t_3 -2e+197)
t_1
(if (<= t_3 -100.0)
t_2
(if (<= t_3 192.0)
(+ a (+ z (fma x (log y) t)))
(if (<= t_3 1e+162) t_2 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, a);
double t_2 = a + (t + fma(i, y, z));
double t_3 = (b - 0.5) * log(c);
double tmp;
if (t_3 <= -2e+197) {
tmp = t_1;
} else if (t_3 <= -100.0) {
tmp = t_2;
} else if (t_3 <= 192.0) {
tmp = a + (z + fma(x, log(y), t));
} else if (t_3 <= 1e+162) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(c), b, a) t_2 = Float64(a + Float64(t + fma(i, y, z))) t_3 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_3 <= -2e+197) tmp = t_1; elseif (t_3 <= -100.0) tmp = t_2; elseif (t_3 <= 192.0) tmp = Float64(a + Float64(z + fma(x, log(y), t))); elseif (t_3 <= 1e+162) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b + a), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -2e+197], t$95$1, If[LessEqual[t$95$3, -100.0], t$95$2, If[LessEqual[t$95$3, 192.0], N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+162], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b, a\right)\\
t_2 := a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
t_3 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_3 \leq -2 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_3 \leq -100:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_3 \leq 192:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{elif}\;t\_3 \leq 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -1.9999999999999999e197 or 9.9999999999999994e161 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.6%
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
Simplified90.3%
Taylor expanded in x around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified55.7%
Taylor expanded in b around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
neg-lowering-neg.f6443.8
Simplified43.8%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6472.1
Simplified72.1%
if -1.9999999999999999e197 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -100 or 192 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161Initial 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-+.f6486.5
Simplified86.5%
Taylor expanded in t around inf
Simplified78.0%
if -100 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 192Initial 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
Simplified89.5%
Taylor expanded in z around inf
Simplified82.9%
Final simplification78.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 (- INFINITY))
(* y i)
(if (<= t_1 -5e+25) (+ z 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 <= -((double) INFINITY)) {
tmp = y * i;
} else if (t_1 <= -5e+25) {
tmp = z + a;
} else {
tmp = a + (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 <= -Double.POSITIVE_INFINITY) {
tmp = y * i;
} else if (t_1 <= -5e+25) {
tmp = z + a;
} else {
tmp = a + (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 <= -math.inf: tmp = y * i elif t_1 <= -5e+25: tmp = z + 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 <= Float64(-Inf)) tmp = Float64(y * i); elseif (t_1 <= -5e+25) tmp = Float64(z + a); else tmp = Float64(a + 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 <= -Inf) tmp = y * i; elseif (t_1 <= -5e+25) tmp = z + a; else tmp = a + (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, (-Infinity)], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, -5e+25], N[(z + a), $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 -\infty:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;z + a\\
\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)) < -inf.0Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f64100.0
Simplified100.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)) < -5.00000000000000024e25Initial 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.4
Simplified83.4%
Taylor expanded in z around inf
Simplified34.3%
if -5.00000000000000024e25 < (+.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
Simplified29.4%
Final simplification34.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 (- INFINITY)) (* y i) (if (<= t_1 5e+304) (+ 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 <= -((double) INFINITY)) {
tmp = y * i;
} else if (t_1 <= 5e+304) {
tmp = z + 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 <= -Double.POSITIVE_INFINITY) {
tmp = y * i;
} else if (t_1 <= 5e+304) {
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 <= -math.inf: tmp = y * i elif t_1 <= 5e+304: 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 <= Float64(-Inf)) tmp = Float64(y * i); elseif (t_1 <= 5e+304) 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 <= -Inf) tmp = y * i; elseif (t_1 <= 5e+304) 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, (-Infinity)], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, 5e+304], 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 -\infty:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;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)) < -inf.0 or 4.9999999999999997e304 < (+.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-*.f6496.0
Simplified96.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)) < 4.9999999999999997e304Initial 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.0
Simplified83.0%
Taylor expanded in z around inf
Simplified32.3%
Final simplification38.5%
(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)) -5e+25)
(+ (* 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)) <= -5e+25) {
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)) <= (-5d+25)) 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)) <= -5e+25) {
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)) <= -5e+25: 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)) <= -5e+25) 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)) <= -5e+25) 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], -5e+25], 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 -5 \cdot 10^{+25}:\\
\;\;\;\;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)) < -5.00000000000000024e25Initial program 99.9%
Taylor expanded in z around inf
Simplified47.7%
if -5.00000000000000024e25 < (+.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
Simplified53.6%
Final simplification50.6%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (fma (log c) b a)) (t_2 (* (- b 0.5) (log c)))) (if (<= t_2 -2e+197) t_1 (if (<= t_2 1e+162) (+ a (+ t (fma i y z))) 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, a);
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -2e+197) {
tmp = t_1;
} else if (t_2 <= 1e+162) {
tmp = a + (t + fma(i, y, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(c), b, a) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -2e+197) tmp = t_1; elseif (t_2 <= 1e+162) tmp = Float64(a + Float64(t + fma(i, y, z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * b + a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+197], t$95$1, If[LessEqual[t$95$2, 1e+162], N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b, a\right)\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+162}:\\
\;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -1.9999999999999999e197 or 9.9999999999999994e161 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.6%
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
Simplified90.3%
Taylor expanded in x around -inf
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
Simplified55.7%
Taylor expanded in b around inf
mul-1-negN/A
distribute-neg-frac2N/A
mul-1-negN/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f64N/A
mul-1-negN/A
neg-lowering-neg.f6443.8
Simplified43.8%
Taylor expanded in a around 0
+-commutativeN/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
log-lowering-log.f6472.1
Simplified72.1%
if -1.9999999999999999e197 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161Initial 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.0
Simplified83.0%
Taylor expanded in t around inf
Simplified75.0%
Final simplification74.5%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* b (log c))) (t_2 (* (- b 0.5) (log c)))) (if (<= t_2 -5e+220) t_1 (if (<= t_2 1e+162) (+ a (+ t (fma i y z))) t_1))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = (b - 0.5) * log(c);
double tmp;
if (t_2 <= -5e+220) {
tmp = t_1;
} else if (t_2 <= 1e+162) {
tmp = a + (t + fma(i, y, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (t_2 <= -5e+220) tmp = t_1; elseif (t_2 <= 1e+162) tmp = Float64(a + Float64(t + fma(i, y, z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+220], t$95$1, If[LessEqual[t$95$2, 1e+162], N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq 10^{+162}:\\
\;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -5.0000000000000002e220 or 9.9999999999999994e161 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.6%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6468.5
Simplified68.5%
if -5.0000000000000002e220 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 9.9999999999999994e161Initial 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.2
Simplified83.2%
Taylor expanded in t around inf
Simplified74.7%
Final simplification73.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))
-50.0)
(+ z (* y i))
(+ 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 = z + (y * i);
} else {
tmp = a + (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) :: tmp
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)) <= (-50.0d0)) then
tmp = z + (y * i)
else
tmp = a + (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 tmp;
if (((((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i)) <= -50.0) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
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)) <= -50.0: tmp = z + (y * i) 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 = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); 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)) <= -50.0) tmp = z + (y * i); else tmp = a + (y * i); 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], -50.0], N[(z + N[(y * i), $MachinePrecision]), $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:\\
\;\;\;\;z + y \cdot i\\
\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
Simplified32.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
Simplified30.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)
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)) <= -50.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)) <= (-50.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)) <= -50.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)) <= -50.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)) <= -50.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)) <= -50.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], -50.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 -50:\\
\;\;\;\;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)) < -50Initial program 99.9%
Taylor expanded in z around inf
Simplified16.2%
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 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.2
Simplified84.2%
Taylor expanded in t around inf
Simplified26.4%
Final simplification21.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))
-50.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)) <= -50.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)) <= (-50.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)) <= -50.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)) <= -50.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)) <= -50.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)) <= -50.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], -50.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 -50:\\
\;\;\;\;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)) < -50Initial program 99.9%
Taylor expanded in z around inf
Simplified16.2%
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
Simplified11.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ (fma (log c) (+ b -0.5) z) (fma x (log y) t)))))
(if (<= x -2.1e+111)
t_1
(if (<= x 7e+87) (+ 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 = a + (fma(log(c), (b + -0.5), z) + fma(x, log(y), t));
double tmp;
if (x <= -2.1e+111) {
tmp = t_1;
} else if (x <= 7e+87) {
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(a + Float64(fma(log(c), Float64(b + -0.5), z) + fma(x, log(y), t))) tmp = 0.0 if (x <= -2.1e+111) tmp = t_1; elseif (x <= 7e+87) 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[(a + N[(N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e+111], t$95$1, If[LessEqual[x, 7e+87], 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 := a + \left(\mathsf{fma}\left(\log c, b + -0.5, z\right) + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 7 \cdot 10^{+87}:\\
\;\;\;\;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 < -2.09999999999999995e111 or 6.99999999999999972e87 < x Initial program 99.8%
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
Simplified88.1%
if -2.09999999999999995e111 < x < 6.99999999999999972e87Initial 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-+.f6498.9
Simplified98.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma x (log y) t)))
(if (<= x -3.3e+200)
(+ a (+ t_1 (* b (log c))))
(if (<= x 1.3e+160)
(+ a (+ (fma i y z) (fma (log c) (+ b -0.5) t)))
(+ a (+ z t_1))))))
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), t);
double tmp;
if (x <= -3.3e+200) {
tmp = a + (t_1 + (b * log(c)));
} else if (x <= 1.3e+160) {
tmp = a + (fma(i, y, z) + fma(log(c), (b + -0.5), t));
} else {
tmp = a + (z + t_1);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(x, log(y), t) tmp = 0.0 if (x <= -3.3e+200) tmp = Float64(a + Float64(t_1 + Float64(b * log(c)))); elseif (x <= 1.3e+160) tmp = Float64(a + Float64(fma(i, y, z) + fma(log(c), Float64(b + -0.5), t))); else tmp = Float64(a + Float64(z + t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]}, If[LessEqual[x, -3.3e+200], N[(a + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.3e+160], N[(a + N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, t\right)\\
\mathbf{if}\;x \leq -3.3 \cdot 10^{+200}:\\
\;\;\;\;a + \left(t\_1 + b \cdot \log c\right)\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{+160}:\\
\;\;\;\;a + \left(\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + t\_1\right)\\
\end{array}
\end{array}
if x < -3.3e200Initial program 99.8%
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
Simplified91.6%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f64N/A
log-lowering-log.f6484.3
Simplified84.3%
if -3.3e200 < x < 1.3e160Initial 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-+.f6496.8
Simplified96.8%
if 1.3e160 < x Initial program 99.8%
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
Simplified89.5%
Taylor expanded in z around inf
Simplified86.0%
Final simplification94.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (fma x (log y) t)))))
(if (<= x -4.7e+198)
t_1
(if (<= x 6.8e+162)
(+ 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 = a + (z + fma(x, log(y), t));
double tmp;
if (x <= -4.7e+198) {
tmp = t_1;
} else if (x <= 6.8e+162) {
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(a + Float64(z + fma(x, log(y), t))) tmp = 0.0 if (x <= -4.7e+198) tmp = t_1; elseif (x <= 6.8e+162) 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[(a + N[(z + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.7e+198], t$95$1, If[LessEqual[x, 6.8e+162], 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 := a + \left(z + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{if}\;x \leq -4.7 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+162}:\\
\;\;\;\;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 < -4.7000000000000002e198 or 6.80000000000000006e162 < x Initial program 99.8%
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
Simplified90.4%
Taylor expanded in z around inf
Simplified80.3%
if -4.7000000000000002e198 < x < 6.80000000000000006e162Initial 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-+.f6496.8
Simplified96.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z (fma x (log y) t)))))
(if (<= x -7.8e+114)
t_1
(if (<= x 1.65e+156) (+ a (+ 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 = a + (z + fma(x, log(y), t));
double tmp;
if (x <= -7.8e+114) {
tmp = t_1;
} else if (x <= 1.65e+156) {
tmp = a + (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(a + Float64(z + fma(x, log(y), t))) tmp = 0.0 if (x <= -7.8e+114) tmp = t_1; elseif (x <= 1.65e+156) tmp = Float64(a + Float64(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[(a + N[(z + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+114], t$95$1, If[LessEqual[x, 1.65e+156], N[(a + N[(z + 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 := a + \left(z + \mathsf{fma}\left(x, \log y, t\right)\right)\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+114}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.65 \cdot 10^{+156}:\\
\;\;\;\;a + \left(z + \mathsf{fma}\left(\log c, b + -0.5, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.8000000000000001e114 or 1.6499999999999999e156 < x Initial program 99.8%
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
Simplified87.3%
Taylor expanded in z around inf
Simplified77.3%
if -7.8000000000000001e114 < x < 1.6499999999999999e156Initial 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-+.f6498.3
Simplified98.3%
Taylor expanded in i around 0
Simplified79.6%
(FPCore (x y z t a b c i) :precision binary64 (let* ((t_1 (* x (log y)))) (if (<= x -4.3e+198) t_1 (if (<= x 5.8e+243) (+ a (+ t (fma i y z))) t_1))))
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 tmp;
if (x <= -4.3e+198) {
tmp = t_1;
} else if (x <= 5.8e+243) {
tmp = a + (t + fma(i, y, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -4.3e+198) tmp = t_1; elseif (x <= 5.8e+243) tmp = Float64(a + Float64(t + fma(i, y, z))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+198], t$95$1, If[LessEqual[x, 5.8e+243], N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+198}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{+243}:\\
\;\;\;\;a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.29999999999999982e198 or 5.80000000000000013e243 < x Initial program 99.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
log-lowering-log.f6467.2
Simplified67.2%
if -4.29999999999999982e198 < x < 5.80000000000000013e243Initial 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-+.f6494.7
Simplified94.7%
Taylor expanded in t around inf
Simplified72.7%
Final simplification71.9%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ t (fma i y z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (t + fma(i, y, z));
}
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(t + fma(i, y, z))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(t + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(t + \mathsf{fma}\left(i, y, z\right)\right)
\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.7
Simplified84.7%
Taylor expanded in t around inf
Simplified64.5%
Final simplification64.5%
(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.7
Simplified84.7%
Taylor expanded in z around inf
Simplified29.4%
Final simplification29.4%
(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
Simplified14.4%
herbie shell --seed 2024204
(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)))