develooper Front page | perl.perl5.porters | Postings from February 2001

Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)

From:
Ilya Zakharevich
Date:
February 16, 2001 13:34
Subject:
Re: IV preservation (was Re: [PATCH 5.7.0] compiling on OS/2)
Message ID:
20010216163433.A21515@math.ohio-state.edu
On Fri, Feb 16, 2001 at 09:28:32PM +0000, nick@ing-simmons.net wrote:
> >Etc etc etc.  Checking that a float is an integer is
> >a non-trivial and a very expensive operation.
> 
> No it isn't (at least for IEEE). It is a simple matter of comparing 
> the (binary) exponent with the (known, constant) number of bits in the mantissa.
> and then seeing if there are any non-zero bits to the right of the radix point.
> (am I missing something here?).

AFAIK, there is no API to extract the exponent and the mantissa from
a double.  Did I miss it?

Ilya



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About