Re: formatting float output



D'oh, forgot about Binet's!

Sadly, I have to use binProlog. The only problem I'm having is that
dang formatting!

Thanks for reminding me about the formula, though, it's been years
since I used it!


Markus Triska wrote:
"Jakanapes" <Jakanapes@xxxxxxx> writes:

I'm implementing a tail recursive fibonacci program in bin prolog. The
challenge was to find the 64th fibo number.

There's an explicit formula for that, no need for recursion.

I found that Prolog ints only had 30 bits so I forced the program to
calculate in floats, with 64 bits.

Try SWI Prolog >= 5.6.0, which has unbounded integers.

Best wishes! -- Markus.

.