John
    Somewhere I have a very old muti-byte precision arithmetic package that
will give you any bit precision you want using 8 bit arithemetic.
Unfortunately, it would be a mess of work to find it. Like Michael says this is
pretty basic, but it can be very powerful also. Back in the old days, a
floating point processor was a luxury that few could afford. So, it was done by
using large rationalized integers i.e. the internal representation may say 101,
but it means .5 when displayed. One application needed exact bit precision down
to numbers as small as 10^-23 which requires 48 bytes of precision.

    Relative to this discussion can anyone tell me what we have to work with
here for floating point, or where to find the info?

Gordon


"Michael S. Davis" wrote:

> On Wed, 25 Aug 1999, John Marshall wrote:
>
> > Mike Davis writes:
> > > Is there a method (or algorigthm) for dealing with 64 bit integers
> > > using only 32 bit data types?
> >
> > Of course there is!  For what you want to do, you need to implement
> > modulus and division.  Modulus by a small divisor is easy, and the
> > algorithm for division is called "long division".  It's not a lot of fun,
> > but it's a lot easier in base 2 (or with numbers only 64/32 = two digits
> > long) than the general purpose base-10-arbitrarily-long-numbers algorithm
> > you learnt at primary school.  (There's sample code in libgcc2.c in the
> > GCC source code.)
> >
> > > Remember I
> > > can't use any * or / (on the entire number) since only 32 bit data
> > > types and lower are available.
> >
> > Why not?  Can't you use the 64 bit operations supplied by your compiler?
> > (We covered this here only last month.  Use The Archives.)
>
> I'm fairly new to this list.  Where is the archive?
>
> I guess I was so focused on the palm data types that I forgot about the
> native GCC data types.  I did not realize that there was a type for 64
> bit integers in GCC.  Oh well, it's not the first time I've asked a
> stupid question and it probably won't be the last.
>
> > > Or is there an easier way?
> >
> > Make them enter the number in hex?  :-)
>
> The point of my question was to have them enter Dec and calculate the
> Hex value.  So, if they could enter in Hex, they would not need the
> calculation:-)
>
> >     John
> >
> >
>
> ----------------------------------------------------
> Shoot-to-Win
>
> Protect the 2nd Amendment
> ----------------------------------------------------

Reply via email to