This is the mail archive of the kawa@sourceware.cygnus.com mailing list for the Kawa project. See the Kawa home page for more information.
At 11:13 PM 6/29/98 -0700, Per Bothner wrote: >2) If someone wants a non-trivial but finite project that would >help Kawa (and specifically help finish the format routine), >I would love to have someone implement the floating-point >conversion code. Ideally, I would like to have someone transcribe >David Gay's code from C into Java, but using the gnu.math MPN and >IntNum classes, instead of Gay's bignum implementation. Gay's code >is in: > > ftp://netlib.bell-labs.com/netlib/fp/gdtoa.tar.gz > >The specific function needed is a Java version of dtoa.c. >The challenge is to understand the numerics well enough to >re-implement the (lightly-commented) algorithms in Java. I downloaded Gay's code and checked it out. The code is certainly rather opaque! Gay's implementation is based on an article by Guy Steele and Jon L. White (no relation): <http://researchsmp2.cc.vt.edu/DB/db/conf/pldi/pldi90.html> Proceedings of the ACM SIGPLAN'90 Conference on Programming Language Design and Implementation (PLDI), White Plains, New York, June 20-22, 1990. SIGPLAN Notices 25(6) (June 1990) Guy L. Steele Jr., Jon L. White: How to Print Floating-Point Numbers Accurately. 112-126 It would be very helpful to have a copy of that article (it does not appear on the web AFAIK). I have also located an implementation in Modula-3 (Steele's & White's algorithm is known as "Dragon") which may help to illuminate Gay's code: <http://www.undergrad.math.uwaterloo.ca/m3sources/html/float/src/Common/Dra gonT.m3.html> While I have no particular expertise in numerical algorithms, I did have success is fixing bugs in Kawa's MPN, so I am willing to give this a shot. However, if someone else wants to do this, I am happy to let them! If anyone can get a copy of that article for me, I would really appreciate it (perhaps you have convenient access to a library with the SIGPLAN Notices and could scan and email the article to me?). jim ----------------------------------------------------------------------- James P. White Netscape DevEdge Champion for IFC Director of Technology Adventure Online Gaming http://www.gameworld.com Developers of Gameworld -- Live Action Role-Playing and Strategic Games jim@pagesmiths.com Pagesmiths' home is http://www.pagesmiths.com