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

Mikael mikael.rcv at gmail.com
Wed Jan 15 20:12:29 EST 2014


2014/1/15 Marc Feeley <feeley at iro.umontreal.ca>

>
> 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
>
>
I trust it's both simple and elegant - implementing something and do not
have the proper focus on math in this moment;

It just struck me that it's an awesome symmetry that there's this full
support both re input, handling and output (per algorithm I suggested in
previous email, guess that's how fast at is goes) of these, and the dot on
the i in this respect would be the ability to check that a number has a
finite number of decimals - saw an algorithm but didn't take it to the
level of implementing it - , that was all I was thinking today.

Mikael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20140116/c1384f65/attachment.htm>


More information about the Gambit-list mailing list