
(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.5%
(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+306)
(* i y)
(if (<= t_1 -100.0)
(* (/ z i) i)
(if (<= t_1 5e+307) (* (/ a i) i) (* i y))))))
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+306) {
tmp = i * y;
} else if (t_1 <= -100.0) {
tmp = (z / i) * i;
} else if (t_1 <= 5e+307) {
tmp = (a / i) * i;
} else {
tmp = i * y;
}
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+306)) then
tmp = i * y
else if (t_1 <= (-100.0d0)) then
tmp = (z / i) * i
else if (t_1 <= 5d+307) then
tmp = (a / i) * i
else
tmp = i * y
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+306) {
tmp = i * y;
} else if (t_1 <= -100.0) {
tmp = (z / i) * i;
} else if (t_1 <= 5e+307) {
tmp = (a / i) * i;
} else {
tmp = i * y;
}
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+306: tmp = i * y elif t_1 <= -100.0: tmp = (z / i) * i elif t_1 <= 5e+307: tmp = (a / i) * i else: tmp = i * y 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+306) tmp = Float64(i * y); elseif (t_1 <= -100.0) tmp = Float64(Float64(z / i) * i); elseif (t_1 <= 5e+307) tmp = Float64(Float64(a / i) * i); else tmp = Float64(i * y); 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+306) tmp = i * y; elseif (t_1 <= -100.0) tmp = (z / i) * i; elseif (t_1 <= 5e+307) tmp = (a / i) * i; else tmp = i * y; 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+306], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -100.0], N[(N[(z / i), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision], N[(i * y), $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^{+306}:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_1 \leq -100:\\
\;\;\;\;\frac{z}{i} \cdot i\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{a}{i} \cdot i\\
\mathbf{else}:\\
\;\;\;\;i \cdot y\\
\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.00000000000000003e306 or 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 97.3%
Taylor expanded in y around inf
lower-*.f6486.9
Applied rewrites86.9%
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)) < -100Initial program 99.8%
Taylor expanded in i around inf
*-commutativeN/A
div-add-revN/A
div-add-revN/A
div-addN/A
div-addN/A
lower-*.f64N/A
Applied rewrites64.6%
Taylor expanded in z around inf
Applied rewrites9.5%
if -100 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307Initial program 99.9%
Taylor expanded in i around inf
*-commutativeN/A
div-add-revN/A
div-add-revN/A
div-addN/A
div-addN/A
lower-*.f64N/A
Applied rewrites66.5%
Taylor expanded in a around inf
Applied rewrites11.9%
(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 (or (<= t_1 5e+26) (not (<= t_1 5e+307))) (* i y) (* (/ a i) 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+26) || !(t_1 <= 5e+307)) {
tmp = i * y;
} else {
tmp = (a / i) * 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+26) .or. (.not. (t_1 <= 5d+307))) then
tmp = i * y
else
tmp = (a / i) * 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+26) || !(t_1 <= 5e+307)) {
tmp = i * y;
} else {
tmp = (a / i) * 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+26) or not (t_1 <= 5e+307): tmp = i * y else: tmp = (a / i) * 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+26) || !(t_1 <= 5e+307)) tmp = Float64(i * y); else tmp = Float64(Float64(a / i) * 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+26) || ~((t_1 <= 5e+307))) tmp = i * y; else tmp = (a / i) * 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[Or[LessEqual[t$95$1, 5e+26], N[Not[LessEqual[t$95$1, 5e+307]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+26} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+307}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{i} \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.0000000000000001e26 or 5e307 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) Initial program 99.2%
Taylor expanded in y around inf
lower-*.f6430.3
Applied rewrites30.3%
if 5.0000000000000001e26 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5e307Initial program 99.9%
Taylor expanded in i around inf
*-commutativeN/A
div-add-revN/A
div-add-revN/A
div-addN/A
div-addN/A
lower-*.f64N/A
Applied rewrites64.8%
Taylor expanded in a around inf
Applied rewrites12.3%
Final simplification22.2%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (log y) x (fma (- b 0.5) (log c) t))))
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-5e+22)
(+ (fma i y z) t_1)
(+ (fma i y t_1) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(log(y), x, fma((b - 0.5), log(c), t));
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -5e+22) {
tmp = fma(i, y, z) + t_1;
} else {
tmp = fma(i, y, t_1) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(y), x, fma(Float64(b - 0.5), log(c), t)) 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)) <= -5e+22) tmp = Float64(fma(i, y, z) + t_1); else tmp = Float64(fma(i, y, t_1) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, 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], -5e+22], N[(N[(i * y + z), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(i * y + t$95$1), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, t\right)\right)\\
\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 -5 \cdot 10^{+22}:\\
\;\;\;\;\mathsf{fma}\left(i, y, z\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, t\_1\right) + 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)) < -4.9999999999999996e22Initial program 99.9%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.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--.f64N/A
lower-log.f6482.8
Applied rewrites82.8%
if -4.9999999999999996e22 < (+.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.2%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites77.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.05e+135) (+ (fma i y z) (fma (log y) x (fma (- b 0.5) (log c) t))) (+ (fma i y (fma (log y) x (fma -0.5 (log c) t))) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.05e+135) {
tmp = fma(i, y, z) + fma(log(y), x, fma((b - 0.5), log(c), t));
} else {
tmp = fma(i, y, fma(log(y), x, fma(-0.5, log(c), t))) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.05e+135) tmp = Float64(fma(i, y, z) + fma(log(y), x, fma(Float64(b - 0.5), log(c), t))); else tmp = Float64(fma(i, y, fma(log(y), x, fma(-0.5, log(c), t))) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.05e+135], N[(N[(i * y + z), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(-0.5 * N[Log[c], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.05 \cdot 10^{+135}:\\
\;\;\;\;\mathsf{fma}\left(i, y, z\right) + \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, t\right)\right)\right) + a\\
\end{array}
\end{array}
if a < 2.05e135Initial program 99.4%
Taylor expanded in a around 0
+-commutativeN/A
associate-+r+N/A
associate-+l+N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-fma.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--.f64N/A
lower-log.f6489.7
Applied rewrites89.7%
if 2.05e135 < a Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites85.2%
Taylor expanded in b around 0
Applied rewrites79.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4.7e+29) (+ (+ (fma (log y) x (fma (log c) (- b 0.5) t)) z) a) (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4.7e+29) {
tmp = (fma(log(y), x, fma(log(c), (b - 0.5), t)) + z) + a;
} else {
tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4.7e+29) tmp = Float64(Float64(fma(log(y), x, fma(log(c), Float64(b - 0.5), t)) + z) + a); else tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4.7e+29], N[(N[(N[(N[Log[y], $MachinePrecision] * x + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.7 \cdot 10^{+29}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log y, x, \mathsf{fma}\left(\log c, b - 0.5, t\right)\right) + z\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
\end{array}
\end{array}
if y < 4.7000000000000002e29Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6480.5
Applied rewrites80.5%
Applied rewrites80.5%
Taylor expanded in y around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f64N/A
lower-log.f64N/A
lower--.f6496.8
Applied rewrites96.8%
if 4.7000000000000002e29 < y Initial program 98.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6488.8
Applied rewrites88.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 9e+208) (fma (- b 0.5) (log c) (+ (fma i y z) (+ a t))) (+ (+ a t) (fma (log c) (- b 0.5) (* (log y) x)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 9e+208) {
tmp = fma((b - 0.5), log(c), (fma(i, y, z) + (a + t)));
} else {
tmp = (a + t) + fma(log(c), (b - 0.5), (log(y) * x));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 9e+208) tmp = fma(Float64(b - 0.5), log(c), Float64(fma(i, y, z) + Float64(a + t))); else tmp = Float64(Float64(a + t) + fma(log(c), Float64(b - 0.5), Float64(log(y) * x))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 9e+208], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(i * y + z), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{+208}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right) + \left(a + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\\
\end{array}
\end{array}
if x < 9.00000000000000029e208Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
Applied rewrites89.0%
if 9.00000000000000029e208 < x Initial program 99.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites96.0%
Taylor expanded in y around 0
Applied rewrites80.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 9e+208) (fma (- b 0.5) (log c) (+ (fma i y z) (+ a t))) (+ (fma -0.5 (log c) (fma (log y) x t)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 9e+208) {
tmp = fma((b - 0.5), log(c), (fma(i, y, z) + (a + t)));
} else {
tmp = fma(-0.5, log(c), fma(log(y), x, t)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 9e+208) tmp = fma(Float64(b - 0.5), log(c), Float64(fma(i, y, z) + Float64(a + t))); else tmp = Float64(fma(-0.5, log(c), fma(log(y), x, t)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 9e+208], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(i * y + z), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * N[Log[c], $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 9 \cdot 10^{+208}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right) + \left(a + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-0.5, \log c, \mathsf{fma}\left(\log y, x, t\right)\right) + a\\
\end{array}
\end{array}
if x < 9.00000000000000029e208Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
Applied rewrites89.0%
if 9.00000000000000029e208 < x Initial program 99.7%
Taylor expanded in z around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites96.0%
Taylor expanded in y around 0
Applied rewrites80.3%
Taylor expanded in b around 0
Applied rewrites76.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (* (- b 0.5) (log c)) -1e+273) (* (log c) b) (+ (+ (+ (* 1.0 z) t) a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) * log(c)) <= -1e+273) {
tmp = log(c) * b;
} else {
tmp = (((1.0 * z) + t) + 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 (((b - 0.5d0) * log(c)) <= (-1d+273)) then
tmp = log(c) * b
else
tmp = (((1.0d0 * z) + t) + 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 (((b - 0.5) * Math.log(c)) <= -1e+273) {
tmp = Math.log(c) * b;
} else {
tmp = (((1.0 * z) + t) + a) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) * math.log(c)) <= -1e+273: tmp = math.log(c) * b else: tmp = (((1.0 * z) + t) + a) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(b - 0.5) * log(c)) <= -1e+273) tmp = Float64(log(c) * b); else tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) * log(c)) <= -1e+273) tmp = log(c) * b; else tmp = (((1.0 * z) + t) + a) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision], -1e+273], N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(b - 0.5\right) \cdot \log c \leq -1 \cdot 10^{+273}:\\
\;\;\;\;\log c \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -9.99999999999999945e272Initial program 99.3%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6481.6
Applied rewrites81.6%
if -9.99999999999999945e272 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6483.6
Applied rewrites83.6%
Taylor expanded in z around inf
Applied rewrites73.8%
Taylor expanded in z around inf
Applied rewrites69.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 1.5e+212) (fma (- b 0.5) (log c) (+ (fma i y z) (+ a t))) (* (log y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 1.5e+212) {
tmp = fma((b - 0.5), log(c), (fma(i, y, z) + (a + t)));
} else {
tmp = log(y) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 1.5e+212) tmp = fma(Float64(b - 0.5), log(c), Float64(fma(i, y, z) + Float64(a + t))); else tmp = Float64(log(y) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 1.5e+212], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(i * y + z), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right) + \left(a + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if x < 1.5e212Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
Applied rewrites89.0%
if 1.5e212 < x Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6438.5
Applied rewrites38.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.9
Applied rewrites63.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 1.5e+212) (+ (+ a t) (fma (- b 0.5) (log c) (fma i y z))) (* (log y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 1.5e+212) {
tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
} else {
tmp = log(y) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 1.5e+212) tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z))); else tmp = Float64(log(y) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 1.5e+212], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+212}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if x < 1.5e212Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
if 1.5e212 < x Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6438.5
Applied rewrites38.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.9
Applied rewrites63.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 1.5e+212) (+ (+ a z) (fma (log c) (- b 0.5) (* i y))) (* (log y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 1.5e+212) {
tmp = (a + z) + fma(log(c), (b - 0.5), (i * y));
} else {
tmp = log(y) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 1.5e+212) tmp = Float64(Float64(a + z) + fma(log(c), Float64(b - 0.5), Float64(i * y))); else tmp = Float64(log(y) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 1.5e+212], N[(N[(a + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+212}:\\
\;\;\;\;\left(a + z\right) + \mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if x < 1.5e212Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
Taylor expanded in t around 0
Applied rewrites73.0%
if 1.5e212 < x Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6438.5
Applied rewrites38.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.9
Applied rewrites63.9%
Final simplification72.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 1.5e+212) (+ (fma i y (fma (log c) (- b 0.5) z)) a) (* (log y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 1.5e+212) {
tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
} else {
tmp = log(y) * x;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 1.5e+212) tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a); else tmp = Float64(log(y) * x); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 1.5e+212], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.5 \cdot 10^{+212}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if x < 1.5e212Initial program 99.5%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6489.0
Applied rewrites89.0%
Applied rewrites89.0%
Taylor expanded in t around 0
Applied rewrites73.0%
if 1.5e212 < x Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6438.5
Applied rewrites38.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.9
Applied rewrites63.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.35e+85) (+ (+ (+ (* 1.0 z) t) a) (* y i)) (+ (fma (log c) (- b 0.5) (* 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 <= -1.35e+85) {
tmp = (((1.0 * z) + t) + a) + (y * i);
} else {
tmp = fma(log(c), (b - 0.5), (i * y)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.35e+85) tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); else tmp = Float64(fma(log(c), Float64(b - 0.5), Float64(i * y)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.35e+85], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+85}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + a\\
\end{array}
\end{array}
if z < -1.34999999999999992e85Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6494.9
Applied rewrites94.9%
Taylor expanded in z around inf
Applied rewrites94.9%
Taylor expanded in z around inf
Applied rewrites75.5%
if -1.34999999999999992e85 < z Initial program 99.4%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6482.2
Applied rewrites82.2%
Applied rewrites82.2%
Taylor expanded in t around 0
Applied rewrites68.4%
Taylor expanded in z around 0
Applied rewrites54.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 5.5e+31) (fma (- b 0.5) (log c) (+ (+ a t) z)) (+ (+ (+ (* 1.0 z) t) a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 5.5e+31) {
tmp = fma((b - 0.5), log(c), ((a + t) + z));
} else {
tmp = (((1.0 * z) + t) + a) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 5.5e+31) tmp = fma(Float64(b - 0.5), log(c), Float64(Float64(a + t) + z)); else tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 5.5e+31], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(a + t), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \left(a + t\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\end{array}
\end{array}
if y < 5.50000000000000002e31Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6480.6
Applied rewrites80.6%
Applied rewrites80.6%
Taylor expanded in y around 0
Applied rewrites77.4%
Applied rewrites77.4%
if 5.50000000000000002e31 < y Initial program 98.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6488.7
Applied rewrites88.7%
Taylor expanded in z around inf
Applied rewrites78.7%
Taylor expanded in z around inf
Applied rewrites78.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 5.5e+31) (+ (+ (fma (log c) (- b 0.5) z) t) a) (+ (+ (+ (* 1.0 z) t) a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 5.5e+31) {
tmp = (fma(log(c), (b - 0.5), z) + t) + a;
} else {
tmp = (((1.0 * z) + t) + a) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 5.5e+31) tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a); else tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 5.5e+31], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+31}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\end{array}
\end{array}
if y < 5.50000000000000002e31Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6480.6
Applied rewrites80.6%
Applied rewrites80.6%
Taylor expanded in y around 0
Applied rewrites77.4%
if 5.50000000000000002e31 < y Initial program 98.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6488.7
Applied rewrites88.7%
Taylor expanded in z around inf
Applied rewrites78.7%
Taylor expanded in z around inf
Applied rewrites78.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 5.5e+31) (+ (fma (log c) (- b 0.5) z) a) (+ (+ (+ (* 1.0 z) t) a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 5.5e+31) {
tmp = fma(log(c), (b - 0.5), z) + a;
} else {
tmp = (((1.0 * z) + t) + a) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 5.5e+31) tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a); else tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 5.5e+31], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{+31}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\end{array}
\end{array}
if y < 5.50000000000000002e31Initial program 99.9%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6480.6
Applied rewrites80.6%
Applied rewrites80.6%
Taylor expanded in t around 0
Applied rewrites63.5%
Taylor expanded in y around 0
Applied rewrites60.5%
if 5.50000000000000002e31 < y Initial program 98.9%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6488.7
Applied rewrites88.7%
Taylor expanded in z around inf
Applied rewrites78.7%
Taylor expanded in z around inf
Applied rewrites78.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 7.4e+211) (+ (+ (+ (* 1.0 z) t) a) (* y i)) (* (log y) x)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 7.4e+211) {
tmp = (((1.0 * z) + t) + a) + (y * i);
} else {
tmp = log(y) * x;
}
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 <= 7.4d+211) then
tmp = (((1.0d0 * z) + t) + a) + (y * i)
else
tmp = log(y) * x
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 <= 7.4e+211) {
tmp = (((1.0 * z) + t) + a) + (y * i);
} else {
tmp = Math.log(y) * x;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= 7.4e+211: tmp = (((1.0 * z) + t) + a) + (y * i) else: tmp = math.log(y) * x return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 7.4e+211) tmp = Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)); else tmp = Float64(log(y) * x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= 7.4e+211) tmp = (((1.0 * z) + t) + a) + (y * i); else tmp = log(y) * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 7.4e+211], N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 7.4 \cdot 10^{+211}:\\
\;\;\;\;\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\log y \cdot x\\
\end{array}
\end{array}
if x < 7.40000000000000019e211Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6488.9
Applied rewrites88.9%
Taylor expanded in z around inf
Applied rewrites78.1%
Taylor expanded in z around inf
Applied rewrites71.3%
if 7.40000000000000019e211 < x Initial program 99.7%
Taylor expanded in x around 0
associate-+r+N/A
lower-+.f64N/A
lower-+.f64N/A
associate-+r+N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
+-commutativeN/A
lower-fma.f6438.5
Applied rewrites38.5%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6463.9
Applied rewrites63.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (* 1.0 z) t) a) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((1.0 * z) + t) + 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 = (((1.0d0 * z) + t) + 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 (((1.0 * z) + t) + a) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((1.0 * z) + t) + a) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(1.0 * z) + t) + a) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((1.0 * z) + t) + a) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(1.0 * z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(1 \cdot z + t\right) + a\right) + y \cdot i
\end{array}
Initial program 99.5%
Taylor expanded in x around 0
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f6484.0
Applied rewrites84.0%
Taylor expanded in z around inf
Applied rewrites73.8%
Taylor expanded in z around inf
Applied rewrites67.7%
(FPCore (x y z t a b c i) :precision binary64 (* i y))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
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 = i * y
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return i * y;
}
def code(x, y, z, t, a, b, c, i): return i * y
function code(x, y, z, t, a, b, c, i) return Float64(i * y) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = i * y; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(i * y), $MachinePrecision]
\begin{array}{l}
\\
i \cdot y
\end{array}
Initial program 99.5%
Taylor expanded in y around inf
lower-*.f6421.6
Applied rewrites21.6%
herbie shell --seed 2024329
(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)))