Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, April 2007
big number


Message 1 in thread

Hi QT Experts,

I have a task to develop an aplication which is using big number, wide range precision number, let's say the range is about pow(10,-30) to pow(10,30).
Is there a way in QT to operate such big number without losing any precision for the given range. Operation includes arithmetic operation and string conversion. I've been tried googling and searching in QT assistant but still not found any QT Class to acomodate this thing.

Thanks very much for any help

Regards,


Islahul

--
 [ signature omitted ] 

Message 2 in thread

Qt does not provide an arbitrary precision arithmetic module. Some
good ones you can use is gmp/mpfr or apfloat:

gmp: www.swox.com/gmp/
mpfr: www.mpfr.org/
apfloat: www.apfloat.org/

GMP out of the box (IIRC) can only be compiled by GCC. As MPFR depends
on GMP, the same would apply. apfloat can be compiled by more
compilers, and details for them can be found on their website.

Hope this helps
Benjamin Lau

--
 [ signature omitted ]