Calc demo issue
Lucas S
lssilva at gmail.com
Mon Jan 1 03:49:28 CET 2007
Hi,
I have been using the calc demo program provided by GMP to test some tools I am
developing, and I got and interesting issue. I have created a program
to generate
a number of test cases which include:
1111111111111111111/-11111111111111111
111111111111111111/-11111111111111111
Of thousands of test run I got an error in my program with the
operations above, so I went
to check and I found out that the result of these operations provided
by calc were different
then what I was expecting.
1111111111111111111/-11111111111111111 = 101
111111111111111111/-11111111111111111=11
Wasn't it supposed to be 100 and 10?
I haven't checked the lexer and parser of the calc for this specific issue. but
I think that the lexer nor the parser will change the values so I
guess it is going straight
to GMP.
Anyway, it is just a doubt.
Happy New year!
Lucas
More information about the gmp-discuss
mailing list