
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (<= t_1 (- INFINITY))
(* i y)
(if (<= t_1 5e+94)
(+ (fma (log c) (- b 0.5) z) t)
(if (or (<= t_1 1e+175) (not (<= t_1 2e+306)))
(* 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 <= -((double) INFINITY)) {
tmp = i * y;
} else if (t_1 <= 5e+94) {
tmp = fma(log(c), (b - 0.5), z) + t;
} else if ((t_1 <= 1e+175) || !(t_1 <= 2e+306)) {
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 <= Float64(-Inf)) tmp = Float64(i * y); elseif (t_1 <= 5e+94) tmp = Float64(fma(log(c), Float64(b - 0.5), z) + t); elseif ((t_1 <= 1e+175) || !(t_1 <= 2e+306)) tmp = Float64(i * y); else tmp = Float64(Float64(a / i) * 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, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, 5e+94], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision], If[Or[LessEqual[t$95$1, 1e+175], N[Not[LessEqual[t$95$1, 2e+306]], $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 -\infty:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\\
\mathbf{elif}\;t\_1 \leq 10^{+175} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+306}\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)) < -inf.0 or 5.0000000000000001e94 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 9.9999999999999994e174 or 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)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6475.3
Applied rewrites75.3%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 5.0000000000000001e94Initial program 99.8%
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.f6485.9
Applied rewrites85.9%
Taylor expanded in a around 0
Applied rewrites71.4%
Taylor expanded in y around 0
Applied rewrites58.2%
if 9.9999999999999994e174 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2.00000000000000003e306Initial program 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.4%
Taylor expanded in a around inf
Applied rewrites10.0%
Final simplification46.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 (- INFINITY))
(* i y)
(if (<= t_1 -50000000.0)
(* (/ z i) i)
(if (<= t_1 2e+306) (* (/ 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 <= -((double) INFINITY)) {
tmp = i * y;
} else if (t_1 <= -50000000.0) {
tmp = (z / i) * i;
} else if (t_1 <= 2e+306) {
tmp = (a / i) * i;
} else {
tmp = i * y;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = i * y;
} else if (t_1 <= -50000000.0) {
tmp = (z / i) * i;
} else if (t_1 <= 2e+306) {
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 <= -math.inf: tmp = i * y elif t_1 <= -50000000.0: tmp = (z / i) * i elif t_1 <= 2e+306: 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 <= Float64(-Inf)) tmp = Float64(i * y); elseif (t_1 <= -50000000.0) tmp = Float64(Float64(z / i) * i); elseif (t_1 <= 2e+306) 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 <= -Inf) tmp = i * y; elseif (t_1 <= -50000000.0) tmp = (z / i) * i; elseif (t_1 <= 2e+306) 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, (-Infinity)], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -50000000.0], N[(N[(z / i), $MachinePrecision] * i), $MachinePrecision], If[LessEqual[t$95$1, 2e+306], 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 -\infty:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_1 \leq -50000000:\\
\;\;\;\;\frac{z}{i} \cdot i\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\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)) < -inf.0 or 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)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6494.5
Applied rewrites94.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < -5e7Initial 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 rewrites57.4%
Taylor expanded in z around inf
Applied rewrites7.5%
if -5e7 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2.00000000000000003e306Initial program 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 rewrites67.4%
Taylor expanded in a around inf
Applied rewrites9.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 (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+306)))
(* i y)
(+ (+ (fma (log c) (- b 0.5) z) t) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+306)) {
tmp = i * y;
} else {
tmp = (fma(log(c), (b - 0.5), z) + t) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+306)) tmp = Float64(i * y); else tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+306]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+306}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\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)) < -inf.0 or 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)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6494.5
Applied rewrites94.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2.00000000000000003e306Initial program 99.8%
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%
Taylor expanded in a around 0
Applied rewrites66.1%
Taylor expanded in y around 0
Applied rewrites67.6%
Final simplification71.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+306)))
(* i y)
(+ (fma (log c) (- b 0.5) z) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+306)) {
tmp = i * y;
} else {
tmp = fma(log(c), (b - 0.5), z) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+306)) tmp = Float64(i * y); else tmp = Float64(fma(log(c), Float64(b - 0.5), z) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+306]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+306}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, z\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)) < -inf.0 or 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)) Initial program 100.0%
Taylor expanded in y around inf
lower-*.f6494.5
Applied rewrites94.5%
if -inf.0 < (+.f64 (+.f64 (+.f64 (+.f64 (+.f64 (*.f64 x (log.f64 y)) z) t) a) (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c))) (*.f64 y i)) < 2.00000000000000003e306Initial program 99.8%
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%
Taylor expanded in a around 0
Applied rewrites66.1%
Taylor expanded in y around 0
Applied rewrites67.6%
Taylor expanded in t around 0
Applied rewrites46.5%
Final simplification53.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (or (<= t_1 -1e+212) (not (<= t_1 1e+85)))
(fma (- b 0.5) (log c) (fma i y (+ t z)))
(+ (fma i y (fma -0.5 (log c) z)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (b - 0.5) * log(c);
double tmp;
if ((t_1 <= -1e+212) || !(t_1 <= 1e+85)) {
tmp = fma((b - 0.5), log(c), fma(i, y, (t + z)));
} else {
tmp = fma(i, y, fma(-0.5, log(c), z)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if ((t_1 <= -1e+212) || !(t_1 <= 1e+85)) tmp = fma(Float64(b - 0.5), log(c), fma(i, y, Float64(t + z))); else tmp = Float64(fma(i, y, fma(-0.5, log(c), z)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+212], N[Not[LessEqual[t$95$1, 1e+85]], $MachinePrecision]], N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(i * y + N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+212} \lor \neg \left(t\_1 \leq 10^{+85}\right):\\
\;\;\;\;\mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, t + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(-0.5, \log c, z\right)\right) + a\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -9.9999999999999991e211 or 1e85 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) 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.f6495.1
Applied rewrites95.1%
Taylor expanded in a around 0
Applied rewrites90.7%
Applied rewrites90.7%
if -9.9999999999999991e211 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 1e85Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites77.8%
Taylor expanded in x around 0
Applied rewrites60.6%
Taylor expanded in b around 0
Applied rewrites58.6%
Final simplification64.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (fma i y (fma (log y) x (fma (- b 0.5) (log c) z))) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(i, y, fma(log(y), x, fma((b - 0.5), log(c), z))) + a;
}
function code(x, y, z, t, a, b, c, i) return Float64(fma(i, y, fma(log(y), x, fma(Float64(b - 0.5), log(c), z))) + a) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(b - 0.5, \log c, z\right)\right)\right) + a
\end{array}
Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites81.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.4e+181) (not (<= x 3.8e+53))) (+ (fma i y (fma (log y) x (* 1.0 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 ((x <= -6.4e+181) || !(x <= 3.8e+53)) {
tmp = fma(i, y, fma(log(y), x, (1.0 * 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 ((x <= -6.4e+181) || !(x <= 3.8e+53)) tmp = Float64(fma(i, y, fma(log(y), x, Float64(1.0 * 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[Or[LessEqual[x, -6.4e+181], N[Not[LessEqual[x, 3.8e+53]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(1.0 * z), $MachinePrecision]), $MachinePrecision]), $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}\;x \leq -6.4 \cdot 10^{+181} \lor \neg \left(x \leq 3.8 \cdot 10^{+53}\right):\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, 1 \cdot z\right)\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 x < -6.4000000000000001e181 or 3.79999999999999997e53 < x Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites89.3%
Taylor expanded in z around inf
Applied rewrites84.0%
Taylor expanded in z around inf
Applied rewrites84.0%
if -6.4000000000000001e181 < x < 3.79999999999999997e53Initial 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.f6497.6
Applied rewrites97.6%
Final simplification93.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (- b 0.5) -1e+196)
(+ (fma (log c) (- b 0.5) (* i y)) t)
(if (<= (- b 0.5) 2e+160)
(+ (fma i y (fma -0.5 (log c) z)) a)
(+ (+ (fma (log c) (- b 0.5) z) t) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= -1e+196) {
tmp = fma(log(c), (b - 0.5), (i * y)) + t;
} else if ((b - 0.5) <= 2e+160) {
tmp = fma(i, y, fma(-0.5, log(c), z)) + a;
} else {
tmp = (fma(log(c), (b - 0.5), z) + t) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(b - 0.5) <= -1e+196) tmp = Float64(fma(log(c), Float64(b - 0.5), Float64(i * y)) + t); elseif (Float64(b - 0.5) <= 2e+160) tmp = Float64(fma(i, y, fma(-0.5, log(c), z)) + a); else tmp = Float64(Float64(fma(log(c), Float64(b - 0.5), z) + t) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+196], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(i * y), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+160], N[(N[(i * y + N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+196}:\\
\;\;\;\;\mathsf{fma}\left(\log c, b - 0.5, i \cdot y\right) + t\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+160}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(-0.5, \log c, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(\mathsf{fma}\left(\log c, b - 0.5, z\right) + t\right) + a\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.9999999999999995e195Initial 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.f6499.5
Applied rewrites99.5%
Taylor expanded in a around 0
Applied rewrites97.2%
Taylor expanded in z around 0
Applied rewrites93.9%
if -9.9999999999999995e195 < (-.f64 b #s(literal 1/2 binary64)) < 2.00000000000000001e160Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites78.2%
Taylor expanded in x around 0
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites59.1%
if 2.00000000000000001e160 < (-.f64 b #s(literal 1/2 binary64)) 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.f6493.1
Applied rewrites93.1%
Taylor expanded in a around 0
Applied rewrites79.7%
Taylor expanded in y around 0
Applied rewrites78.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (fma (log c) (- b 0.5) z)))
(if (<= (- b 0.5) -1e+196)
(+ t_1 a)
(if (<= (- b 0.5) 2e+160)
(+ (fma i y (fma -0.5 (log c) z)) a)
(+ (+ t_1 t) a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = fma(log(c), (b - 0.5), z);
double tmp;
if ((b - 0.5) <= -1e+196) {
tmp = t_1 + a;
} else if ((b - 0.5) <= 2e+160) {
tmp = fma(i, y, fma(-0.5, log(c), z)) + a;
} else {
tmp = (t_1 + t) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = fma(log(c), Float64(b - 0.5), z) tmp = 0.0 if (Float64(b - 0.5) <= -1e+196) tmp = Float64(t_1 + a); elseif (Float64(b - 0.5) <= 2e+160) tmp = Float64(fma(i, y, fma(-0.5, log(c), z)) + a); else tmp = Float64(Float64(t_1 + t) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+196], N[(t$95$1 + a), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+160], N[(N[(i * y + N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(t$95$1 + t), $MachinePrecision] + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\log c, b - 0.5, z\right)\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+196}:\\
\;\;\;\;t\_1 + a\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+160}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(-0.5, \log c, z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;\left(t\_1 + t\right) + a\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.9999999999999995e195Initial 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.f6499.5
Applied rewrites99.5%
Taylor expanded in a around 0
Applied rewrites97.2%
Taylor expanded in y around 0
Applied rewrites83.6%
Taylor expanded in t around 0
Applied rewrites83.6%
if -9.9999999999999995e195 < (-.f64 b #s(literal 1/2 binary64)) < 2.00000000000000001e160Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites78.2%
Taylor expanded in x around 0
Applied rewrites61.5%
Taylor expanded in b around 0
Applied rewrites59.1%
if 2.00000000000000001e160 < (-.f64 b #s(literal 1/2 binary64)) 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.f6493.1
Applied rewrites93.1%
Taylor expanded in a around 0
Applied rewrites79.7%
Taylor expanded in y around 0
Applied rewrites78.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.4e+181) (not (<= x 3.8e+53))) (+ (fma i y (fma (log y) x (* 1.0 z))) a) (+ (fma i y (fma (log c) (- b 0.5) z)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.4e+181) || !(x <= 3.8e+53)) {
tmp = fma(i, y, fma(log(y), x, (1.0 * z))) + a;
} else {
tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.4e+181) || !(x <= 3.8e+53)) tmp = Float64(fma(i, y, fma(log(y), x, Float64(1.0 * z))) + a); else tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.4e+181], N[Not[LessEqual[x, 3.8e+53]], $MachinePrecision]], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(1.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+181} \lor \neg \left(x \leq 3.8 \cdot 10^{+53}\right):\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, 1 \cdot z\right)\right) + a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
\end{array}
\end{array}
if x < -6.4000000000000001e181 or 3.79999999999999997e53 < x Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites89.3%
Taylor expanded in z around inf
Applied rewrites84.0%
Taylor expanded in z around inf
Applied rewrites84.0%
if -6.4000000000000001e181 < x < 3.79999999999999997e53Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites77.9%
Taylor expanded in x around 0
Applied rewrites75.5%
Final simplification77.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.8e+183) (not (<= x 4.4e+260))) (* (log y) x) (+ (fma i y (fma (log c) (- b 0.5) z)) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.8e+183) || !(x <= 4.4e+260)) {
tmp = log(y) * x;
} else {
tmp = fma(i, y, fma(log(c), (b - 0.5), z)) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.8e+183) || !(x <= 4.4e+260)) tmp = Float64(log(y) * x); else tmp = Float64(fma(i, y, fma(log(c), Float64(b - 0.5), z)) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.8e+183], N[Not[LessEqual[x, 4.4e+260]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(i * y + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.8 \cdot 10^{+183} \lor \neg \left(x \leq 4.4 \cdot 10^{+260}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log c, b - 0.5, z\right)\right) + a\\
\end{array}
\end{array}
if x < -5.8000000000000001e183 or 4.40000000000000023e260 < x Initial program 99.7%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites94.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6474.2
Applied rewrites74.2%
if -5.8000000000000001e183 < x < 4.40000000000000023e260Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites79.0%
Taylor expanded in x around 0
Applied rewrites73.1%
Final simplification73.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -8e+181) (not (<= x 4.5e+196))) (* (log y) x) (* i y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -8e+181) || !(x <= 4.5e+196)) {
tmp = log(y) * x;
} 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) :: tmp
if ((x <= (-8d+181)) .or. (.not. (x <= 4.5d+196))) then
tmp = log(y) * x
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 tmp;
if ((x <= -8e+181) || !(x <= 4.5e+196)) {
tmp = Math.log(y) * x;
} else {
tmp = i * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -8e+181) or not (x <= 4.5e+196): tmp = math.log(y) * x else: tmp = i * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -8e+181) || !(x <= 4.5e+196)) tmp = Float64(log(y) * x); else tmp = Float64(i * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -8e+181) || ~((x <= 4.5e+196))) tmp = log(y) * x; else tmp = i * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -8e+181], N[Not[LessEqual[x, 4.5e+196]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(i * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+181} \lor \neg \left(x \leq 4.5 \cdot 10^{+196}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;i \cdot y\\
\end{array}
\end{array}
if x < -7.9999999999999993e181 or 4.49999999999999978e196 < x Initial program 99.7%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites93.3%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6465.5
Applied rewrites65.5%
if -7.9999999999999993e181 < x < 4.49999999999999978e196Initial program 99.9%
Taylor expanded in y around inf
lower-*.f6428.7
Applied rewrites28.7%
Final simplification35.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 3.6e-103) (* (/ a i) i) (* i y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 3.6e-103) {
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) :: tmp
if (y <= 3.6d-103) 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 tmp;
if (y <= 3.6e-103) {
tmp = (a / i) * i;
} else {
tmp = i * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 3.6e-103: tmp = (a / i) * i else: tmp = i * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 3.6e-103) 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) tmp = 0.0; if (y <= 3.6e-103) tmp = (a / i) * i; else tmp = i * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 3.6e-103], N[(N[(a / i), $MachinePrecision] * i), $MachinePrecision], N[(i * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.6 \cdot 10^{-103}:\\
\;\;\;\;\frac{a}{i} \cdot i\\
\mathbf{else}:\\
\;\;\;\;i \cdot y\\
\end{array}
\end{array}
if y < 3.5999999999999998e-103Initial 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 rewrites63.7%
Taylor expanded in a around inf
Applied rewrites8.9%
if 3.5999999999999998e-103 < y Initial program 99.9%
Taylor expanded in y around inf
lower-*.f6436.7
Applied rewrites36.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.9%
Taylor expanded in y around inf
lower-*.f6426.7
Applied rewrites26.7%
herbie shell --seed 2024320
(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)))