dMv (daemonv) wrote,
dMv
daemonv

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?
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 12 comments