From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91965a012526b259 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.glorb.com!cyclone1.gnilink.net!gnilink.net!wns14feed!worldnet.att.net!attbi_s53.POSTED!53ab2750!not-for-mail From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Float to String References: <24Bkd.74362$HA.12207@attbi_s01> X-Newsreader: Tom's custom newsreader Message-ID: NNTP-Posting-Host: 67.161.24.234 X-Complaints-To: abuse@comcast.net X-Trace: attbi_s53 1100159508 67.161.24.234 (Thu, 11 Nov 2004 07:51:48 GMT) NNTP-Posting-Date: Thu, 11 Nov 2004 07:51:48 GMT Organization: Comcast Online Date: Thu, 11 Nov 2004 07:51:49 GMT Xref: g2news1.google.com comp.lang.ada:6137 Date: 2004-11-11T07:51:49+00:00 List-Id: >> I basically need to output an XML file with float values. These values are >> cosine proximities between documents. I want to be able to read this XML > >1) Write the value as a string representing a floating point value with as >many significant digits as possible. Use an Ada.Text_Io to convert the The cosine here is presumably a large integer divided by the square root of the product of two large integers. How about just writing the three integers, so the external representation is completely accurate. Then let the reader calculate the square root and division, thus generating as accurate a float as it possibly can, given its hardware.