
(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 17 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.8%
(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))))
(if (<= t_2 -2e+66)
(* i (+ y (/ z i)))
(if (<= t_2 1e+306) (+ a (* b (log c))) (+ t_1 (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_2 <= -2e+66) {
tmp = i * (y + (z / i));
} else if (t_2 <= 1e+306) {
tmp = a + (b * log(c));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
if (t_2 <= (-2d+66)) then
tmp = i * (y + (z / i))
else if (t_2 <= 1d+306) then
tmp = a + (b * log(c))
else
tmp = t_1 + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_2 <= -2e+66) {
tmp = i * (y + (z / i));
} else if (t_2 <= 1e+306) {
tmp = a + (b * Math.log(c));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i) tmp = 0 if t_2 <= -2e+66: tmp = i * (y + (z / i)) elif t_2 <= 1e+306: tmp = a + (b * math.log(c)) else: tmp = t_1 + (y * i) 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)) tmp = 0.0 if (t_2 <= -2e+66) tmp = Float64(i * Float64(y + Float64(z / i))); elseif (t_2 <= 1e+306) tmp = Float64(a + Float64(b * log(c))); else tmp = Float64(t_1 + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = ((((t_1 + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); tmp = 0.0; if (t_2 <= -2e+66) tmp = i * (y + (z / i)); elseif (t_2 <= 1e+306) tmp = a + (b * log(c)); else tmp = t_1 + (y * i); end tmp_2 = 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]}, If[LessEqual[t$95$2, -2e+66], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+306], N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]
\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\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+66}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{elif}\;t\_2 \leq 10^{+306}:\\
\;\;\;\;a + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;t\_1 + 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)) < -1.99999999999999989e66Initial program 99.8%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified74.9%
Taylor expanded in z around inf
lower-/.f6433.0
Simplified33.0%
if -1.99999999999999989e66 < (+.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)) < 1.00000000000000002e306Initial program 99.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6478.2
Simplified78.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6428.3
Simplified28.3%
if 1.00000000000000002e306 < (+.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 x around inf
lower-*.f64N/A
lower-log.f6494.5
Simplified94.5%
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 -2e+66)
(* i (+ y (/ z i)))
(if (<= t_1 1e+306) (+ a (* b (log c))) (fma (log c) b (* 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 <= -2e+66) {
tmp = i * (y + (z / i));
} else if (t_1 <= 1e+306) {
tmp = a + (b * log(c));
} else {
tmp = fma(log(c), b, (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 <= -2e+66) tmp = Float64(i * Float64(y + Float64(z / i))); elseif (t_1 <= 1e+306) tmp = Float64(a + Float64(b * log(c))); else tmp = fma(log(c), b, 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, -2e+66], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[c], $MachinePrecision] * b + 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 -2 \cdot 10^{+66}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;a + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b, y \cdot i\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)) < -1.99999999999999989e66Initial program 99.8%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified74.9%
Taylor expanded in z around inf
lower-/.f6433.0
Simplified33.0%
if -1.99999999999999989e66 < (+.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)) < 1.00000000000000002e306Initial program 99.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6478.2
Simplified78.2%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6428.3
Simplified28.3%
if 1.00000000000000002e306 < (+.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 b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6494.4
Simplified94.4%
lift-log.f64N/A
lift-*.f64N/A
lower-fma.f6494.4
Applied egg-rr94.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 -2e+66)
(* i (+ y (/ z i)))
(if (<= t_1 1e+299) (+ a (* b (log c))) (+ 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 <= -2e+66) {
tmp = i * (y + (z / i));
} else if (t_1 <= 1e+299) {
tmp = a + (b * log(c));
} 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) :: t_1
real(8) :: tmp
t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
if (t_1 <= (-2d+66)) then
tmp = i * (y + (z / i))
else if (t_1 <= 1d+299) then
tmp = a + (b * log(c))
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 t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_1 <= -2e+66) {
tmp = i * (y + (z / i));
} else if (t_1 <= 1e+299) {
tmp = a + (b * Math.log(c));
} 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 <= -2e+66: tmp = i * (y + (z / i)) elif t_1 <= 1e+299: tmp = a + (b * math.log(c)) 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 <= -2e+66) tmp = Float64(i * Float64(y + Float64(z / i))); elseif (t_1 <= 1e+299) tmp = Float64(a + Float64(b * log(c))); 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 <= -2e+66) tmp = i * (y + (z / i)); elseif (t_1 <= 1e+299) tmp = a + (b * log(c)); 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, -2e+66], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+299], N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+66}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{elif}\;t\_1 \leq 10^{+299}:\\
\;\;\;\;a + b \cdot \log c\\
\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)) < -1.99999999999999989e66Initial program 99.8%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified74.9%
Taylor expanded in z around inf
lower-/.f6433.0
Simplified33.0%
if -1.99999999999999989e66 < (+.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)) < 1.0000000000000001e299Initial program 99.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6477.6
Simplified77.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6428.1
Simplified28.1%
if 1.0000000000000001e299 < (+.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 x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.2
Simplified95.2%
Taylor expanded in i around inf
lower-*.f6480.8
Simplified80.8%
Final simplification34.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 -5e+305)
(* y i)
(if (<= t_1 -50.0) (* i (/ z i)) (+ a (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if (t_1 <= -5e+305) {
tmp = y * i;
} else if (t_1 <= -50.0) {
tmp = i * (z / 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) :: t_1
real(8) :: tmp
t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
if (t_1 <= (-5d+305)) then
tmp = y * i
else if (t_1 <= (-50.0d0)) then
tmp = i * (z / 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 t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_1 <= -5e+305) {
tmp = y * i;
} else if (t_1 <= -50.0) {
tmp = i * (z / i);
} 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 <= -5e+305: tmp = y * i elif t_1 <= -50.0: tmp = i * (z / i) 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 <= -5e+305) tmp = Float64(y * i); elseif (t_1 <= -50.0) tmp = Float64(i * Float64(z / i)); 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 <= -5e+305) tmp = y * i; elseif (t_1 <= -50.0) tmp = i * (z / i); 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, -5e+305], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, -50.0], N[(i * N[(z / i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+305}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq -50:\\
\;\;\;\;i \cdot \frac{z}{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)) < -5.00000000000000009e305Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6487.2
Simplified87.2%
if -5.00000000000000009e305 < (+.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.7%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified71.8%
Taylor expanded in z around inf
lower-/.f6414.0
Simplified14.0%
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
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6480.0
Simplified80.0%
Taylor expanded in i around inf
lower-*.f6431.6
Simplified31.6%
Final simplification27.6%
(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 -50.0) (* y i) (if (<= t_1 1e+306) 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 <= -50.0) {
tmp = y * i;
} else if (t_1 <= 1e+306) {
tmp = a;
} else {
tmp = y * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
if (t_1 <= (-50.0d0)) then
tmp = y * i
else if (t_1 <= 1d+306) then
tmp = a
else
tmp = y * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_1 <= -50.0) {
tmp = y * i;
} else if (t_1 <= 1e+306) {
tmp = 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 <= -50.0: tmp = y * i elif t_1 <= 1e+306: tmp = 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 <= -50.0) tmp = Float64(y * i); elseif (t_1 <= 1e+306) tmp = 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 <= -50.0) tmp = y * i; elseif (t_1 <= 1e+306) tmp = 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, -50.0], N[(y * i), $MachinePrecision], If[LessEqual[t$95$1, 1e+306], a, 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 -50:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;t\_1 \leq 10^{+306}:\\
\;\;\;\;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)) < -50 or 1.00000000000000002e306 < (+.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.8%
Taylor expanded in y around inf
lower-*.f6429.6
Simplified29.6%
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)) < 1.00000000000000002e306Initial program 99.9%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified62.2%
Taylor expanded in a around inf
lower-/.f648.7
Simplified8.7%
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
inv-powN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval14.9
Applied egg-rr14.9%
*-rgt-identity14.9
Applied egg-rr14.9%
Final simplification22.9%
(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)
(* i (+ y (/ z 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 = i * (y + (z / 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 = i * (y + (z / 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 = i * (y + (z / 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 = i * (y + (z / 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(i * Float64(y + Float64(z / 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 = i * (y + (z / 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[(i * N[(y + N[(z / i), $MachinePrecision]), $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:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -50Initial program 99.8%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified74.6%
Taylor expanded in z around inf
lower-/.f6431.6
Simplified31.6%
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
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6480.0
Simplified80.0%
Taylor expanded in i around inf
lower-*.f6431.6
Simplified31.6%
Final simplification31.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (fma x (log y) (fma (log c) (+ b -0.5) a)))))
(if (<= x -5.6e+135)
t_1
(if (<= x 5.4e+177)
(+ (* y i) (+ 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 = z + fma(x, log(y), fma(log(c), (b + -0.5), a));
double tmp;
if (x <= -5.6e+135) {
tmp = t_1;
} else if (x <= 5.4e+177) {
tmp = (y * i) + (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(z + fma(x, log(y), fma(log(c), Float64(b + -0.5), a))) tmp = 0.0 if (x <= -5.6e+135) tmp = t_1; elseif (x <= 5.4e+177) tmp = Float64(Float64(y * i) + 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[(z + N[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+135], t$95$1, If[LessEqual[x, 5.4e+177], N[(N[(y * i), $MachinePrecision] + N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\log c, b + -0.5, a\right)\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{+177}:\\
\;\;\;\;y \cdot i + \left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -5.60000000000000004e135 or 5.39999999999999982e177 < x Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6493.2
Simplified93.2%
Taylor expanded in a around inf
+-commutativeN/A
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6482.0
Simplified82.0%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6483.4
Simplified83.4%
if -5.60000000000000004e135 < x < 5.39999999999999982e177Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.8
Simplified95.8%
Final simplification92.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma x (log y) (fma (log c) (+ b -0.5) a))))
(if (<= x -1.58e+165)
t_1
(if (<= x 2e+181)
(+ (* y i) (+ 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 = fma(x, log(y), fma(log(c), (b + -0.5), a));
double tmp;
if (x <= -1.58e+165) {
tmp = t_1;
} else if (x <= 2e+181) {
tmp = (y * i) + (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 = fma(x, log(y), fma(log(c), Float64(b + -0.5), a)) tmp = 0.0 if (x <= -1.58e+165) tmp = t_1; elseif (x <= 2e+181) tmp = Float64(Float64(y * i) + 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[(x * N[Log[y], $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.58e+165], t$95$1, If[LessEqual[x, 2e+181], N[(N[(y * i), $MachinePrecision] + N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, \log y, \mathsf{fma}\left(\log c, b + -0.5, a\right)\right)\\
\mathbf{if}\;x \leq -1.58 \cdot 10^{+165}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+181}:\\
\;\;\;\;y \cdot i + \left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.58000000000000007e165 or 1.9999999999999998e181 < x Initial program 99.8%
Taylor expanded in a around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
lower-/.f6453.0
Simplified53.0%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-log.f6445.9
Simplified45.9%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6475.5
Simplified75.5%
if -1.58000000000000007e165 < x < 1.9999999999999998e181Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6495.4
Simplified95.4%
Final simplification90.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (fma x (log y) z) (fma (log c) (+ b -0.5) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (fma(x, log(y), z) + fma(log(c), (b + -0.5), a));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(fma(x, log(y), z) + fma(log(c), Float64(b + -0.5), a))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\mathsf{fma}\left(x, \log y, z\right) + \mathsf{fma}\left(\log c, b + -0.5, a\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6487.1
Simplified87.1%
Final simplification87.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (* y i))))
(if (<= x -2.95e+169)
t_1
(if (<= x 6e+227)
(+ (* y i) (+ 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 = (x * log(y)) + (y * i);
double tmp;
if (x <= -2.95e+169) {
tmp = t_1;
} else if (x <= 6e+227) {
tmp = (y * i) + (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(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -2.95e+169) tmp = t_1; elseif (x <= 6e+227) tmp = Float64(Float64(y * i) + 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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.95e+169], t$95$1, If[LessEqual[x, 6e+227], N[(N[(y * i), $MachinePrecision] + N[(t + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -2.95 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+227}:\\
\;\;\;\;y \cdot i + \left(t + \left(a + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.95e169 or 5.99999999999999972e227 < x Initial program 99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6477.1
Simplified77.1%
if -2.95e169 < x < 5.99999999999999972e227Initial program 99.8%
Taylor expanded in x around 0
+-commutativeN/A
associate-+l+N/A
lower-+.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.1
Simplified94.1%
Final simplification90.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (* y i))))
(if (<= x -2.95e+169)
t_1
(if (<= x 6e+227) (+ 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 = (x * log(y)) + (y * i);
double tmp;
if (x <= -2.95e+169) {
tmp = t_1;
} else if (x <= 6e+227) {
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(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -2.95e+169) tmp = t_1; elseif (x <= 6e+227) 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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.95e+169], t$95$1, If[LessEqual[x, 6e+227], 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 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -2.95 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+227}:\\
\;\;\;\;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.95e169 or 5.99999999999999972e227 < x Initial program 99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6477.1
Simplified77.1%
if -2.95e169 < x < 5.99999999999999972e227Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6494.1
Simplified94.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (* y i))))
(if (<= x -2.95e+169)
t_1
(if (<= x 6e+227) (+ a (fma (log c) (+ b -0.5) (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)) + (y * i);
double tmp;
if (x <= -2.95e+169) {
tmp = t_1;
} else if (x <= 6e+227) {
tmp = a + fma(log(c), (b + -0.5), fma(i, y, z));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -2.95e+169) tmp = t_1; elseif (x <= 6e+227) tmp = Float64(a + fma(log(c), Float64(b + -0.5), 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[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.95e+169], t$95$1, If[LessEqual[x, 6e+227], N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -2.95 \cdot 10^{+169}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 6 \cdot 10^{+227}:\\
\;\;\;\;a + \mathsf{fma}\left(\log c, b + -0.5, \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -2.95e169 or 5.99999999999999972e227 < x Initial program 99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6477.1
Simplified77.1%
if -2.95e169 < x < 5.99999999999999972e227Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6485.1
Simplified85.1%
Taylor expanded in a around inf
+-commutativeN/A
distribute-lft-inN/A
associate-/l*N/A
associate-*r*N/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6471.6
Simplified71.6%
Taylor expanded in x around 0
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f6479.4
Simplified79.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (* y i))))
(if (<= x -4.3e+163)
t_1
(if (<= x 3.5e+92) (+ a (+ t (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 = (x * log(y)) + (y * i);
double tmp;
if (x <= -4.3e+163) {
tmp = t_1;
} else if (x <= 3.5e+92) {
tmp = a + (t + 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(Float64(x * log(y)) + Float64(y * i)) tmp = 0.0 if (x <= -4.3e+163) tmp = t_1; elseif (x <= 3.5e+92) tmp = Float64(a + Float64(t + 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[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.3e+163], t$95$1, If[LessEqual[x, 3.5e+92], N[(a + N[(t + 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 := x \cdot \log y + y \cdot i\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+92}:\\
\;\;\;\;a + \left(t + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -4.3000000000000002e163 or 3.49999999999999986e92 < x Initial program 99.8%
Taylor expanded in x around inf
lower-*.f64N/A
lower-log.f6469.9
Simplified69.9%
if -4.3000000000000002e163 < x < 3.49999999999999986e92Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6497.7
Simplified97.7%
Taylor expanded in i around 0
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6478.1
Simplified78.1%
Final simplification75.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.3e+122) (+ a (+ t (fma (log c) (+ b -0.5) z))) (fma (log c) (+ b -0.5) (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 (z <= -2.3e+122) {
tmp = a + (t + fma(log(c), (b + -0.5), z));
} else {
tmp = fma(log(c), (b + -0.5), fma(i, y, a));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.3e+122) tmp = Float64(a + Float64(t + fma(log(c), Float64(b + -0.5), z))); else tmp = fma(log(c), Float64(b + -0.5), fma(i, y, a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.3e+122], N[(a + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(i * y + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+122}:\\
\;\;\;\;a + \left(t + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b + -0.5, \mathsf{fma}\left(i, y, a\right)\right)\\
\end{array}
\end{array}
if z < -2.3000000000000001e122Initial program 99.9%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6484.3
Simplified84.3%
Taylor expanded in i around 0
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6473.5
Simplified73.5%
if -2.3000000000000001e122 < z Initial program 99.8%
Taylor expanded in a around inf
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f64N/A
lower-+.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
lower-log.f64N/A
lower-/.f6474.8
Simplified74.8%
Taylor expanded in x around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-log.f6460.2
Simplified60.2%
Taylor expanded in x around 0
associate-+r+N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f6453.9
Simplified53.9%
Final simplification56.6%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (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 = a + (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 a + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.8%
Taylor expanded in x around 0
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-fma.f64N/A
lower-log.f64N/A
sub-negN/A
metadata-evalN/A
lower-+.f6482.3
Simplified82.3%
Taylor expanded in i around inf
lower-*.f6434.8
Simplified34.8%
Final simplification34.8%
(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.8%
Taylor expanded in i around -inf
mul-1-negN/A
distribute-rgt-neg-inN/A
distribute-lft-outN/A
mul-1-negN/A
remove-double-negN/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
Simplified70.2%
Taylor expanded in a around inf
lower-/.f6410.4
Simplified10.4%
lift-/.f64N/A
*-commutativeN/A
lift-/.f64N/A
div-invN/A
associate-*l*N/A
inv-powN/A
pow-plusN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
lower-*.f64N/A
metadata-eval16.2
Applied egg-rr16.2%
*-rgt-identity16.2
Applied egg-rr16.2%
herbie shell --seed 2024207
(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)))