Floating point minimum values are positive?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jul 23 07:26:23 PDT 2013


On Tue, Jul 23, 2013 at 09:39:05AM +0200, David wrote:
> > There are some floats that can go even smaller than this, but they
> > are "denormal" and may incur a large runtime overhead (they are
> > intended to prevent underflow / minimize loss of precision in
> > certain computations involving very small quantities, and aren't
> > supposed to be used in normal calculations).
> 
> We were taught something else in university.
> Small overhead, though CPUs can handle them (not software implemented)
> and they are used when needed, you can't choose to use it or not to use it.

Well, I learned this from Wikipedia, so I'm not 100% sure whether or not
it's accurate:

http://en.wikipedia.org/wiki/Denormal_number#Performance_issues


T

-- 
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan


More information about the Digitalmars-d-learn mailing list