?

Log in

No account? Create an account
Wizard question - dmv/blogs/lj

> Recent Entries
> Archive
> Friends
> Profile
> dmv/index

Links
dmv/index

Alt. Info Streams
Twitter
Memestream
Flickr Stream

August 7th, 2002


Previous Entry Share Next Entry
01:43 pm - Wizard question
In C++

Our floating point library needs a value for inf and -inf. Presently, this was done by

min_real_val = -1.0 / 0.0;

and the obvious counter to that. This causes the compiler (our compiler, even) to complain... but it works (I believe). Is there a better way to get these values?

(12 comments | Leave a comment)

Comments:


[User Picture]
From:daemonv
Date:August 7th, 2002 01:41 pm (UTC)
(Link)
Based on these three results, I was able to find my answer.

inf := 0x7F800000 | 0x7FF0000000000000

-inf := 0xFF800000 | 0xFFF0000000000000



> Go to Top
LiveJournal.com