[Chandler-dev] Fixed-point number support
Andi Vajda
vajda at osafoundation.org
Mon Nov 13 15:00:06 PST 2006
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..
More information about the chandler-dev
mailing list