On Nov 13, 2006, at 3:00 PM, Andi Vajda wrote:
On Mon, 13 Nov 2006, Morgen Sagen wrote:
I just sent the following email to cosmo-dev...
The issue of supporting floating point numbers in EIM records has
come up and raised some questions about precision and rounding,
and whether Chandler needs to get back exactly what it writes to
Cosmo. After some IRC discussion in #chandler it seems like it
makes sense for the places where Chandler needs to share non-
integer numbers, we should replace those with Decimal (fixed
point) values. That would solve the problem of round-trip data
not coming back to Chandler exactly the same way it was written
to Cosmo, and also allows CosmoUI to understand these values (in
other words, they're not just an opaque series of bytes that only
Chandler understands). Decimal seems to be supported in SQL as well.
...to see if they're on board with supporting the Decimal (fixed-
point number) type, and I also want to get feedback from Chandler
engineers about moving the few shared floating point values (only
one now, but soon two) we have to fixed-point, to avoid the round-
trip precision problems (not getting back exactly what we
published) we face.
If we go this route, what would it take to add Decimal support to
the repository (Andi)?
It depends what you want out of it ?
If python has a decimal type (it looks like it does ?) it should be
easy enough to add support for that.
Andi..
Well, if we go this route, I guess it means we want to be able to
persist values of decimal.Decimal. Does everyone involved think
going fixed-point is the right solution? The decimal module is
documented here:
http://www.python.org/doc/current/lib/module-decimal.html
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev