From: Christian Bauer Date: Wed, 5 Mar 2003 22:23:22 +0000 (+0000) Subject: updated the logic in the numeric(int) constructor X-Git-Tag: release_1-0-15~41 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=5b408f6eb3db565435da24edddc8d2b06a68634a updated the logic in the numeric(int) constructor --- diff --git a/ginac/numeric.cpp b/ginac/numeric.cpp index 0aeef27a..a299d20c 100644 --- a/ginac/numeric.cpp +++ b/ginac/numeric.cpp @@ -93,10 +93,10 @@ numeric::numeric(int i) : basic(TINFO_numeric) // emphasizes efficiency. However, if the integer is small enough // we save space and dereferences by using an immediate type. // (C.f. ) - if (i < (1U<= -(1L << (cl_value_len-1))) value = cln::cl_I(i); else - value = cln::cl_I((long) i); + value = cln::cl_I(static_cast(i)); setflag(status_flags::evaluated | status_flags::expanded); } @@ -108,10 +108,10 @@ numeric::numeric(unsigned int i) : basic(TINFO_numeric) // emphasizes efficiency. However, if the integer is small enough // we save space and dereferences by using an immediate type. // (C.f. ) - if (i < (1U<(i)); setflag(status_flags::evaluated | status_flags::expanded); } @@ -129,7 +129,8 @@ numeric::numeric(unsigned long i) : basic(TINFO_numeric) setflag(status_flags::evaluated | status_flags::expanded); } -/** Ctor for rational numerics a/b. + +/** Constructor for rational numerics a/b. * * @exception overflow_error (division by zero) */ numeric::numeric(long numer, long denom) : basic(TINFO_numeric)