Tom St Denis <> wrote in message news:<s_fPa.121340$. cable.rogers.com>...
> Brad wrote:
> > I have a problem in that I need to change a large decimal value into
> > its hex equivalent. The largest decimal value I need to represent as
> > hex is 25516777215. The problem here is that this number is larger
> > than any of the C functions can handle. Any suggestions on how to go
> > about this would be appreciated.
>
> Get a big num library?
>
> Do you have the numbers as an ASCII string to begin with? If so than
> just read it to a long long and then do the trivial div/mod to get the
> digits.
>
> If not you will have to be more clever [minimal hexbignum math
]
>
> Tom
I had never heard of a "big number library" before and have since been
told to look into that by more than one person. Since I work in an
application development group and have no control over the OS or the
compiler on it I have made a request for our UNIX team to look into
the installation of the add-on. As for the long long data type, we
are using HPUX_11 and it does not seem to support it in its current
configuration. I assume a big number library will support this data
type.
Thanks for all the suggestions, hopefully a compiler add-on will solve
my problem.
Brad.