[futurebasic] Re: [FB] Very big numbers

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 2000 : Group Archive : Group : All Groups

From: "Peter Dempsey" <theviron@...>
Date: Tue, 07 Nov 2000 18:35:36 CST
Hey, that looks good.  It accurately handles larger numbers.....  I tried 
all sorts of weird numbers (68, 159, 5....).  They all seemed to work...

-Peter Dempsey

>From: Robin <robinc@...>
>Reply-To: futurebasic@...
>To: <futurebasic@...>
>Subject: Re: [FB] Very big numbers
>Date: Wed, 08 Nov 2000 09:19:57 +1000
>
>Actually, I believe Peter is on to something here,
lets hear a hoorah for change! ;) (::cough cough.. I really just made a 
point not an idea... credit's all u)
>though not quite a 10^308
>something. I believe the imprecision with double-precision floats only 
>comes
>into play with certain decimal values (fractions not fractions of 2). If 
>you
>stick with "integer floats", I think you can take full advantage of the
>non-exponent bits (6 bytes in PPC?), as demonstrated by the following. So 
>if
>I'm right, you can get 1.5 x the digit precision allowed by unsigned long
>integers.
>
>
>DEFINT a-z
>DIM gDone
>
>END GLOBALS
>
>CLEAR LOCAL
>DIM i
>DIM xlong as unsigned LONG
>DIM a#
>LOCAL FN Tester
>   xlong = &H7FFFFFFF
>   a# = xlong
>   PRINT a#
>   a# = a#*4
>   FOR i=1 TO 30
>     PRINT USING"############";a#
>     a# = a#+1
>   NEXT
>END FN
>
>WINDOW 1,"",(0,0)-(500,400),_doc
>
>FN Tester
>
>DO
>UNTIL FN BUTTON
>
>
> >> window #1,"Checking highest Number...",(0,0)-(500,500)
> >>
> >> print 10^308 " (10^308)"
> >> print 10^309 " (10^309)"
> >>
> >> do
> >> handleevents
> >> until mouse(_down)
> >>
> >> the first one (10^308) brings up 1e+308 (which is fine)
> >> the second one, however, brings up INF, showing that it is beyond FB3's
> >> range or whatever.  I think someone said something about being able to 
>hack
> >> (i'm using the term losely) into the runtime and change that...
> >
> > Well. Yes and no, Peter. What you say is obviously quite correct, but it
> > doesn't alter the fact that the largest number that FB3 can accurately
> > handle is 4,294,967,295 or 2^32.
> >
> > I don't care to work out the rounding error between 2^32 and 10^308, but 
>I
> > suspect it would be quite large ....
> >
>
>--
>Robin
>====================================================
>Genesearch Pty Ltd
>E-mail: robinc@...
>WWW:    http://www.genesearch.com.au
>====================================================
>
>
>--
>To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.