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

List:       koffice-devel
Subject:    Re: KSpread: Number class - some issues
From:       andre () familiesomers ! nl
Date:       2007-05-28 19:16:58
Message-ID: 42390.82.170.46.44.1180379818.squirrel () email ! trans-it ! nl
[Download RAW message or body]

Hi,

I do not claim to know a lot about this issue, nor am I familiar with the
internals of KSpread. Still, I think one observation has been left out of
considderation so far...

> On Sunday 27 May 2007 21:58:42 Tomas Mecir wrote:
>> Even if we do, one of the issues stands - we'd need to pack
>> integers and doubles together. Do we ever use the integer datatype of
>> Value, or does everything get stored as Float anyway and the integer
>> one can go ?
>
> Hmm, the bit operation functions act directly on integers. At least for
> these
> we gain some precision (qint64 vs. the 48 bit 'integer precision' of
> double).
> There are probably more functions, that do the same, even though I expect
> most of KSpread's functions to do their calculation using double
> precision.
> So, the gain of keeping integer as distinct type is minimal, but it does
> not
> hurt anyway (sizeof(qint64) = sizeof(double) = 64 bit).

I think using doubles for everything could potentially lead to problems.
AFAIK, you are not supposed to use floating point type values in at least
accounting situations. There may be other situations also (scientific
comes to mind) that could benefit from the precision and, more
importantly, predictability that integer values have to offer. If KSpread
uses doubles for everything behind the screens, it may not be clear that
it is doing so (leading to potientially problematic situations) or is may
even become unsuitable for use in specific areas such as mentioned above.

I think that it would be beneficial if one could choose what kind of
numbers one wishes to work with, and that KSpread would honor that choice.
If a user wants to use integers, there may be a very good reason to do so.

Regards,

André Somers

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://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