
(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 16 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 (fma y i (fma (log c) (- b 0.5) (+ a (+ t (fma (log y) x z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma(log(c), (b - 0.5), (a + (t + fma(log(y), x, z)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(log(c), Float64(b - 0.5), Float64(a + Float64(t + fma(log(y), x, z))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(a + N[(t + N[(N[Log[y], $MachinePrecision] * x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(\log c, b - 0.5, a + \left(t + \mathsf{fma}\left(\log y, x, z\right)\right)\right)\right)
\end{array}
Initial program 99.8%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.8
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.9
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.9
Applied rewrites99.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 -1e+308)
(* i y)
(if (<= t_1 -5e+31)
(* (/ z y) y)
(if (<= t_1 2e+304) (* (/ a y) y) (* 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 <= -1e+308) {
tmp = i * y;
} else if (t_1 <= -5e+31) {
tmp = (z / y) * y;
} else if (t_1 <= 2e+304) {
tmp = (a / y) * y;
} 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 <= (-1d+308)) then
tmp = i * y
else if (t_1 <= (-5d+31)) then
tmp = (z / y) * y
else if (t_1 <= 2d+304) then
tmp = (a / y) * y
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 <= -1e+308) {
tmp = i * y;
} else if (t_1 <= -5e+31) {
tmp = (z / y) * y;
} else if (t_1 <= 2e+304) {
tmp = (a / y) * y;
} 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 <= -1e+308: tmp = i * y elif t_1 <= -5e+31: tmp = (z / y) * y elif t_1 <= 2e+304: tmp = (a / y) * y 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 <= -1e+308) tmp = Float64(i * y); elseif (t_1 <= -5e+31) tmp = Float64(Float64(z / y) * y); elseif (t_1 <= 2e+304) tmp = Float64(Float64(a / y) * y); 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 <= -1e+308) tmp = i * y; elseif (t_1 <= -5e+31) tmp = (z / y) * y; elseif (t_1 <= 2e+304) tmp = (a / y) * y; 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, -1e+308], N[(i * y), $MachinePrecision], If[LessEqual[t$95$1, -5e+31], N[(N[(z / y), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[t$95$1, 2e+304], N[(N[(a / y), $MachinePrecision] * y), $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 -1 \cdot 10^{+308}:\\
\;\;\;\;i \cdot y\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+31}:\\
\;\;\;\;\frac{z}{y} \cdot y\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+304}:\\
\;\;\;\;\frac{a}{y} \cdot y\\
\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)) < -1e308 or 1.9999999999999999e304 < (+.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-*.f6492.2
Applied rewrites92.2%
if -1e308 < (+.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.00000000000000027e31Initial program 99.8%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites60.1%
Taylor expanded in b around inf
Applied rewrites25.8%
Taylor expanded in z around inf
Applied rewrites7.5%
if -5.00000000000000027e31 < (+.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.9999999999999999e304Initial program 99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites68.2%
Taylor expanded in b around inf
Applied rewrites26.2%
Taylor expanded in a around inf
Applied rewrites14.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1
(+
(+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))
(* y i))))
(if (or (<= t_1 -1e+308) (not (<= t_1 2e+304))) (* i y) (fma (/ a z) z z))))
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 <= -1e+308) || !(t_1 <= 2e+304)) {
tmp = i * y;
} else {
tmp = fma((a / z), z, z);
}
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 <= -1e+308) || !(t_1 <= 2e+304)) tmp = Float64(i * y); else tmp = fma(Float64(a / z), z, z); 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, -1e+308], N[Not[LessEqual[t$95$1, 2e+304]], $MachinePrecision]], N[(i * y), $MachinePrecision], N[(N[(a / z), $MachinePrecision] * z + z), $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 -1 \cdot 10^{+308} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+304}\right):\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\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)) < -1e308 or 1.9999999999999999e304 < (+.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-*.f6492.2
Applied rewrites92.2%
if -1e308 < (+.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.9999999999999999e304Initial program 99.8%
Taylor expanded in z around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites71.9%
Taylor expanded in a around inf
Applied rewrites29.8%
Final simplification39.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<=
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i))
-2e+119)
(fma (/ (* i y) z) z z)
(+ (* (+ (/ z i) y) i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i)) <= -2e+119) {
tmp = fma(((i * y) / z), z, z);
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) <= -2e+119) tmp = fma(Float64(Float64(i * y) / z), z, z); else tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], -2e+119], N[(N[(N[(i * y), $MachinePrecision] / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i \leq -2 \cdot 10^{+119}:\\
\;\;\;\;\mathsf{fma}\left(\frac{i \cdot y}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + 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)) < -1.99999999999999989e119Initial program 99.8%
Taylor expanded in z around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites72.0%
Taylor expanded in y around inf
Applied rewrites28.7%
if -1.99999999999999989e119 < (+.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 t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites84.3%
Taylor expanded in i around inf
Applied rewrites65.2%
Taylor expanded in z around inf
Applied rewrites47.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1e+56)
(+ (fma i y (fma (log y) x (fma -0.5 (log c) z))) a)
(if (<= x 5.6e+173)
(+ (+ a t) (fma (- b 0.5) (log c) (fma i y z)))
(+ (+ a z) (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 <= -1e+56) {
tmp = fma(i, y, fma(log(y), x, fma(-0.5, log(c), z))) + a;
} else if (x <= 5.6e+173) {
tmp = (a + t) + fma((b - 0.5), log(c), fma(i, y, z));
} else {
tmp = (a + z) + 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 <= -1e+56) tmp = Float64(fma(i, y, fma(log(y), x, fma(-0.5, log(c), z))) + a); elseif (x <= 5.6e+173) tmp = Float64(Float64(a + t) + fma(Float64(b - 0.5), log(c), fma(i, y, z))); else tmp = Float64(Float64(a + z) + 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, -1e+56], N[(N[(i * y + N[(N[Log[y], $MachinePrecision] * x + N[(-0.5 * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[x, 5.6e+173], N[(N[(a + t), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(i * y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + z), $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 -1 \cdot 10^{+56}:\\
\;\;\;\;\mathsf{fma}\left(i, y, \mathsf{fma}\left(\log y, x, \mathsf{fma}\left(-0.5, \log c, z\right)\right)\right) + a\\
\mathbf{elif}\;x \leq 5.6 \cdot 10^{+173}:\\
\;\;\;\;\left(a + t\right) + \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(i, y, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\\
\end{array}
\end{array}
if x < -1.00000000000000009e56Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites95.2%
Taylor expanded in b around 0
Applied rewrites90.1%
if -1.00000000000000009e56 < x < 5.59999999999999964e173Initial 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.1
Applied rewrites97.1%
if 5.59999999999999964e173 < x Initial program 99.7%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites92.5%
Taylor expanded in y around 0
Applied rewrites89.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4.4e-84) (+ (+ a z) (fma (log c) (- b 0.5) (* (log y) x))) (+ (+ 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.4e-84) {
tmp = (a + z) + fma(log(c), (b - 0.5), (log(y) * x));
} 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.4e-84) tmp = Float64(Float64(a + z) + fma(log(c), Float64(b - 0.5), Float64(log(y) * x))); 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.4e-84], N[(N[(a + z), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision] + N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]), $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.4 \cdot 10^{-84}:\\
\;\;\;\;\left(a + z\right) + \mathsf{fma}\left(\log c, b - 0.5, \log y \cdot x\right)\\
\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.3999999999999998e-84Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites84.1%
Taylor expanded in y around 0
Applied rewrites83.2%
if 4.3999999999999998e-84 < y Initial 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.f6488.6
Applied rewrites88.6%
(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.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites87.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.4e+234) (not (<= x 1.35e+249))) (* (log y) x) (+ (+ 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 <= -5.4e+234) || !(x <= 1.35e+249)) {
tmp = log(y) * x;
} 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 <= -5.4e+234) || !(x <= 1.35e+249)) tmp = Float64(log(y) * x); 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, -5.4e+234], N[Not[LessEqual[x, 1.35e+249]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $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 -5.4 \cdot 10^{+234} \lor \neg \left(x \leq 1.35 \cdot 10^{+249}\right):\\
\;\;\;\;\log y \cdot x\\
\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 < -5.4000000000000003e234 or 1.35000000000000009e249 < x Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6480.1
Applied rewrites80.1%
if -5.4000000000000003e234 < x < 1.35000000000000009e249Initial 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.f6491.1
Applied rewrites91.1%
Final simplification89.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -3e+200)
(+ (* (+ (/ (* x (log y)) i) y) i) a)
(if (<= x 1.35e+249)
(+ (+ 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 <= -3e+200) {
tmp = ((((x * log(y)) / i) + y) * i) + a;
} else if (x <= 1.35e+249) {
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 <= -3e+200) tmp = Float64(Float64(Float64(Float64(Float64(x * log(y)) / i) + y) * i) + a); elseif (x <= 1.35e+249) 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, -3e+200], N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[x, 1.35e+249], 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 -3 \cdot 10^{+200}:\\
\;\;\;\;\left(\frac{x \cdot \log y}{i} + y\right) \cdot i + a\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+249}:\\
\;\;\;\;\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 < -2.99999999999999991e200Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites99.2%
Taylor expanded in i around inf
Applied rewrites76.2%
Taylor expanded in x around inf
Applied rewrites71.2%
if -2.99999999999999991e200 < x < 1.35000000000000009e249Initial 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.f6491.7
Applied rewrites91.7%
if 1.35000000000000009e249 < x Initial program 99.6%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.6
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6486.2
Applied rewrites86.2%
Final simplification89.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.4e+234) (not (<= x 1.35e+249))) (* (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.4e+234) || !(x <= 1.35e+249)) {
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.4e+234) || !(x <= 1.35e+249)) 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.4e+234], N[Not[LessEqual[x, 1.35e+249]], $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.4 \cdot 10^{+234} \lor \neg \left(x \leq 1.35 \cdot 10^{+249}\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.4000000000000003e234 or 1.35000000000000009e249 < x Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6480.1
Applied rewrites80.1%
if -5.4000000000000003e234 < x < 1.35000000000000009e249Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites86.3%
Taylor expanded in x around 0
Applied rewrites77.9%
Final simplification78.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -1.7e+169) (not (<= b 1.5e+140))) (* (log c) b) (+ (* (+ (/ z i) y) i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.7e+169) || !(b <= 1.5e+140)) {
tmp = log(c) * b;
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((b <= (-1.7d+169)) .or. (.not. (b <= 1.5d+140))) then
tmp = log(c) * b
else
tmp = (((z / i) + y) * i) + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.7e+169) || !(b <= 1.5e+140)) {
tmp = Math.log(c) * b;
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -1.7e+169) or not (b <= 1.5e+140): tmp = math.log(c) * b else: tmp = (((z / i) + y) * i) + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -1.7e+169) || !(b <= 1.5e+140)) tmp = Float64(log(c) * b); else tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -1.7e+169) || ~((b <= 1.5e+140))) tmp = log(c) * b; else tmp = (((z / i) + y) * i) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.7e+169], N[Not[LessEqual[b, 1.5e+140]], $MachinePrecision]], N[(N[Log[c], $MachinePrecision] * b), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+169} \lor \neg \left(b \leq 1.5 \cdot 10^{+140}\right):\\
\;\;\;\;\log c \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
\end{array}
\end{array}
if b < -1.70000000000000014e169 or 1.49999999999999998e140 < b Initial program 99.6%
Taylor expanded in b around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6462.9
Applied rewrites62.9%
if -1.70000000000000014e169 < b < 1.49999999999999998e140Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites85.9%
Taylor expanded in i around inf
Applied rewrites68.2%
Taylor expanded in z around inf
Applied rewrites55.8%
Final simplification57.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.5e+230) (not (<= x 1.6e+220))) (* (log y) x) (+ (* (+ (/ z i) y) i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.5e+230) || !(x <= 1.6e+220)) {
tmp = log(y) * x;
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-3.5d+230)) .or. (.not. (x <= 1.6d+220))) then
tmp = log(y) * x
else
tmp = (((z / i) + y) * i) + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -3.5e+230) || !(x <= 1.6e+220)) {
tmp = Math.log(y) * x;
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.5e+230) or not (x <= 1.6e+220): tmp = math.log(y) * x else: tmp = (((z / i) + y) * i) + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -3.5e+230) || !(x <= 1.6e+220)) tmp = Float64(log(y) * x); else tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -3.5e+230) || ~((x <= 1.6e+220))) tmp = log(y) * x; else tmp = (((z / i) + y) * i) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.5e+230], N[Not[LessEqual[x, 1.6e+220]], $MachinePrecision]], N[(N[Log[y], $MachinePrecision] * x), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+230} \lor \neg \left(x \leq 1.6 \cdot 10^{+220}\right):\\
\;\;\;\;\log y \cdot x\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
\end{array}
\end{array}
if x < -3.5e230 or 1.59999999999999994e220 < x Initial program 99.7%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.7
lift-+.f64N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6499.7
Applied rewrites99.7%
Taylor expanded in x around inf
*-commutativeN/A
lower-*.f64N/A
lower-log.f6473.0
Applied rewrites73.0%
if -3.5e230 < x < 1.59999999999999994e220Initial program 99.9%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites86.4%
Taylor expanded in i around inf
Applied rewrites65.7%
Taylor expanded in z around inf
Applied rewrites53.4%
Final simplification56.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -7.5e+174) (fma (/ a z) z z) (+ (* (+ (/ z i) y) i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -7.5e+174) {
tmp = fma((a / z), z, z);
} else {
tmp = (((z / i) + y) * i) + a;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -7.5e+174) tmp = fma(Float64(a / z), z, z); else tmp = Float64(Float64(Float64(Float64(z / i) + y) * i) + a); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7.5e+174], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(N[(N[(z / i), $MachinePrecision] + y), $MachinePrecision] * i), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+174}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{i} + y\right) \cdot i + a\\
\end{array}
\end{array}
if z < -7.5000000000000004e174Initial program 99.9%
Taylor expanded in z around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites99.9%
Taylor expanded in a around inf
Applied rewrites63.4%
if -7.5000000000000004e174 < z Initial program 99.8%
Taylor expanded in t around 0
+-commutativeN/A
lower-+.f64N/A
Applied rewrites88.2%
Taylor expanded in i around inf
Applied rewrites66.2%
Taylor expanded in z around inf
Applied rewrites49.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.6e+134) (fma (/ a z) z z) (* (+ (/ a y) i) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.6e+134) {
tmp = fma((a / z), z, z);
} else {
tmp = ((a / y) + i) * y;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.6e+134) tmp = fma(Float64(a / z), z, z); else tmp = Float64(Float64(Float64(a / y) + i) * y); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.6e+134], N[(N[(a / z), $MachinePrecision] * z + z), $MachinePrecision], N[(N[(N[(a / y), $MachinePrecision] + i), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+134}:\\
\;\;\;\;\mathsf{fma}\left(\frac{a}{z}, z, z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{a}{y} + i\right) \cdot y\\
\end{array}
\end{array}
if z < -1.6e134Initial program 99.8%
Taylor expanded in z around inf
+-commutativeN/A
distribute-rgt-inN/A
*-lft-identityN/A
lower-fma.f64N/A
Applied rewrites99.8%
Taylor expanded in a around inf
Applied rewrites50.7%
if -1.6e134 < z Initial program 99.9%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites71.2%
Taylor expanded in a around inf
Applied rewrites35.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.4e+208) (* i y) (* (/ a y) y)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.4e+208) {
tmp = i * y;
} else {
tmp = (a / y) * 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 (a <= 2.4d+208) then
tmp = i * y
else
tmp = (a / y) * 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 (a <= 2.4e+208) {
tmp = i * y;
} else {
tmp = (a / y) * y;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.4e+208: tmp = i * y else: tmp = (a / y) * y return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.4e+208) tmp = Float64(i * y); else tmp = Float64(Float64(a / y) * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.4e+208) tmp = i * y; else tmp = (a / y) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.4e+208], N[(i * y), $MachinePrecision], N[(N[(a / y), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{+208}:\\
\;\;\;\;i \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{y} \cdot y\\
\end{array}
\end{array}
if a < 2.39999999999999987e208Initial program 99.8%
Taylor expanded in y around inf
lower-*.f6425.2
Applied rewrites25.2%
if 2.39999999999999987e208 < a Initial program 100.0%
Taylor expanded in y around inf
*-commutativeN/A
lower-*.f64N/A
Applied rewrites86.4%
Taylor expanded in b around inf
Applied rewrites26.7%
Taylor expanded in a around inf
Applied rewrites58.5%
(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.8%
Taylor expanded in y around inf
lower-*.f6425.2
Applied rewrites25.2%
herbie shell --seed 2024339
(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)))