
(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 21 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 (+ b -0.5) (log c) (+ z (fma x (log y) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b + -0.5), log(c), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(t + a))))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
fma-define99.5%
+-commutative99.5%
fma-define99.5%
sub-neg99.5%
metadata-eval99.5%
+-commutative99.5%
Simplified99.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))) (t_2 (+ (* y i) (+ (* x (log y)) t_1))))
(if (<= x -1.02e+228)
t_2
(if (<= x 3.25e+142)
(+ (* y i) (+ t_1 (+ a (+ z t))))
(if (or (<= x 1.92e+177) (not (<= x 1.3e+246)))
t_2
(+ (* y i) (+ (+ z a) (* (+ b -0.5) (log c)))))))))
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 t_2 = (y * i) + ((x * log(y)) + t_1);
double tmp;
if (x <= -1.02e+228) {
tmp = t_2;
} else if (x <= 3.25e+142) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else if ((x <= 1.92e+177) || !(x <= 1.3e+246)) {
tmp = t_2;
} else {
tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
t_2 = (y * i) + ((x * log(y)) + t_1)
if (x <= (-1.02d+228)) then
tmp = t_2
else if (x <= 3.25d+142) then
tmp = (y * i) + (t_1 + (a + (z + t)))
else if ((x <= 1.92d+177) .or. (.not. (x <= 1.3d+246))) then
tmp = t_2
else
tmp = (y * i) + ((z + a) + ((b + (-0.5d0)) * log(c)))
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 t_2 = (y * i) + ((x * Math.log(y)) + t_1);
double tmp;
if (x <= -1.02e+228) {
tmp = t_2;
} else if (x <= 3.25e+142) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else if ((x <= 1.92e+177) || !(x <= 1.3e+246)) {
tmp = t_2;
} else {
tmp = (y * i) + ((z + a) + ((b + -0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) t_2 = (y * i) + ((x * math.log(y)) + t_1) tmp = 0 if x <= -1.02e+228: tmp = t_2 elif x <= 3.25e+142: tmp = (y * i) + (t_1 + (a + (z + t))) elif (x <= 1.92e+177) or not (x <= 1.3e+246): tmp = t_2 else: tmp = (y * i) + ((z + a) + ((b + -0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) t_2 = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)) tmp = 0.0 if (x <= -1.02e+228) tmp = t_2; elseif (x <= 3.25e+142) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); elseif ((x <= 1.92e+177) || !(x <= 1.3e+246)) tmp = t_2; else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); t_2 = (y * i) + ((x * log(y)) + t_1); tmp = 0.0; if (x <= -1.02e+228) tmp = t_2; elseif (x <= 3.25e+142) tmp = (y * i) + (t_1 + (a + (z + t))); elseif ((x <= 1.92e+177) || ~((x <= 1.3e+246))) tmp = t_2; else tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c))); 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]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.02e+228], t$95$2, If[LessEqual[x, 3.25e+142], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 1.92e+177], N[Not[LessEqual[x, 1.3e+246]], $MachinePrecision]], t$95$2, N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := y \cdot i + \left(x \cdot \log y + t\_1\right)\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+228}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{+142}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{elif}\;x \leq 1.92 \cdot 10^{+177} \lor \neg \left(x \leq 1.3 \cdot 10^{+246}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -1.02e228 or 3.2499999999999999e142 < x < 1.9200000000000001e177 or 1.30000000000000007e246 < x Initial program 97.4%
associate-+l+97.4%
+-commutative97.4%
associate-+r+97.4%
fma-undefine97.4%
add-cube-cbrt96.2%
pow296.2%
Applied egg-rr96.2%
Taylor expanded in x around inf 92.8%
if -1.02e228 < x < 3.2499999999999999e142Initial program 99.9%
Taylor expanded in x around 0 94.8%
if 1.9200000000000001e177 < x < 1.30000000000000007e246Initial program 99.6%
Taylor expanded in x around 0 84.0%
Taylor expanded in t around 0 76.1%
associate-+r+76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Final simplification93.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5)))
(t_2 (+ (* x (log y)) t_1))
(t_3 (+ (* y i) t_2)))
(if (<= x -8.2e+227)
t_3
(if (<= x 5.2e+95)
(+ (* y i) (+ t_1 (+ a (+ z t))))
(if (<= x 2.3e+177)
(+ a (+ t (+ z t_2)))
(if (<= x 5.2e+246)
(+ (* y i) (+ (+ z a) (* (+ b -0.5) (log c))))
t_3))))))
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 t_2 = (x * log(y)) + t_1;
double t_3 = (y * i) + t_2;
double tmp;
if (x <= -8.2e+227) {
tmp = t_3;
} else if (x <= 5.2e+95) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else if (x <= 2.3e+177) {
tmp = a + (t + (z + t_2));
} else if (x <= 5.2e+246) {
tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c)));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = log(c) * (b - 0.5d0)
t_2 = (x * log(y)) + t_1
t_3 = (y * i) + t_2
if (x <= (-8.2d+227)) then
tmp = t_3
else if (x <= 5.2d+95) then
tmp = (y * i) + (t_1 + (a + (z + t)))
else if (x <= 2.3d+177) then
tmp = a + (t + (z + t_2))
else if (x <= 5.2d+246) then
tmp = (y * i) + ((z + a) + ((b + (-0.5d0)) * log(c)))
else
tmp = t_3
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 t_2 = (x * Math.log(y)) + t_1;
double t_3 = (y * i) + t_2;
double tmp;
if (x <= -8.2e+227) {
tmp = t_3;
} else if (x <= 5.2e+95) {
tmp = (y * i) + (t_1 + (a + (z + t)));
} else if (x <= 2.3e+177) {
tmp = a + (t + (z + t_2));
} else if (x <= 5.2e+246) {
tmp = (y * i) + ((z + a) + ((b + -0.5) * Math.log(c)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) t_2 = (x * math.log(y)) + t_1 t_3 = (y * i) + t_2 tmp = 0 if x <= -8.2e+227: tmp = t_3 elif x <= 5.2e+95: tmp = (y * i) + (t_1 + (a + (z + t))) elif x <= 2.3e+177: tmp = a + (t + (z + t_2)) elif x <= 5.2e+246: tmp = (y * i) + ((z + a) + ((b + -0.5) * math.log(c))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) t_2 = Float64(Float64(x * log(y)) + t_1) t_3 = Float64(Float64(y * i) + t_2) tmp = 0.0 if (x <= -8.2e+227) tmp = t_3; elseif (x <= 5.2e+95) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(a + Float64(z + t)))); elseif (x <= 2.3e+177) tmp = Float64(a + Float64(t + Float64(z + t_2))); elseif (x <= 5.2e+246) tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = log(c) * (b - 0.5); t_2 = (x * log(y)) + t_1; t_3 = (y * i) + t_2; tmp = 0.0; if (x <= -8.2e+227) tmp = t_3; elseif (x <= 5.2e+95) tmp = (y * i) + (t_1 + (a + (z + t))); elseif (x <= 2.3e+177) tmp = a + (t + (z + t_2)); elseif (x <= 5.2e+246) tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c))); else tmp = t_3; 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]}, Block[{t$95$2 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * i), $MachinePrecision] + t$95$2), $MachinePrecision]}, If[LessEqual[x, -8.2e+227], t$95$3, If[LessEqual[x, 5.2e+95], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.3e+177], N[(a + N[(t + N[(z + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.2e+246], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := x \cdot \log y + t\_1\\
t_3 := y \cdot i + t\_2\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+227}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+95}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{+177}:\\
\;\;\;\;a + \left(t + \left(z + t\_2\right)\right)\\
\mathbf{elif}\;x \leq 5.2 \cdot 10^{+246}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -8.19999999999999992e227 or 5.20000000000000028e246 < x Initial program 97.0%
associate-+l+97.0%
+-commutative97.0%
associate-+r+97.0%
fma-undefine97.0%
add-cube-cbrt95.9%
pow295.9%
Applied egg-rr95.9%
Taylor expanded in x around inf 91.7%
if -8.19999999999999992e227 < x < 5.19999999999999981e95Initial program 99.9%
Taylor expanded in x around 0 95.9%
if 5.19999999999999981e95 < x < 2.2999999999999999e177Initial program 99.8%
Taylor expanded in y around 0 84.3%
if 2.2999999999999999e177 < x < 5.20000000000000028e246Initial program 99.6%
Taylor expanded in x around 0 84.0%
Taylor expanded in t around 0 76.1%
associate-+r+76.1%
sub-neg76.1%
metadata-eval76.1%
Simplified76.1%
Final simplification93.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= b -6.6e+209)
(+ (* y i) (+ t_1 (* (log c) (- b 0.5))))
(if (<= b 4.8e+160)
(+ (* y i) (+ (* -0.5 (log c)) (+ a (+ t (+ z t_1)))))
(+ (* y i) (+ (+ z a) (* b (log c))))))))
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 tmp;
if (b <= -6.6e+209) {
tmp = (y * i) + (t_1 + (log(c) * (b - 0.5)));
} else if (b <= 4.8e+160) {
tmp = (y * i) + ((-0.5 * log(c)) + (a + (t + (z + t_1))));
} else {
tmp = (y * i) + ((z + a) + (b * log(c)));
}
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)
if (b <= (-6.6d+209)) then
tmp = (y * i) + (t_1 + (log(c) * (b - 0.5d0)))
else if (b <= 4.8d+160) then
tmp = (y * i) + (((-0.5d0) * log(c)) + (a + (t + (z + t_1))))
else
tmp = (y * i) + ((z + a) + (b * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (b <= -6.6e+209) {
tmp = (y * i) + (t_1 + (Math.log(c) * (b - 0.5)));
} else if (b <= 4.8e+160) {
tmp = (y * i) + ((-0.5 * Math.log(c)) + (a + (t + (z + t_1))));
} else {
tmp = (y * i) + ((z + a) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if b <= -6.6e+209: tmp = (y * i) + (t_1 + (math.log(c) * (b - 0.5))) elif b <= 4.8e+160: tmp = (y * i) + ((-0.5 * math.log(c)) + (a + (t + (z + t_1)))) else: tmp = (y * i) + ((z + a) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (b <= -6.6e+209) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))); elseif (b <= 4.8e+160) tmp = Float64(Float64(y * i) + Float64(Float64(-0.5 * log(c)) + Float64(a + Float64(t + Float64(z + t_1))))); else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (b <= -6.6e+209) tmp = (y * i) + (t_1 + (log(c) * (b - 0.5))); elseif (b <= 4.8e+160) tmp = (y * i) + ((-0.5 * log(c)) + (a + (t + (z + t_1)))); else tmp = (y * i) + ((z + a) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.6e+209], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.8e+160], N[(N[(y * i), $MachinePrecision] + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;b \leq -6.6 \cdot 10^{+209}:\\
\;\;\;\;y \cdot i + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{+160}:\\
\;\;\;\;y \cdot i + \left(-0.5 \cdot \log c + \left(a + \left(t + \left(z + t\_1\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if b < -6.59999999999999961e209Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
fma-undefine99.6%
add-cube-cbrt99.5%
pow299.5%
Applied egg-rr99.5%
Taylor expanded in x around inf 97.9%
if -6.59999999999999961e209 < b < 4.8000000000000003e160Initial program 99.4%
Taylor expanded in b around 0 97.1%
*-commutative97.1%
Simplified97.1%
if 4.8000000000000003e160 < b Initial program 99.6%
Taylor expanded in x around 0 91.4%
Taylor expanded in t around 0 84.8%
associate-+r+84.8%
sub-neg84.8%
metadata-eval84.8%
Simplified84.8%
Taylor expanded in b around inf 84.8%
*-commutative84.8%
Simplified84.8%
Final simplification95.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (* (log c) (- b 0.5)) (+ a (+ t (+ z (* x (log y)))))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (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 = ((log(c) * (b - 0.5d0)) + (a + (t + (z + (x * log(y)))))) + (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 ((Math.log(c) * (b - 0.5)) + (a + (t + (z + (x * Math.log(y)))))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((math.log(c) * (b - 0.5)) + (a + (t + (z + (x * math.log(y)))))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(t + Float64(z + Float64(x * log(y)))))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((log(c) * (b - 0.5)) + (a + (t + (z + (x * log(y)))))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right)\right) + y \cdot i
\end{array}
Initial program 99.5%
Final simplification99.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c)))
(t_2 (+ (* y i) (+ z a)))
(t_3 (+ a (+ t (+ z (* x (log y))))))
(t_4 (+ (* y i) t_1)))
(if (<= (- b 0.5) -1e+212)
t_4
(if (<= (- b 0.5) -1e+157)
t_3
(if (<= (- b 0.5) -5e+51)
t_2
(if (<= (- b 0.5) -100000.0)
t_3
(if (<= (- b 0.5) -0.5)
t_2
(if (<= (- b 0.5) 5e+173)
t_3
(if (<= (- b 0.5) 3e+208) (+ a (+ z t_1)) t_4)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = (y * i) + (z + a);
double t_3 = a + (t + (z + (x * log(y))));
double t_4 = (y * i) + t_1;
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = t_4;
} else if ((b - 0.5) <= -1e+157) {
tmp = t_3;
} else if ((b - 0.5) <= -5e+51) {
tmp = t_2;
} else if ((b - 0.5) <= -100000.0) {
tmp = t_3;
} else if ((b - 0.5) <= -0.5) {
tmp = t_2;
} else if ((b - 0.5) <= 5e+173) {
tmp = t_3;
} else if ((b - 0.5) <= 3e+208) {
tmp = a + (z + t_1);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = b * log(c)
t_2 = (y * i) + (z + a)
t_3 = a + (t + (z + (x * log(y))))
t_4 = (y * i) + t_1
if ((b - 0.5d0) <= (-1d+212)) then
tmp = t_4
else if ((b - 0.5d0) <= (-1d+157)) then
tmp = t_3
else if ((b - 0.5d0) <= (-5d+51)) then
tmp = t_2
else if ((b - 0.5d0) <= (-100000.0d0)) then
tmp = t_3
else if ((b - 0.5d0) <= (-0.5d0)) then
tmp = t_2
else if ((b - 0.5d0) <= 5d+173) then
tmp = t_3
else if ((b - 0.5d0) <= 3d+208) then
tmp = a + (z + t_1)
else
tmp = t_4
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 = b * Math.log(c);
double t_2 = (y * i) + (z + a);
double t_3 = a + (t + (z + (x * Math.log(y))));
double t_4 = (y * i) + t_1;
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = t_4;
} else if ((b - 0.5) <= -1e+157) {
tmp = t_3;
} else if ((b - 0.5) <= -5e+51) {
tmp = t_2;
} else if ((b - 0.5) <= -100000.0) {
tmp = t_3;
} else if ((b - 0.5) <= -0.5) {
tmp = t_2;
} else if ((b - 0.5) <= 5e+173) {
tmp = t_3;
} else if ((b - 0.5) <= 3e+208) {
tmp = a + (z + t_1);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) t_2 = (y * i) + (z + a) t_3 = a + (t + (z + (x * math.log(y)))) t_4 = (y * i) + t_1 tmp = 0 if (b - 0.5) <= -1e+212: tmp = t_4 elif (b - 0.5) <= -1e+157: tmp = t_3 elif (b - 0.5) <= -5e+51: tmp = t_2 elif (b - 0.5) <= -100000.0: tmp = t_3 elif (b - 0.5) <= -0.5: tmp = t_2 elif (b - 0.5) <= 5e+173: tmp = t_3 elif (b - 0.5) <= 3e+208: tmp = a + (z + t_1) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(Float64(y * i) + Float64(z + a)) t_3 = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) t_4 = Float64(Float64(y * i) + t_1) tmp = 0.0 if (Float64(b - 0.5) <= -1e+212) tmp = t_4; elseif (Float64(b - 0.5) <= -1e+157) tmp = t_3; elseif (Float64(b - 0.5) <= -5e+51) tmp = t_2; elseif (Float64(b - 0.5) <= -100000.0) tmp = t_3; elseif (Float64(b - 0.5) <= -0.5) tmp = t_2; elseif (Float64(b - 0.5) <= 5e+173) tmp = t_3; elseif (Float64(b - 0.5) <= 3e+208) tmp = Float64(a + Float64(z + t_1)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); t_2 = (y * i) + (z + a); t_3 = a + (t + (z + (x * log(y)))); t_4 = (y * i) + t_1; tmp = 0.0; if ((b - 0.5) <= -1e+212) tmp = t_4; elseif ((b - 0.5) <= -1e+157) tmp = t_3; elseif ((b - 0.5) <= -5e+51) tmp = t_2; elseif ((b - 0.5) <= -100000.0) tmp = t_3; elseif ((b - 0.5) <= -0.5) tmp = t_2; elseif ((b - 0.5) <= 5e+173) tmp = t_3; elseif ((b - 0.5) <= 3e+208) tmp = a + (z + t_1); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+212], t$95$4, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+157], t$95$3, If[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+51], t$95$2, If[LessEqual[N[(b - 0.5), $MachinePrecision], -100000.0], t$95$3, If[LessEqual[N[(b - 0.5), $MachinePrecision], -0.5], t$95$2, If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+173], t$95$3, If[LessEqual[N[(b - 0.5), $MachinePrecision], 3e+208], N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := y \cdot i + \left(z + a\right)\\
t_3 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
t_4 := y \cdot i + t\_1\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+212}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;b - 0.5 \leq -1 \cdot 10^{+157}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b - 0.5 \leq -5 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b - 0.5 \leq -100000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b - 0.5 \leq -0.5:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+173}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b - 0.5 \leq 3 \cdot 10^{+208}:\\
\;\;\;\;a + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.9999999999999991e211 or 2.99999999999999995e208 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
Taylor expanded in x around 0 95.0%
Taylor expanded in b around inf 86.2%
*-commutative86.2%
Simplified86.2%
if -9.9999999999999991e211 < (-.f64 b #s(literal 1/2 binary64)) < -9.99999999999999983e156 or -5e51 < (-.f64 b #s(literal 1/2 binary64)) < -1e5 or -0.5 < (-.f64 b #s(literal 1/2 binary64)) < 5.00000000000000034e173Initial program 99.8%
Taylor expanded in y around 0 89.4%
Taylor expanded in x around inf 84.1%
if -9.99999999999999983e156 < (-.f64 b #s(literal 1/2 binary64)) < -5e51 or -1e5 < (-.f64 b #s(literal 1/2 binary64)) < -0.5Initial program 99.3%
Taylor expanded in x around 0 85.0%
Taylor expanded in t around 0 70.1%
associate-+r+70.1%
sub-neg70.1%
metadata-eval70.1%
Simplified70.1%
Taylor expanded in b around inf 67.9%
*-commutative67.9%
Simplified67.9%
Taylor expanded in b around 0 66.7%
+-commutative66.7%
Simplified66.7%
if 5.00000000000000034e173 < (-.f64 b #s(literal 1/2 binary64)) < 2.99999999999999995e208Initial program 99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in t around 0 87.8%
associate-+r+87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in b around inf 87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in i around inf 50.5%
associate-+r+50.5%
associate-/l*50.5%
Simplified50.5%
Taylor expanded in i around 0 75.3%
*-commutative75.3%
Simplified75.3%
Final simplification73.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))) (t_2 (+ a (+ t (+ z (* x (log y)))))))
(if (<= (- b 0.5) -1e+212)
(+ (* y i) t_1)
(if (<= (- b 0.5) -5e+155)
t_2
(if (<= (- b 0.5) -0.5)
(+ (* y i) (+ z a))
(if (<= (- b 0.5) 5e+173)
t_2
(if (<= (- b 0.5) 3e+208)
(+ a (+ z t_1))
(+ (* y i) (+ a t_1)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double t_2 = a + (t + (z + (x * log(y))));
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = (y * i) + t_1;
} else if ((b - 0.5) <= -5e+155) {
tmp = t_2;
} else if ((b - 0.5) <= -0.5) {
tmp = (y * i) + (z + a);
} else if ((b - 0.5) <= 5e+173) {
tmp = t_2;
} else if ((b - 0.5) <= 3e+208) {
tmp = a + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * log(c)
t_2 = a + (t + (z + (x * log(y))))
if ((b - 0.5d0) <= (-1d+212)) then
tmp = (y * i) + t_1
else if ((b - 0.5d0) <= (-5d+155)) then
tmp = t_2
else if ((b - 0.5d0) <= (-0.5d0)) then
tmp = (y * i) + (z + a)
else if ((b - 0.5d0) <= 5d+173) then
tmp = t_2
else if ((b - 0.5d0) <= 3d+208) then
tmp = a + (z + t_1)
else
tmp = (y * i) + (a + t_1)
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 = b * Math.log(c);
double t_2 = a + (t + (z + (x * Math.log(y))));
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = (y * i) + t_1;
} else if ((b - 0.5) <= -5e+155) {
tmp = t_2;
} else if ((b - 0.5) <= -0.5) {
tmp = (y * i) + (z + a);
} else if ((b - 0.5) <= 5e+173) {
tmp = t_2;
} else if ((b - 0.5) <= 3e+208) {
tmp = a + (z + t_1);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) t_2 = a + (t + (z + (x * math.log(y)))) tmp = 0 if (b - 0.5) <= -1e+212: tmp = (y * i) + t_1 elif (b - 0.5) <= -5e+155: tmp = t_2 elif (b - 0.5) <= -0.5: tmp = (y * i) + (z + a) elif (b - 0.5) <= 5e+173: tmp = t_2 elif (b - 0.5) <= 3e+208: tmp = a + (z + t_1) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) t_2 = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) tmp = 0.0 if (Float64(b - 0.5) <= -1e+212) tmp = Float64(Float64(y * i) + t_1); elseif (Float64(b - 0.5) <= -5e+155) tmp = t_2; elseif (Float64(b - 0.5) <= -0.5) tmp = Float64(Float64(y * i) + Float64(z + a)); elseif (Float64(b - 0.5) <= 5e+173) tmp = t_2; elseif (Float64(b - 0.5) <= 3e+208) tmp = Float64(a + Float64(z + t_1)); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); t_2 = a + (t + (z + (x * log(y)))); tmp = 0.0; if ((b - 0.5) <= -1e+212) tmp = (y * i) + t_1; elseif ((b - 0.5) <= -5e+155) tmp = t_2; elseif ((b - 0.5) <= -0.5) tmp = (y * i) + (z + a); elseif ((b - 0.5) <= 5e+173) tmp = t_2; elseif ((b - 0.5) <= 3e+208) tmp = a + (z + t_1); else tmp = (y * i) + (a + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+212], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+155], t$95$2, If[LessEqual[N[(b - 0.5), $MachinePrecision], -0.5], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+173], t$95$2, If[LessEqual[N[(b - 0.5), $MachinePrecision], 3e+208], N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
t_2 := a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+212}:\\
\;\;\;\;y \cdot i + t\_1\\
\mathbf{elif}\;b - 0.5 \leq -5 \cdot 10^{+155}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b - 0.5 \leq -0.5:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+173}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b - 0.5 \leq 3 \cdot 10^{+208}:\\
\;\;\;\;a + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.9999999999999991e211Initial program 99.6%
Taylor expanded in x around 0 93.6%
Taylor expanded in b around inf 92.0%
*-commutative92.0%
Simplified92.0%
if -9.9999999999999991e211 < (-.f64 b #s(literal 1/2 binary64)) < -4.9999999999999999e155 or -0.5 < (-.f64 b #s(literal 1/2 binary64)) < 5.00000000000000034e173Initial program 99.8%
Taylor expanded in y around 0 87.8%
Taylor expanded in x around inf 83.5%
if -4.9999999999999999e155 < (-.f64 b #s(literal 1/2 binary64)) < -0.5Initial program 99.3%
Taylor expanded in x around 0 83.3%
Taylor expanded in t around 0 69.1%
associate-+r+69.1%
sub-neg69.1%
metadata-eval69.1%
Simplified69.1%
Taylor expanded in b around inf 67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in b around 0 65.3%
+-commutative65.3%
Simplified65.3%
if 5.00000000000000034e173 < (-.f64 b #s(literal 1/2 binary64)) < 2.99999999999999995e208Initial program 99.4%
Taylor expanded in x around 0 99.4%
Taylor expanded in t around 0 87.8%
associate-+r+87.8%
sub-neg87.8%
metadata-eval87.8%
Simplified87.8%
Taylor expanded in b around inf 87.8%
*-commutative87.8%
Simplified87.8%
Taylor expanded in i around inf 50.5%
associate-+r+50.5%
associate-/l*50.5%
Simplified50.5%
Taylor expanded in i around 0 75.3%
*-commutative75.3%
Simplified75.3%
if 2.99999999999999995e208 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.8%
Taylor expanded in x around 0 95.9%
Taylor expanded in t around 0 90.4%
associate-+r+90.4%
sub-neg90.4%
metadata-eval90.4%
Simplified90.4%
Taylor expanded in b around inf 90.4%
*-commutative90.4%
Simplified90.4%
Taylor expanded in z around 0 90.4%
Final simplification73.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ z (* b (log c))))))
(if (<= (- b 0.5) -1e+212)
t_1
(if (<= (- b 0.5) -0.499998)
(+ (* y i) (+ z a))
(if (<= (- b 0.5) 1e+137) (+ a (+ t (+ z (* x (log y))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (z + (b * log(c)));
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = t_1;
} else if ((b - 0.5) <= -0.499998) {
tmp = (y * i) + (z + a);
} else if ((b - 0.5) <= 1e+137) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = t_1;
}
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 = (y * i) + (z + (b * log(c)))
if ((b - 0.5d0) <= (-1d+212)) then
tmp = t_1
else if ((b - 0.5d0) <= (-0.499998d0)) then
tmp = (y * i) + (z + a)
else if ((b - 0.5d0) <= 1d+137) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = t_1
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 = (y * i) + (z + (b * Math.log(c)));
double tmp;
if ((b - 0.5) <= -1e+212) {
tmp = t_1;
} else if ((b - 0.5) <= -0.499998) {
tmp = (y * i) + (z + a);
} else if ((b - 0.5) <= 1e+137) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (z + (b * math.log(c))) tmp = 0 if (b - 0.5) <= -1e+212: tmp = t_1 elif (b - 0.5) <= -0.499998: tmp = (y * i) + (z + a) elif (b - 0.5) <= 1e+137: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))) tmp = 0.0 if (Float64(b - 0.5) <= -1e+212) tmp = t_1; elseif (Float64(b - 0.5) <= -0.499998) tmp = Float64(Float64(y * i) + Float64(z + a)); elseif (Float64(b - 0.5) <= 1e+137) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (z + (b * log(c))); tmp = 0.0; if ((b - 0.5) <= -1e+212) tmp = t_1; elseif ((b - 0.5) <= -0.499998) tmp = (y * i) + (z + a); elseif ((b - 0.5) <= 1e+137) tmp = a + (t + (z + (x * log(y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+212], t$95$1, If[LessEqual[N[(b - 0.5), $MachinePrecision], -0.499998], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+137], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+212}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b - 0.5 \leq -0.499998:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{elif}\;b - 0.5 \leq 10^{+137}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -9.9999999999999991e211 or 1e137 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
Taylor expanded in x around 0 89.1%
Taylor expanded in t around 0 83.7%
associate-+r+83.7%
sub-neg83.7%
metadata-eval83.7%
Simplified83.7%
Taylor expanded in b around inf 83.7%
*-commutative83.7%
Simplified83.7%
Taylor expanded in a around 0 74.4%
if -9.9999999999999991e211 < (-.f64 b #s(literal 1/2 binary64)) < -0.499997999999999998Initial program 99.3%
Taylor expanded in x around 0 82.4%
Taylor expanded in t around 0 68.3%
associate-+r+68.3%
sub-neg68.3%
metadata-eval68.3%
Simplified68.3%
Taylor expanded in b around inf 66.4%
*-commutative66.4%
Simplified66.4%
Taylor expanded in b around 0 63.7%
+-commutative63.7%
Simplified63.7%
if -0.499997999999999998 < (-.f64 b #s(literal 1/2 binary64)) < 1e137Initial program 99.9%
Taylor expanded in y around 0 91.4%
Taylor expanded in x around inf 90.3%
Final simplification68.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= (- b 0.5) -5e+242)
(+ (* y i) t_1)
(if (or (<= (- b 0.5) -2e+156) (not (<= (- b 0.5) 2e+142)))
(+ a (+ z t_1))
(+ (* y i) (+ z a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if ((b - 0.5) <= -5e+242) {
tmp = (y * i) + t_1;
} else if (((b - 0.5) <= -2e+156) || !((b - 0.5) <= 2e+142)) {
tmp = a + (z + t_1);
} else {
tmp = (y * i) + (z + 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) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if ((b - 0.5d0) <= (-5d+242)) then
tmp = (y * i) + t_1
else if (((b - 0.5d0) <= (-2d+156)) .or. (.not. ((b - 0.5d0) <= 2d+142))) then
tmp = a + (z + t_1)
else
tmp = (y * i) + (z + 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 t_1 = b * Math.log(c);
double tmp;
if ((b - 0.5) <= -5e+242) {
tmp = (y * i) + t_1;
} else if (((b - 0.5) <= -2e+156) || !((b - 0.5) <= 2e+142)) {
tmp = a + (z + t_1);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if (b - 0.5) <= -5e+242: tmp = (y * i) + t_1 elif ((b - 0.5) <= -2e+156) or not ((b - 0.5) <= 2e+142): tmp = a + (z + t_1) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (Float64(b - 0.5) <= -5e+242) tmp = Float64(Float64(y * i) + t_1); elseif ((Float64(b - 0.5) <= -2e+156) || !(Float64(b - 0.5) <= 2e+142)) tmp = Float64(a + Float64(z + t_1)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if ((b - 0.5) <= -5e+242) tmp = (y * i) + t_1; elseif (((b - 0.5) <= -2e+156) || ~(((b - 0.5) <= 2e+142))) tmp = a + (z + t_1); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+242], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+156], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+142]], $MachinePrecision]], N[(a + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+242}:\\
\;\;\;\;y \cdot i + t\_1\\
\mathbf{elif}\;b - 0.5 \leq -2 \cdot 10^{+156} \lor \neg \left(b - 0.5 \leq 2 \cdot 10^{+142}\right):\\
\;\;\;\;a + \left(z + t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -5.0000000000000004e242Initial program 99.6%
Taylor expanded in x around 0 92.7%
Taylor expanded in b around inf 90.8%
*-commutative90.8%
Simplified90.8%
if -5.0000000000000004e242 < (-.f64 b #s(literal 1/2 binary64)) < -2e156 or 2.0000000000000001e142 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
Taylor expanded in x around 0 85.8%
Taylor expanded in t around 0 76.0%
associate-+r+76.0%
sub-neg76.0%
metadata-eval76.0%
Simplified76.0%
Taylor expanded in b around inf 76.0%
*-commutative76.0%
Simplified76.0%
Taylor expanded in i around inf 41.9%
associate-+r+41.9%
associate-/l*41.8%
Simplified41.8%
Taylor expanded in i around 0 65.0%
*-commutative65.0%
Simplified65.0%
if -2e156 < (-.f64 b #s(literal 1/2 binary64)) < 2.0000000000000001e142Initial program 99.4%
Taylor expanded in x around 0 81.4%
Taylor expanded in t around 0 67.5%
associate-+r+67.5%
sub-neg67.5%
metadata-eval67.5%
Simplified67.5%
Taylor expanded in b around inf 65.8%
*-commutative65.8%
Simplified65.8%
Taylor expanded in b around 0 64.2%
+-commutative64.2%
Simplified64.2%
Final simplification65.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ z a))))
(if (<= i -12500000000.0)
t_1
(if (<= i 7.6e-116)
(+ a (+ z (* b (log c))))
(if (<= i 4.7e-85) (* x (+ (log y) (/ z x))) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (z + a);
double tmp;
if (i <= -12500000000.0) {
tmp = t_1;
} else if (i <= 7.6e-116) {
tmp = a + (z + (b * log(c)));
} else if (i <= 4.7e-85) {
tmp = x * (log(y) + (z / x));
} else {
tmp = t_1;
}
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 = (y * i) + (z + a)
if (i <= (-12500000000.0d0)) then
tmp = t_1
else if (i <= 7.6d-116) then
tmp = a + (z + (b * log(c)))
else if (i <= 4.7d-85) then
tmp = x * (log(y) + (z / x))
else
tmp = t_1
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 = (y * i) + (z + a);
double tmp;
if (i <= -12500000000.0) {
tmp = t_1;
} else if (i <= 7.6e-116) {
tmp = a + (z + (b * Math.log(c)));
} else if (i <= 4.7e-85) {
tmp = x * (Math.log(y) + (z / x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (z + a) tmp = 0 if i <= -12500000000.0: tmp = t_1 elif i <= 7.6e-116: tmp = a + (z + (b * math.log(c))) elif i <= 4.7e-85: tmp = x * (math.log(y) + (z / x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(z + a)) tmp = 0.0 if (i <= -12500000000.0) tmp = t_1; elseif (i <= 7.6e-116) tmp = Float64(a + Float64(z + Float64(b * log(c)))); elseif (i <= 4.7e-85) tmp = Float64(x * Float64(log(y) + Float64(z / x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (z + a); tmp = 0.0; if (i <= -12500000000.0) tmp = t_1; elseif (i <= 7.6e-116) tmp = a + (z + (b * log(c))); elseif (i <= 4.7e-85) tmp = x * (log(y) + (z / x)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -12500000000.0], t$95$1, If[LessEqual[i, 7.6e-116], N[(a + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 4.7e-85], N[(x * N[(N[Log[y], $MachinePrecision] + N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(z + a\right)\\
\mathbf{if}\;i \leq -12500000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;i \leq 7.6 \cdot 10^{-116}:\\
\;\;\;\;a + \left(z + b \cdot \log c\right)\\
\mathbf{elif}\;i \leq 4.7 \cdot 10^{-85}:\\
\;\;\;\;x \cdot \left(\log y + \frac{z}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if i < -1.25e10 or 4.70000000000000009e-85 < i Initial program 99.2%
Taylor expanded in x around 0 86.7%
Taylor expanded in t around 0 77.8%
associate-+r+77.8%
sub-neg77.8%
metadata-eval77.8%
Simplified77.8%
Taylor expanded in b around inf 76.5%
*-commutative76.5%
Simplified76.5%
Taylor expanded in b around 0 66.7%
+-commutative66.7%
Simplified66.7%
if -1.25e10 < i < 7.6000000000000003e-116Initial program 99.8%
Taylor expanded in x around 0 81.9%
Taylor expanded in t around 0 65.2%
associate-+r+65.2%
sub-neg65.2%
metadata-eval65.2%
Simplified65.2%
Taylor expanded in b around inf 64.4%
*-commutative64.4%
Simplified64.4%
Taylor expanded in i around inf 21.6%
associate-+r+21.6%
associate-/l*21.6%
Simplified21.6%
Taylor expanded in i around 0 58.9%
*-commutative58.9%
Simplified58.9%
if 7.6000000000000003e-116 < i < 4.70000000000000009e-85Initial program 99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
fma-undefine99.4%
add-cube-cbrt98.0%
pow298.0%
Applied egg-rr98.0%
Taylor expanded in x around inf 99.2%
associate-+r+99.2%
associate-+r+99.2%
*-commutative99.2%
associate-/l*99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in z around inf 63.7%
Final simplification63.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 4e-31) (+ a (+ t (+ z (* x (log y))))) (+ (* y i) (+ (+ z a) (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 4e-31) {
tmp = a + (t + (z + (x * log(y))));
} else {
tmp = (y * i) + ((z + a) + (b * log(c)));
}
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 <= 4d-31) then
tmp = a + (t + (z + (x * log(y))))
else
tmp = (y * i) + ((z + a) + (b * log(c)))
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 <= 4e-31) {
tmp = a + (t + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + ((z + a) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 4e-31: tmp = a + (t + (z + (x * math.log(y)))) else: tmp = (y * i) + ((z + a) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 4e-31) tmp = Float64(a + Float64(t + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 4e-31) tmp = a + (t + (z + (x * log(y)))); else tmp = (y * i) + ((z + a) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 4e-31], N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4 \cdot 10^{-31}:\\
\;\;\;\;a + \left(t + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(z + a\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if y < 4e-31Initial program 99.8%
Taylor expanded in y around 0 95.5%
Taylor expanded in x around inf 82.1%
if 4e-31 < y Initial program 99.2%
Taylor expanded in x around 0 88.5%
Taylor expanded in t around 0 80.0%
associate-+r+80.0%
sub-neg80.0%
metadata-eval80.0%
Simplified80.0%
Taylor expanded in b around inf 79.0%
*-commutative79.0%
Simplified79.0%
Final simplification80.3%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t)));
}
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 = (y * i) + ((log(c) * (b - 0.5d0)) + (a + (z + t)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(a + Float64(z + t)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)
\end{array}
Initial program 99.5%
Taylor expanded in x around 0 82.9%
Final simplification82.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ z a) (* (+ b -0.5) (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((z + a) + ((b + -0.5) * log(c)));
}
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 = (y * i) + ((z + a) + ((b + (-0.5d0)) * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((z + a) + ((b + -0.5) * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((z + a) + ((b + -0.5) * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(z + a) + Float64(Float64(b + -0.5) * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((z + a) + ((b + -0.5) * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(z + a\right) + \left(b + -0.5\right) \cdot \log c\right)
\end{array}
Initial program 99.5%
Taylor expanded in x around 0 82.9%
Taylor expanded in t around 0 70.6%
associate-+r+70.6%
sub-neg70.6%
metadata-eval70.6%
Simplified70.6%
Final simplification70.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= (- b 0.5) 2e+151) (+ (* y i) (+ z a)) (* b (log c))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= 2e+151) {
tmp = (y * i) + (z + a);
} else {
tmp = b * log(c);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((b - 0.5d0) <= 2d+151) then
tmp = (y * i) + (z + a)
else
tmp = b * log(c)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= 2e+151) {
tmp = (y * i) + (z + a);
} else {
tmp = b * Math.log(c);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b - 0.5) <= 2e+151: tmp = (y * i) + (z + a) else: tmp = b * math.log(c) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(b - 0.5) <= 2e+151) tmp = Float64(Float64(y * i) + Float64(z + a)); else tmp = Float64(b * log(c)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b - 0.5) <= 2e+151) tmp = (y * i) + (z + a); else tmp = b * log(c); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+151], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq 2 \cdot 10^{+151}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \log c\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < 2.00000000000000003e151Initial program 99.4%
Taylor expanded in x around 0 81.8%
Taylor expanded in t around 0 68.6%
associate-+r+68.6%
sub-neg68.6%
metadata-eval68.6%
Simplified68.6%
Taylor expanded in b around inf 67.1%
*-commutative67.1%
Simplified67.1%
Taylor expanded in b around 0 60.7%
+-commutative60.7%
Simplified60.7%
if 2.00000000000000003e151 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.6%
Taylor expanded in b around inf 58.9%
*-commutative58.9%
Simplified58.9%
Final simplification60.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4e+34) (+ z (* y i)) (if (or (<= a 1.36e+160) (not (<= a 4.5e+265))) (+ a (* y i)) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4e+34) {
tmp = z + (y * i);
} else if ((a <= 1.36e+160) || !(a <= 4.5e+265)) {
tmp = a + (y * i);
} else {
tmp = z + 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 <= 4d+34) then
tmp = z + (y * i)
else if ((a <= 1.36d+160) .or. (.not. (a <= 4.5d+265))) then
tmp = a + (y * i)
else
tmp = z + 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 <= 4e+34) {
tmp = z + (y * i);
} else if ((a <= 1.36e+160) || !(a <= 4.5e+265)) {
tmp = a + (y * i);
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4e+34: tmp = z + (y * i) elif (a <= 1.36e+160) or not (a <= 4.5e+265): tmp = a + (y * i) else: tmp = z + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4e+34) tmp = Float64(z + Float64(y * i)); elseif ((a <= 1.36e+160) || !(a <= 4.5e+265)) tmp = Float64(a + Float64(y * i)); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 4e+34) tmp = z + (y * i); elseif ((a <= 1.36e+160) || ~((a <= 4.5e+265))) tmp = a + (y * i); else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4e+34], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 1.36e+160], N[Not[LessEqual[a, 4.5e+265]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(z + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4 \cdot 10^{+34}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;a \leq 1.36 \cdot 10^{+160} \lor \neg \left(a \leq 4.5 \cdot 10^{+265}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if a < 3.99999999999999978e34Initial program 99.4%
Taylor expanded in x around 0 82.7%
Taylor expanded in z around inf 44.1%
if 3.99999999999999978e34 < a < 1.35999999999999997e160 or 4.49999999999999985e265 < a Initial program 100.0%
Taylor expanded in x around 0 81.8%
Taylor expanded in a around inf 56.7%
if 1.35999999999999997e160 < a < 4.49999999999999985e265Initial program 99.9%
Taylor expanded in x around 0 87.1%
Taylor expanded in t around 0 80.4%
associate-+r+80.4%
sub-neg80.4%
metadata-eval80.4%
Simplified80.4%
Taylor expanded in b around inf 80.4%
*-commutative80.4%
Simplified80.4%
Taylor expanded in b around 0 80.4%
+-commutative80.4%
Simplified80.4%
Taylor expanded in y around 0 73.8%
Final simplification47.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -5.7e+159) z (if (<= z -2.05e+119) a (if (<= z -7e-199) (* 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 <= -5.7e+159) {
tmp = z;
} else if (z <= -2.05e+119) {
tmp = a;
} else if (z <= -7e-199) {
tmp = y * i;
} 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 (z <= (-5.7d+159)) then
tmp = z
else if (z <= (-2.05d+119)) then
tmp = a
else if (z <= (-7d-199)) then
tmp = y * i
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 (z <= -5.7e+159) {
tmp = z;
} else if (z <= -2.05e+119) {
tmp = a;
} else if (z <= -7e-199) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -5.7e+159: tmp = z elif z <= -2.05e+119: tmp = a elif z <= -7e-199: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -5.7e+159) tmp = z; elseif (z <= -2.05e+119) tmp = a; elseif (z <= -7e-199) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -5.7e+159) tmp = z; elseif (z <= -2.05e+119) tmp = a; elseif (z <= -7e-199) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -5.7e+159], z, If[LessEqual[z, -2.05e+119], a, If[LessEqual[z, -7e-199], N[(y * i), $MachinePrecision], a]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.7 \cdot 10^{+159}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{+119}:\\
\;\;\;\;a\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-199}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -5.6999999999999999e159Initial program 99.9%
Taylor expanded in z around inf 42.1%
if -5.6999999999999999e159 < z < -2.0499999999999999e119 or -6.9999999999999998e-199 < z Initial program 99.9%
Taylor expanded in a around inf 15.7%
if -2.0499999999999999e119 < z < -6.9999999999999998e-199Initial program 97.9%
Taylor expanded in y around inf 47.7%
*-commutative47.7%
Simplified47.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.7e+170) (not (<= i 1.7e-34))) (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.7e+170) || !(i <= 1.7e-34)) {
tmp = y * i;
} else {
tmp = z + 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 ((i <= (-1.7d+170)) .or. (.not. (i <= 1.7d-34))) then
tmp = y * i
else
tmp = z + 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 ((i <= -1.7e+170) || !(i <= 1.7e-34)) {
tmp = y * i;
} else {
tmp = z + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.7e+170) or not (i <= 1.7e-34): tmp = y * i else: tmp = z + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.7e+170) || !(i <= 1.7e-34)) tmp = Float64(y * i); else tmp = Float64(z + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -1.7e+170) || ~((i <= 1.7e-34))) tmp = y * i; else tmp = z + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.7e+170], N[Not[LessEqual[i, 1.7e-34]], $MachinePrecision]], N[(y * i), $MachinePrecision], N[(z + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.7 \cdot 10^{+170} \lor \neg \left(i \leq 1.7 \cdot 10^{-34}\right):\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z + a\\
\end{array}
\end{array}
if i < -1.7000000000000001e170 or 1.7e-34 < i Initial program 98.8%
Taylor expanded in y around inf 53.0%
*-commutative53.0%
Simplified53.0%
if -1.7000000000000001e170 < i < 1.7e-34Initial program 99.8%
Taylor expanded in x around 0 80.6%
Taylor expanded in t around 0 64.3%
associate-+r+64.3%
sub-neg64.3%
metadata-eval64.3%
Simplified64.3%
Taylor expanded in b around inf 62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in b around 0 49.1%
+-commutative49.1%
Simplified49.1%
Taylor expanded in y around 0 38.2%
Final simplification43.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.5e+155) (+ z a) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.5e+155) {
tmp = z + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-4.5d+155)) then
tmp = z + a
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -4.5e+155) {
tmp = z + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -4.5e+155: tmp = z + a else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -4.5e+155) tmp = Float64(z + a); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -4.5e+155) tmp = z + a; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -4.5e+155], N[(z + a), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+155}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.49999999999999973e155Initial program 99.9%
Taylor expanded in x around 0 85.2%
Taylor expanded in t around 0 70.1%
associate-+r+70.1%
sub-neg70.1%
metadata-eval70.1%
Simplified70.1%
Taylor expanded in b around inf 70.1%
*-commutative70.1%
Simplified70.1%
Taylor expanded in b around 0 62.6%
+-commutative62.6%
Simplified62.6%
Taylor expanded in y around 0 49.8%
if -4.49999999999999973e155 < z Initial program 99.4%
Taylor expanded in x around 0 82.5%
Taylor expanded in a around inf 42.7%
Final simplification43.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + 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 = (y * i) + (z + a)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.5%
Taylor expanded in x around 0 82.9%
Taylor expanded in t around 0 70.6%
associate-+r+70.6%
sub-neg70.6%
metadata-eval70.6%
Simplified70.6%
Taylor expanded in b around inf 69.3%
*-commutative69.3%
Simplified69.3%
Taylor expanded in b around 0 55.9%
+-commutative55.9%
Simplified55.9%
Final simplification55.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -3.5e+159) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.5e+159) {
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 (z <= (-3.5d+159)) 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 (z <= -3.5e+159) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.5e+159: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.5e+159) 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 (z <= -3.5e+159) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.5e+159], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+159}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -3.4999999999999999e159Initial program 99.9%
Taylor expanded in z around inf 42.1%
if -3.4999999999999999e159 < z Initial program 99.4%
Taylor expanded in a around inf 15.1%
(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.5%
Taylor expanded in a around inf 14.0%
herbie shell --seed 2024105
(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)))