[r6rs-discuss] Hashes in the number syntax

From: dyb_at_cs.indiana.edu <dyb>
Date: Sun Nov 19 17:18:09 2006

The floating-point printing algorithm described in "Printing
floating-point numbers quickly and accurately" (Burger/Dybvig PLDI '96)
uses hash digits to indicate less than the requested amount of precision.
This algorithm is used by Chez Scheme's implementation of format, so that,
for example:

  (format "~,20f" 1.0) ;=> "1.0000000000000000####"
  (format "~,5e" 5e-324) ;=> "5.#####e-324" ; denormalized value

So while I agree that the hash digits are not particularly useful for
data-entry input, they are useful for output. Furthermore, if the output
routines can produce hash digits, it's also useful for the reader to
accept them.

Kent
Received on Sun Nov 19 2006 - 17:17:55 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC