in reply to Re: How to determine MIN and MAX values for floating point number
in thread How to determine MIN and MAX values for floating point number

I think you'll want DBL_MAX and DBL_MIN (or LDBL_MAX and LDBL_MIN if $Config{uselongdouble}). And LDBL_MIN isn't the minimum value, it's the minimum possible normal value greater than 0. "Normal" here means a number with the full mantissa's worth of precision. Most implementations allow "subnormal" numbers that can get smaller. For example:
$ perl -MPOSIX=DBL_MIN -wle'print DBL_MIN()' 2.2250738585072e-308 $ perl -MPOSIX=DBL_MIN -wle'print DBL_MIN()/2**52' 4.94065645841247e-324 $ perl -MPOSIX=DBL_MIN -wle'print DBL_MIN()/2**53' 0
  • Comment on Re: Re: How to determine MIN and MAX values for floating point number
  • Download Code