[CLN-list] Re: [GiNaC-list] Possible size issue in test in
numeric.cpp
Pierangelo Masarati
masarati at aero.polimi.it
Thu Aug 17 11:26:46 CEST 2006
[cross-posting for clarification]
Pierangelo Masarati writes:
> Richard B. Kreckel writes:
>
> [snip]
>
> Also, CLN's documentation states that |i| < 2^29, which means that the
> test in GiNaC for integers could be broken as well, as it does
>
> i >= -(1L << (cl_value_len-1))
>
> which allows |i| == 2^29 when i is -2^29 (assuming cl_value_len == 30).
Actually, CLN documentation in Section 3.1 states that
<snip>
Small integers (typically in the range -2^29...2^29-1,
</snip>
while in Section 3.4 it states that
<snip>
The conversion from `int' works only if the argument is < 2^29 and > -2^29.
</snip>
This is not necessarily contradictory, but it sounds a bit odd. Why would
-2^29 be legal if no conversion occurs for that value? I'll post this
remark to the cln-list as well.
p.
Dr. Pierangelo Masarati | voice: +39 02 2399 8309
Dip. Ing. Aerospaziale | fax: +39 02 2399 8334
Politecnico di Milano | mailto:pierangelo.masarati at polimi.it
via La Masa 34, 20156 Milano, Italy | http://www.aero.polimi.it/~masarati
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html
More information about the CLN-list
mailing list