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

Marijn Haverbeke marijnh at gmail.com
Mon Jul 28 08:11:33 UTC 2008


> sorry for the rather blunt way my patch got send with Darcs;

No problem, your detailed patch message made it quite clear what it
was about. I usually do 'darcs send -o filename.patch' and then attach
the resulting file to an e-mail.

> Another idea I had was to
> simply represent rationals as a division (something like "(1/123::float)"
> but I'm not sure whether this has any precision loss or other disadvantages.

I'm not sure Postgres allows expressions in every place where it
allows constants -- but maybe it does. The current approach seems okay
though, since Postgres numerics always use decimal digits, so as long
as the numeric type on the Postgres side has less digits precision
than the writer writes out, we aren't losing any information that
wouldn't be lost anyway.

Best,
Marijn



More information about the postmodern-devel mailing list