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

List:       kde-devel
Subject:    Re: Big numbers
From:       Allen Winter <winter () kde ! org>
Date:       2005-02-23 18:02:50
Message-ID: 200502231302.50369.winter () kde ! org
[Download RAW message or body]

On Wednesday 23 February 2005 12:53 pm, John Tapsell wrote:
> Hey all,
>   Some programs like kcalc badly need arbitary precision (big numbers).
> The main problem isn't just that you want to multiple large numbers, but that 
> it frequently get simple calculations wrong, due to lack of precision in 
> floats.  (There's various nasty examples in bugs.kde.org)
> 
>   Is there any bignum library that i can rely on existing?  I know it's kinda 
> bad to have external dependancies, so if not could one be imported?
>   I was thinking perhaps even import an existing library and make a nice KDE 
> wrapper for it, so we have an official kde bignum library.
> 
>   One nasty hack is to check if bc exists, and if so pipe commands to and from 
> it.  But I'd rather not do this for obvious reasons.
> 
>   Thoughts?
> 
John,
GMP is the obvious answer <http://www.swox.com/gmp>
It has a C++ interface too.

It is not a very large library so you might consider bundling it with kcalc.
Or, you can try to detect if it is installed with configure... if it is then use it.
Else drop back to non-bignum kcalc.

Regards,
Allen
-- 
Let's Keep the Political Talk Out of KDE PLEASE
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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