On Wed, Jan 5, 2011 at 13:07, Tzafrir Cohen <[email protected]> wrote: > On Wed, Jan 05, 2011 at 12:40:14PM +0200, Uri Even-Chen wrote: >> I hate floating point. if you search Google for 2^1023, > > > >> you get this result: >> >> 2^1023 = 8.98846567 × 10^307 >> >> However if you search for 2^1024, you don't get a number at all. > > Do you prefer to do that in fixed-point? > > It's actually neat to be able to use a relatively low number of bits and > still say something meaningfull about 2^1023 .
Actually since long time ago I am thinking about better representation of numbers. I think numbers should be 100% accurate, at least with rational numbers. Using many bits is not a problem now, and also the time it takes to calculate mathematical expressions is much much less than the time it takes to run graphical software, so I think a rational number can be represented by a division of two integers; integers can be represented in binary form and if floating point is used - there should not be any limit to both the accuracy and the exponent. for example if a number needs 1024 bits for accuracy, I think it's not too much, and the exponent should be at least 32 bits long. Many times I want to calculate specific expressions, such as the square root of googolplex, and I think we should move to represent numbers in a way that such calculations will be possible. Anyway I think googol^4 and even googol^10000 should always return a result in any calculator. For example ln(googol^10000) is a small number, I don't think I have to switch to 10000*ln(googol) if I want to calculate it (of course with irrational numbers, we need to define the precision. this should also be user-defined parameter and not fixed). > > -- > Tzafrir Cohen | [email protected] | VIM is > http://tzafrir.org.il | | a Mutt's > [email protected] | | best > [email protected] | | friend > > _______________________________________________ > Linux-il mailing list > [email protected] > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > Uri Even-Chen Mobile Phone: +972-50-9007559 E-mail: [email protected] Website: http://www.speedy.net/ _______________________________________________ Linux-il mailing list [email protected] http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
