support for long numbers

Ingo Klöcker kloecker at
Mon Oct 4 23:48:51 BST 2004

On Monday 04 October 2004 19:39, Diego Iastrubni wrote:
> ביום שני, 4 באוקטובר 2004, 17:03, נכתב על ידי Stephan Kulow:
> > Am Monday 04 October 2004 16:31 schrieb Diego Iastrubni:
> > > Does KDE need such beast? If it does, I will try to finish some
> > > thigns
> kcalc, canuse this. Note that kspread uses kcalc now to compute
> numbers (I think), so both application can banefit from this.
> Also kstars can use this (the distance the sun traveled in 10^3
> years).
> Think about the i18n teams also.
> > > (for example rewrite the division code, and implement
> > > display->qnumber, and changing bases for numbers?).
> >
> > I don't think KDE needs such a beast. BTW: why aren't you wrapping
> > instead of implementing it on your own?
> >
> > Greetings, Stephan
> Since I did not know such beast existed. I wrote this code as part of
> an assignment in college.
> The library has also a c++ wrapper, so no work is needed to usethis
> inside KDE.
> I have tested the lib, it's fast. It did 6 millions i++ in 2 secs
> here (my class did it in 1 minute and a half). However, when I tried
> to test multiplications I used a factorial function, and it returned
> a wrong value.

If you've found a bug then you should report it.

> This lib has no way of representing numbers in different ways (like
> mine does), and does not support munbers in different bases.

So what? This library is just the backend (for calculations). So if you 
want to add support for large numbers in KDE then you should IMO take 
gmp and write a small Qt-wrapper with some additional functionality 
like support for different bases.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list