Notes |
|
(0000610)
|
pbone
|
2014-01-26 19:25
|
|
Please explain what you mean by "fails at 93". What are the symptoms of your problem.
Please also include the Mercury version, the OS version, TCC's version and the options you used to build the Fibonacci program. |
|
|
(0000611)
|
pbone
|
2014-01-26 19:29
|
|
My apologies some of this information is provided in the attached file. However we still need to know what "fails at 93" means. |
|
|
(0000612)
|
zs
|
2014-01-27 02:17
|
|
I am guessing that "fails at 93" means that fib(93) returns a negative number, since a comment in the source code says so. However, since this version of fib uses int, not integer, OF COURSE you get overflow when the fibonacci numbers exceed what can be represented as a 64 bit two's complement integer. In other words, this is NOT a bug; this is a misunderstanding. |
|
|
|
Thank you so much for the tip. Code works now. See working code, fibonacci.m. |
|
|
(0000614)
|
pbone
|
2014-01-27 11:58
|
|
Closed as this is not a bug and the reporter is happy with the result.
Thanks for contacting us in any case and thanks Zoltan for investigating further. |
|