On Sat, Feb 17, 2001 at 02:57:35PM -0500, Ilya Zakharevich wrote: > On Sat, Feb 17, 2001 at 05:14:25PM +0000, email@example.com wrote: > > >> The frexp() function is used to split the number x into a > > >> normalized fraction and an exponent which is stored in > > >> exp. > > > > > >I would not think that this has anything to do with the bitpattern > > >manipulations you described above. > > > > Sure it is. > > frexp() says extract the exponent and stuff it in the integer provided, > > then set the exponent to 0 and return the resulting double which is > > now the fraction. > > But you are back where you were: how do you extract the bitpattern > from the "normalized fraction" part? I may be jumping in at a bad point in this thread as I have not followed it all. But Convert::ASN has to do just this and it does it using frexp and then calling modf() repeatedly while multiplying the mantissa. Graham.