[postmodern-devel] darcs patch: Correct rational (double-float) formatting

Arjan Wekking arjan at streamtech.nl
Fri Jul 25 14:03:12 UTC 2008


Fri Jul 25 15:52:12 CEST 2008  Arjan Wekking <arjan at streamtech.nl>
  * Correct rational (double-float) formatting
  
  On Clozure CL (PPC32), (format "~f" (coerce 1/123 'double-float))
  returns "0.008130081300813009D0" which is not a number syntax
  PostgreSQL understands.
  
  In order to be sure that a format is used that is always supported,
  the formatting string was changed to generate the number in
  exponential notation which is accepted by PostgreSQL and which can be
  reliably generated by at least SBCL and Clozure CL (only CLs I've
  tested).
  
  The modified control string in this patch ("~,,,,,,'EE") will generate
  for the rational 1/123 "8.130081300813009E-3" which is accepted and
  interpreted properly by PostgreSQL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct-rational-_double_float_-formatting.dpatch
Type: text/x-darcs-patch
Size: 22111 bytes
Desc: A darcs patch for your repository!
URL: <https://mailman.common-lisp.net/pipermail/postmodern-devel/attachments/20080725/b742df8a/attachment.bin>


More information about the postmodern-devel mailing list