<div dir="ltr">Ah, actually this can be implemented for #e12345.6789 by first flooring and printing that out ("12345") then deducting that from the value (=> 0.6789) and then doing * 10 and |truncate| up to eq? 0 - that works. Perhaps it'd even be quite close to optimum speed?<div>

<br></div><div>I.e. #e12345.6789 (floor #) (- ## #) , and then repeat (eq? # 0) (* ## 10) (truncate #) (- ## #).</div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

2014/1/15 Mikael <span dir="ltr"><<a href="mailto:mikael.rcv@gmail.com" target="_blank">mikael.rcv@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>Dear Brad or Marc and list,</div><div><br></div><div>Curious, so you can parse into Gambit a decimal number with infinite precision, with exactness, by just appending "#e" to it i.e. > (define (string->exact-number s) (string->number (string-append "#e" s)))</div>



<div>> (string->exact-number "1.23478289348923749872394728934")</div><div>61739144674461874936197364467/50000000000000000000000000000</div><div><br></div><div>Is there any way to do the opposite? All I see number->string give is "61739144674461874936197364467/50000000000000000000000000000"</div>



<div><br></div><div>- how would the definition of an exact-number->string look that produced an output with decimals,</div><div>i.e. something that gave "1.23478289348923749872394728934" or "#e1.23478289348923749872394728934" back?</div>



<div><br></div><div>I understand there are cases with unlimited number of decimals i.e. 1/3, a typechecker for that would be awesome.</div><div><br></div><div>Thanks,</div><div>Mikael</div><div><br></div></div>
</blockquote></div><br></div>