[gambit-list] Any rational-number->string with infinite precision for decimal output? (i.e. d.ddddd rather than x/y)

Marc Feeley feeley at iro.umontreal.ca
Wed Jan 15 17:17:51 EST 2014


On Jan 15, 2014, at 5:04 PM, Mikael <mikael.rcv at gmail.com> wrote:

> 2014/1/15 Mikael <mikael.rcv at gmail.com>
> I believe you addressed now how to detect whether a rational has inifinite decimals - yes I got aware there's an algorithm to do this too, (even while it's iterative - would be nice to understand how fast it is, anyhow) neat.
> 
> Yeah if anyone has an example implementation of such an algorithm |has-infinite-decimals?| feel free to post :)

It is really very simple.  I’ll let you think about it some more before posting a solution…

Marc




More information about the Gambit-list mailing list