
(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 18 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 (+ t (fma y i (fma x (log y) (+ a (fma (+ b -0.5) (log c) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return t + fma(y, i, fma(x, log(y), (a + fma((b + -0.5), log(c), z))));
}
function code(x, y, z, t, a, b, c, i) return Float64(t + fma(y, i, fma(x, log(y), Float64(a + fma(Float64(b + -0.5), log(c), z))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(t + N[(y * i + N[(x * N[Log[y], $MachinePrecision] + N[(a + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
t + \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, a + \mathsf{fma}\left(b + -0.5, \log c, z\right)\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.2e+181) (not (<= x 8.5e+187))) (+ t (+ (* (log c) (- b 0.5)) (+ a (+ z (* x (log y)))))) (+ (* y i) (+ a (fma (log c) (+ b -0.5) (+ t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.2e+181) || !(x <= 8.5e+187)) {
tmp = t + ((log(c) * (b - 0.5)) + (a + (z + (x * log(y)))));
} else {
tmp = (y * i) + (a + fma(log(c), (b + -0.5), (t + z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.2e+181) || !(x <= 8.5e+187)) tmp = Float64(t + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + Float64(x * log(y)))))); else tmp = Float64(Float64(y * i) + Float64(a + fma(log(c), Float64(b + -0.5), Float64(t + z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.2e+181], N[Not[LessEqual[x, 8.5e+187]], $MachinePrecision]], N[(t + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+181} \lor \neg \left(x \leq 8.5 \cdot 10^{+187}\right):\\
\;\;\;\;t + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + x \cdot \log y\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \mathsf{fma}\left(\log c, b + -0.5, t + z\right)\right)\\
\end{array}
\end{array}
if x < -4.19999999999999995e181 or 8.49999999999999989e187 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
associate-+l+99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 87.6%
if -4.19999999999999995e181 < x < 8.49999999999999989e187Initial program 99.8%
Taylor expanded in x around 0 98.0%
associate-+r+98.0%
+-commutative98.0%
associate-+r+98.0%
*-commutative98.0%
fma-def98.0%
sub-neg98.0%
metadata-eval98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Final simplification96.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (or (<= x -6.2e+181) (not (<= x 3.6e+189)))
(+ t (+ t_1 (+ z (* x (log y)))))
(+ (* y i) (+ t_1 (+ a (+ t z)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double tmp;
if ((x <= -6.2e+181) || !(x <= 3.6e+189)) {
tmp = t + (t_1 + (z + (x * log(y))));
} else {
tmp = (y * i) + (t_1 + (a + (t + z)));
}
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 = log(c) * (b - 0.5d0)
if ((x <= (-6.2d+181)) .or. (.not. (x <= 3.6d+189))) then
tmp = t + (t_1 + (z + (x * log(y))))
else
tmp = (y * i) + (t_1 + (a + (t + z)))
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 = Math.log(c) * (b - 0.5);
double tmp;
if ((x <= -6.2e+181) || !(x <= 3.6e+189)) {
tmp = t + (t_1 + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (t_1 + (a + (t + z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if (x <= -6.2e+181) or not (x <= 3.6e+189): tmp = t + (t_1 + (z + (x * math.log(y)))) else: tmp = (y * i) + (t_1 + (a + (t + z))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if ((x <= -6.2e+181) || !(x <= 3.6e+189)) tmp = Float64(t + Float64(t_1 + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(t + z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); tmp = 0.0; if ((x <= -6.2e+181) || ~((x <= 3.6e+189))) tmp = t + (t_1 + (z + (x * log(y)))); else tmp = (y * i) + (t_1 + (a + (t + z))); end tmp_2 = 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]), $MachinePrecision]}, If[Or[LessEqual[x, -6.2e+181], N[Not[LessEqual[x, 3.6e+189]], $MachinePrecision]], N[(t + N[(t$95$1 + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -6.2 \cdot 10^{+181} \lor \neg \left(x \leq 3.6 \cdot 10^{+189}\right):\\
\;\;\;\;t + \left(t_1 + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t_1 + \left(a + \left(t + z\right)\right)\right)\\
\end{array}
\end{array}
if x < -6.19999999999999978e181 or 3.60000000000000008e189 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
associate-+l+99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 87.6%
Taylor expanded in a around 0 81.7%
if -6.19999999999999978e181 < x < 3.60000000000000008e189Initial program 99.8%
Taylor expanded in x around 0 98.0%
Final simplification94.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.5e+181) (not (<= x 2.5e+189))) (+ t (+ (* (log c) (- b 0.5)) (+ z (* x (log y))))) (+ t (+ (fma (+ b -0.5) (log c) a) (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.5e+181) || !(x <= 2.5e+189)) {
tmp = t + ((log(c) * (b - 0.5)) + (z + (x * log(y))));
} else {
tmp = t + (fma((b + -0.5), log(c), a) + (z + (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.5e+181) || !(x <= 2.5e+189)) tmp = Float64(t + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(z + Float64(x * log(y))))); else tmp = Float64(t + Float64(fma(Float64(b + -0.5), log(c), a) + Float64(z + Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.5e+181], N[Not[LessEqual[x, 2.5e+189]], $MachinePrecision]], N[(t + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + a), $MachinePrecision] + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+181} \lor \neg \left(x \leq 2.5 \cdot 10^{+189}\right):\\
\;\;\;\;t + \left(\log c \cdot \left(b - 0.5\right) + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(\mathsf{fma}\left(b + -0.5, \log c, a\right) + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -6.5e181 or 2.5000000000000002e189 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
associate-+l+99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 87.6%
Taylor expanded in a around 0 81.7%
if -6.5e181 < x < 2.5000000000000002e189Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 98.0%
associate-+r+98.0%
fma-def98.0%
sub-neg98.0%
metadata-eval98.0%
+-commutative98.0%
*-commutative98.0%
Simplified98.0%
Final simplification94.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5e+181) (not (<= x 6e+187))) (+ t (+ (* (log c) (- b 0.5)) (+ z (* x (log y))))) (+ (* y i) (+ a (fma (log c) (+ b -0.5) (+ t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5e+181) || !(x <= 6e+187)) {
tmp = t + ((log(c) * (b - 0.5)) + (z + (x * log(y))));
} else {
tmp = (y * i) + (a + fma(log(c), (b + -0.5), (t + z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5e+181) || !(x <= 6e+187)) tmp = Float64(t + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(a + fma(log(c), Float64(b + -0.5), Float64(t + z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5e+181], N[Not[LessEqual[x, 6e+187]], $MachinePrecision]], N[(t + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+181} \lor \neg \left(x \leq 6 \cdot 10^{+187}\right):\\
\;\;\;\;t + \left(\log c \cdot \left(b - 0.5\right) + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \mathsf{fma}\left(\log c, b + -0.5, t + z\right)\right)\\
\end{array}
\end{array}
if x < -5.0000000000000003e181 or 5.9999999999999998e187 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
associate-+l+99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 87.6%
Taylor expanded in a around 0 81.7%
if -5.0000000000000003e181 < x < 5.9999999999999998e187Initial program 99.8%
Taylor expanded in x around 0 98.0%
associate-+r+98.0%
+-commutative98.0%
associate-+r+98.0%
*-commutative98.0%
fma-def98.0%
sub-neg98.0%
metadata-eval98.0%
+-commutative98.0%
+-commutative98.0%
Simplified98.0%
Final simplification94.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* (log c) (- b 0.5))))
(if (<= x -1.15e+223)
(+ t (fma y i t_1))
(if (<= x 4.3e+192)
(+ (* y i) (+ t_2 (+ a (+ t z))))
(+ t (+ t_2 (+ a t_1)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = log(c) * (b - 0.5);
double tmp;
if (x <= -1.15e+223) {
tmp = t + fma(y, i, t_1);
} else if (x <= 4.3e+192) {
tmp = (y * i) + (t_2 + (a + (t + z)));
} else {
tmp = t + (t_2 + (a + t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (x <= -1.15e+223) tmp = Float64(t + fma(y, i, t_1)); elseif (x <= 4.3e+192) tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(a + Float64(t + z)))); else tmp = Float64(t + Float64(t_2 + Float64(a + t_1))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.15e+223], N[(t + N[(y * i + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.3e+192], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(t$95$2 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -1.15 \cdot 10^{+223}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, t_1\right)\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+192}:\\
\;\;\;\;y \cdot i + \left(t_2 + \left(a + \left(t + z\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(t_2 + \left(a + t_1\right)\right)\\
\end{array}
\end{array}
if x < -1.15000000000000002e223Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
associate-+l+99.6%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 83.9%
if -1.15000000000000002e223 < x < 4.29999999999999976e192Initial program 99.8%
Taylor expanded in x around 0 96.6%
if 4.29999999999999976e192 < x Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-def99.5%
associate-+l+99.5%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 92.6%
Taylor expanded in z around 0 85.4%
Final simplification94.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.3e+222) (not (<= x 1.45e+194))) (+ t (fma y i (* x (log y)))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.3e+222) || !(x <= 1.45e+194)) {
tmp = t + fma(y, i, (x * log(y)));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + z)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.3e+222) || !(x <= 1.45e+194)) tmp = Float64(t + fma(y, i, Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + z)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.3e+222], N[Not[LessEqual[x, 1.45e+194]], $MachinePrecision]], N[(t + N[(y * i + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+222} \lor \neg \left(x \leq 1.45 \cdot 10^{+194}\right):\\
\;\;\;\;t + \mathsf{fma}\left(y, i, x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.3000000000000001e222 or 1.45e194 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
associate-+l+99.6%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around inf 82.0%
if -1.3000000000000001e222 < x < 1.45e194Initial program 99.8%
Taylor expanded in x around 0 96.6%
Final simplification94.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.2e+222) (not (<= x 2.05e+194))) (+ t (* x (log y))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ t z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.2e+222) || !(x <= 2.05e+194)) {
tmp = t + (x * log(y));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + z)));
}
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 <= (-5.2d+222)) .or. (.not. (x <= 2.05d+194))) then
tmp = t + (x * log(y))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (t + z)))
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 <= -5.2e+222) || !(x <= 2.05e+194)) {
tmp = t + (x * Math.log(y));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (t + z)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.2e+222) or not (x <= 2.05e+194): tmp = t + (x * math.log(y)) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (t + z))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.2e+222) || !(x <= 2.05e+194)) tmp = Float64(t + Float64(x * log(y))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5.2e+222) || ~((x <= 2.05e+194))) tmp = t + (x * log(y)); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (t + z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.2e+222], N[Not[LessEqual[x, 2.05e+194]], $MachinePrecision]], N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.2 \cdot 10^{+222} \lor \neg \left(x \leq 2.05 \cdot 10^{+194}\right):\\
\;\;\;\;t + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + z\right)\right)\right)\\
\end{array}
\end{array}
if x < -5.2000000000000002e222 or 2.05e194 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
associate-+l+99.6%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 89.6%
Taylor expanded in x around inf 71.9%
if -5.2000000000000002e222 < x < 2.05e194Initial program 99.8%
Taylor expanded in x around 0 96.6%
Final simplification92.7%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= i -2.1e+178)
(and (not (<= i 8.5e+110))
(or (<= i 1.9e+191) (not (<= i 1.9e+264)))))
(+ t (fma y i a))
(+ (* (log c) (- b 0.5)) (+ a z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -2.1e+178) || (!(i <= 8.5e+110) && ((i <= 1.9e+191) || !(i <= 1.9e+264)))) {
tmp = t + fma(y, i, a);
} else {
tmp = (log(c) * (b - 0.5)) + (a + z);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -2.1e+178) || (!(i <= 8.5e+110) && ((i <= 1.9e+191) || !(i <= 1.9e+264)))) tmp = Float64(t + fma(y, i, a)); else tmp = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -2.1e+178], And[N[Not[LessEqual[i, 8.5e+110]], $MachinePrecision], Or[LessEqual[i, 1.9e+191], N[Not[LessEqual[i, 1.9e+264]], $MachinePrecision]]]], N[(t + N[(y * i + a), $MachinePrecision]), $MachinePrecision], N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -2.1 \cdot 10^{+178} \lor \neg \left(i \leq 8.5 \cdot 10^{+110}\right) \land \left(i \leq 1.9 \cdot 10^{+191} \lor \neg \left(i \leq 1.9 \cdot 10^{+264}\right)\right):\\
\;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\
\mathbf{else}:\\
\;\;\;\;\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
\end{array}
\end{array}
if i < -2.0999999999999999e178 or 8.5000000000000004e110 < i < 1.8999999999999999e191 or 1.9000000000000001e264 < i Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 79.0%
if -2.0999999999999999e178 < i < 8.5000000000000004e110 or 1.8999999999999999e191 < i < 1.9000000000000001e264Initial program 99.7%
Taylor expanded in x around 0 85.0%
Taylor expanded in y around 0 76.5%
Taylor expanded in t around 0 56.2%
Final simplification61.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* (log c) (- b 0.5)) (+ a z))) (t_2 (+ t (fma y i a))))
(if (<= i -1.06e+178)
t_2
(if (<= i 2.5e+118)
(+ t t_1)
(if (or (<= i 4.2e+191) (not (<= i 5e+264))) t_2 t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (log(c) * (b - 0.5)) + (a + z);
double t_2 = t + fma(y, i, a);
double tmp;
if (i <= -1.06e+178) {
tmp = t_2;
} else if (i <= 2.5e+118) {
tmp = t + t_1;
} else if ((i <= 4.2e+191) || !(i <= 5e+264)) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z)) t_2 = Float64(t + fma(y, i, a)) tmp = 0.0 if (i <= -1.06e+178) tmp = t_2; elseif (i <= 2.5e+118) tmp = Float64(t + t_1); elseif ((i <= 4.2e+191) || !(i <= 5e+264)) tmp = t_2; else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(y * i + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -1.06e+178], t$95$2, If[LessEqual[i, 2.5e+118], N[(t + t$95$1), $MachinePrecision], If[Or[LessEqual[i, 4.2e+191], N[Not[LessEqual[i, 5e+264]], $MachinePrecision]], t$95$2, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right) + \left(a + z\right)\\
t_2 := t + \mathsf{fma}\left(y, i, a\right)\\
\mathbf{if}\;i \leq -1.06 \cdot 10^{+178}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;i \leq 2.5 \cdot 10^{+118}:\\
\;\;\;\;t + t_1\\
\mathbf{elif}\;i \leq 4.2 \cdot 10^{+191} \lor \neg \left(i \leq 5 \cdot 10^{+264}\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if i < -1.05999999999999994e178 or 2.49999999999999986e118 < i < 4.2000000000000001e191 or 5.00000000000000033e264 < i Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 79.0%
if -1.05999999999999994e178 < i < 2.49999999999999986e118Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 91.6%
Taylor expanded in x around 0 76.6%
if 4.2000000000000001e191 < i < 5.00000000000000033e264Initial program 99.7%
Taylor expanded in x around 0 89.7%
Taylor expanded in y around 0 75.7%
Taylor expanded in t around 0 64.7%
Final simplification76.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.9e+223) (not (<= x 2.05e+194))) (+ t (* x (log y))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.9e+223) || !(x <= 2.05e+194)) {
tmp = t + (x * log(y));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + z));
}
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 <= (-2.9d+223)) .or. (.not. (x <= 2.05d+194))) then
tmp = t + (x * log(y))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (a + z))
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 <= -2.9e+223) || !(x <= 2.05e+194)) {
tmp = t + (x * Math.log(y));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.9e+223) or not (x <= 2.05e+194): tmp = t + (x * math.log(y)) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.9e+223) || !(x <= 2.05e+194)) tmp = Float64(t + Float64(x * log(y))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.9e+223) || ~((x <= 2.05e+194))) tmp = t + (x * log(y)); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.9e+223], N[Not[LessEqual[x, 2.05e+194]], $MachinePrecision]], N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.9 \cdot 10^{+223} \lor \neg \left(x \leq 2.05 \cdot 10^{+194}\right):\\
\;\;\;\;t + x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + z\right)\right)\\
\end{array}
\end{array}
if x < -2.9000000000000002e223 or 2.05e194 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-def99.6%
associate-+l+99.6%
fma-def99.6%
+-commutative99.6%
associate-+l+99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in y around 0 89.6%
Taylor expanded in x around inf 71.9%
if -2.9000000000000002e223 < x < 2.05e194Initial program 99.8%
Taylor expanded in x around 0 96.6%
Taylor expanded in t around 0 75.6%
Final simplification75.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.8e+23) (+ t z) (if (<= a 5e+120) (+ t (* x (log y))) (if (<= a 1.2e+157) z (+ t a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.8e+23) {
tmp = t + z;
} else if (a <= 5e+120) {
tmp = t + (x * log(y));
} else if (a <= 1.2e+157) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.8d+23) then
tmp = t + z
else if (a <= 5d+120) then
tmp = t + (x * log(y))
else if (a <= 1.2d+157) then
tmp = z
else
tmp = t + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.8e+23) {
tmp = t + z;
} else if (a <= 5e+120) {
tmp = t + (x * Math.log(y));
} else if (a <= 1.2e+157) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.8e+23: tmp = t + z elif a <= 5e+120: tmp = t + (x * math.log(y)) elif a <= 1.2e+157: tmp = z else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.8e+23) tmp = Float64(t + z); elseif (a <= 5e+120) tmp = Float64(t + Float64(x * log(y))); elseif (a <= 1.2e+157) tmp = z; else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.8e+23) tmp = t + z; elseif (a <= 5e+120) tmp = t + (x * log(y)); elseif (a <= 1.2e+157) tmp = z; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.8e+23], N[(t + z), $MachinePrecision], If[LessEqual[a, 5e+120], N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e+157], z, N[(t + a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.8 \cdot 10^{+23}:\\
\;\;\;\;t + z\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+120}:\\
\;\;\;\;t + x \cdot \log y\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+157}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if a < 1.7999999999999999e23Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
fma-def99.7%
associate-+l+99.7%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 78.3%
Taylor expanded in z around inf 35.7%
if 1.7999999999999999e23 < a < 5.00000000000000019e120Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 83.5%
Taylor expanded in x around inf 45.2%
if 5.00000000000000019e120 < a < 1.2e157Initial program 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 34.6%
if 1.2e157 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 80.4%
Taylor expanded in a around inf 60.1%
Final simplification39.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.6e+174) (+ t z) (+ t (fma 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 <= -3.6e+174) {
tmp = t + z;
} else {
tmp = t + fma(y, i, a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.6e+174) tmp = Float64(t + z); else tmp = Float64(t + fma(y, i, a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.6e+174], N[(t + z), $MachinePrecision], N[(t + N[(y * i + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+174}:\\
\;\;\;\;t + z\\
\mathbf{else}:\\
\;\;\;\;t + \mathsf{fma}\left(y, i, a\right)\\
\end{array}
\end{array}
if z < -3.6000000000000002e174Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
fma-def100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 91.4%
Taylor expanded in z around inf 84.9%
if -3.6000000000000002e174 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 59.2%
Final simplification61.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.28e+157) z (+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.28e+157) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.28d+157) then
tmp = z
else
tmp = t + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.28e+157) {
tmp = z;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.28e+157: tmp = z else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.28e+157) tmp = z; else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.28e+157) tmp = z; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.28e+157], z, N[(t + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.28 \cdot 10^{+157}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if a < 1.28000000000000001e157Initial program 99.8%
Taylor expanded in x around 0 84.8%
Taylor expanded in z around inf 18.6%
if 1.28000000000000001e157 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 80.4%
Taylor expanded in a around inf 60.1%
Final simplification23.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 7e+156) (+ t z) (+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7e+156) {
tmp = t + z;
} else {
tmp = t + a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 7d+156) then
tmp = t + z
else
tmp = t + a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 7e+156) {
tmp = t + z;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 7e+156: tmp = t + z else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 7e+156) tmp = Float64(t + z); else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 7e+156) tmp = t + z; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 7e+156], N[(t + z), $MachinePrecision], N[(t + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 7 \cdot 10^{+156}:\\
\;\;\;\;t + z\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if a < 7.0000000000000006e156Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
fma-def99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 79.3%
Taylor expanded in z around inf 37.2%
if 7.0000000000000006e156 < a Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 80.4%
Taylor expanded in a around inf 60.1%
Final simplification39.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.2e+157) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.2e+157) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.2d+157) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.2e+157) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.2e+157: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.2e+157) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.2e+157) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.2e+157], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.2 \cdot 10^{+157}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.2e157Initial program 99.8%
Taylor expanded in x around 0 84.8%
Taylor expanded in z around inf 18.6%
if 1.2e157 < a Initial program 99.9%
Taylor expanded in x around 0 93.1%
Taylor expanded in a around inf 50.2%
Final simplification22.2%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 85.7%
Taylor expanded in a around inf 18.0%
Final simplification18.0%
herbie shell --seed 2023230
(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)))