[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KSpread formulas
From:       Ariya Hidayat <ariya () tf ! itb ! ac ! id>
Date:       2002-05-22 12:12:32
[Download RAW message or body]


> I'm not sure this is a wise move.
> 4 == 4 for integers,
> but sometimes 4.0 != 4.0 for floating point values.
> You get trouble when trying to use floating point numbers for ints .... unless
> maybe you do a correct rounding for the ints (not just truncation).

Gnumeric tries to solve this using machine epsilon. I think it should work
in KSpread, too. Hence, comparison will be using special functions (which
take machine epsilon into account).

> For the sharing I suggest a quick look at KoTextFormat and KoTextFormatCollection
> (the idea of the dict, the key that represents the whole format as a string, etc.).
> The only tricky bit is the ref-counting (because it's not automatic, it's explicit
> in the code using KoTextFormat...).

If we speak about "format" in spreadsheet like KSpread and Excel, it will
be represented by string anyway, e.g two decimals number is "#.##" and so
on. I found KoTextFormat quite inspring, though. Thanks.


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic