floating point conversions progress
Matthew Dempsky <[email protected]> Mon, 22 Dec 2003 09:57:48 -0600
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
I tried sending an email to the mailing list the other day with some of the code for cvt_double_to_string, but apparently it didn't get sent. Since then I've pushed the code into my archive as [email protected]/cvt--devo--0.1. It's still not perfect, but I rewrote the code to use GMP and now it's about 2.5x the performance of glibc (but like I've said a few times - mine still doesn't do proper formatting for everything). I can add the remaining code to test for special cases like nan, inf, and to handle negative numbers, but then I can either start integrating it into hackerlab and users will have to just settle with the fact that right now printfmt will always print doubles in free-form precision (as many or few digits necessary to accurately print out) and extend it to support fixed-form precision later, or work on that now before integrating into printfmt. Since r5rs (6.2.6) says "If z is inexact, the radix is 10, and the above expression can be satisfied by a result that contains a decimal point, then the result contains a decimal point and is expressed using the minimum number of digits (exclusive of exponent and trailing zeroes) needed to make the above expression true [howtoprint], [howtoread]; otherwise the format of the result is unspecified" and Pika's the only project in need of doubles in hackerlab at the moment it wouldn't be too bad. Finally, I branched [email protected]/elisp--devo--0.1 and commited a patch to the templates for s/tag/arch-tag/. -jivera