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

List:       kde-core-devel
Subject:    support for long numbers
From:       Diego Iastrubni <elcuco () kdemail ! net>
Date:       2004-10-04 14:31:33
Message-ID: 200410041631.33800.elcuco () kdemail ! net
[Download RAW message or body]

Hi,

I have written a set of classes which can handle very large numbers. The 
numbers can be as big as 100! (159 digits) and fibonacci number 7!  (1452 
digits). 

The class can handle numbers in any base (by default it's 10, you you can 
assign it "normal" numbers as well). It can perform calculations on those 
numbers, for example 0xFF * 0x12 will be calculated in hexa (without moving 
to decimal first). This is critical for very large numbers.

The numbers also sypport a "display". The idea is that each number can be 
displayed on screen in many ways... for example in Roman numerals, Indic, 
Hewrew... etc.. I have implemented Roman, Armenic, Hebrew, and Indic/Arabic 
(which means every ther script based on 10 digits is damm easy to implement, 
just derive as new class).

You can start counting from 1 to 1000, and evey number that has 7, or devides 
by 7, we change display, a nice fun game :)

Does KDE need such beast? If it does, I will try to finish some thigns (for 
example rewrite the division code, and implement display->qnumber, and 
changing bases for numbers?).

-- 
diego, kde-il translation team, http://www.kde.org/il 

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
[prev in list] [next in list] [prev in thread] [next in thread] 

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