<div dir="ltr">Currently the `~r' format routine, which accepts rationals, barfs on +nan.0 and siblings, which are not rationals. My current use case is simply displaying sub-ranges of vectors of flonums. It is not a problem to check for +nan.0 and explicitly display it. I was just wanted to toss it out as a don't know what is the "right thing" for the `~r' format routine to do here.<div>
<div><br></div><div>> (define: x : Flonum +nan.0)</div><div><div>> (define: y : Flonum 3.145962)</div><div>> (~r y)</div><div>- : String</div><div>"3.145962"</div><div><div>> (~r x)</div><div>~r: contract violation</div>
<div> expected: rational?</div><div> given: +nan.0</div></div></div><div>...</div><div><br></div></div></div>