why Float::MIN? is positive

C

Charles Mills

Sorry for typo in previouse post:
Shouldn't Float::MIN = -Float::MAX

Float::MIN is the smallest number > 0 that can be represented by a
Float. Usefull I guess if you need to represent really small values.

Float objects are basically a wrapper around a C double.

on my system it is:

irb(main):001:0> Float::MIN
=> 2.2250738585072e-308

which is in the float.h header as
#define __DBL_MIN__ 2.2250738585072014e-308

-Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,169
Messages
2,570,920
Members
47,462
Latest member
ChanaLipsc

Latest Threads

Top