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

List:       koffice-devel
Subject:    Re: Problem with big integers
From:       Stefan Nikolaus <stefan.nikolaus () kdemail ! net>
Date:       2007-01-30 16:31:02
Message-ID: 200701301731.06263.stefan.nikolaus () kdemail ! net
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Monday 29 January 2007 11:45:01 Brad Hards wrote:
> What I don't understand is why. Why not always just use a float, and
> convert it in the asInteger() or asUnsignedLongLong() or whatever
> functions?

I was told, that long long is a C data type. Either way, I'd prefer to rely on 
Qt's platform independent qint64.
But to your question: I see no good reason to store also the integer values in 
the double variable, whose mantisse is guaranteed to have 53 bits. The 
resulting range is -2^53 ... 2^53. Above (or below) it gets inaccurate. But 
that's at least more as long provides (at least): -2^31 .. 2^31-1.

If nobody else objects and disabuses me, go ahead and modify Value to use the 
double variable also for the integers.

Regards,
Stefan

[Attachment #5 (application/pgp-signature)]

_______________________________________________
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