develooper Front page | perl.perl5.porters | Postings from August 2010

Re: PATCH: srand returns the seed

Thread Previous | Thread Next
From:
Bo Lindbergh
Date:
August 2, 2010 16:53
Subject:
Re: PATCH: srand returns the seed
Message ID:
201008021848.o72Im2bc019411@brev.stacken.kth.se
Nicholas Clark wrote:
> What I can't work out is whether there is any shortcut way in ANSI C to find
> out whether a value is -0, distinct from 0, short of *printf().

As long as the compiler is sufficiently C99-like:

    fpclassify(value)==FP_ZERO && signbit(value)


/Bo Lindbergh

Thread Previous | Thread Next


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