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

List:       koffice-devel
Subject:    Re: KSpread: Number class - some issues
From:       "Tomas Mecir" <mecirt () gmail ! com>
Date:       2007-05-29 7:42:18
Message-ID: 492258b10705290042q7244ebdcxb268fa9e92721714 () mail ! gmail ! com
[Download RAW message or body]

2007/5/28, andre@familiesomers.nl <andre@familiesomers.nl>:
> 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.

Hmm. You are certainly raising a valid point. Perhaps the Number class
should abstract both int and double after all, instead of storing the
integers in Value. Then using the "typedef Number double" would mean
that double precision would get used for everything. Which does fit
the spirit of the class - the standard behavior is doubles, the
extended one also allows computations with different precisions -
integers and high-precision numbers. The bitwise functions would be
the only problem here, but I guess we could have some special handling
for these, or perhaps even disable then if the Number class gets
disabled ...

/ Tomas
_______________________________________________
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