handling T.min the right way

Lionello Lunesu lio at lunesu.remove.com
Mon Mar 19 23:23:10 PDT 2007


Lionello Lunesu wrote:
> Frits van Bommel wrote:
>> Lionello Lunesu wrote:
>>> "Andrei Alexandrescu (See Website For Email)" 
>>> <SeeWebsiteForEmail at erdani.org> wrote in message 
>>> news:45FEE0BC.4000407 at erdani.org...
>>>> The right way is to have T.min always return the minimum value (duh) 
>>>> and define a separate property T.min_positive.
>>>
>>> Isn't this value sometimes also called "epsilon"? I think 
>>> double.epsilon sounds quite nice :)
>>
>> Epsilon is already used for a related concept:
>> ".epsilon -- smallest increment to the value 1" 
>> (http://www.digitalmars.com/d/property.html)
> 
> Huh, I thought it sounded familiar.
> 
> So epsilon is such that 1.0+epsilon!=1.0, and the 'min' we're talking 
> about is such that 0.0+min_positive!=0.0 ? I didn't know these were both 
> useful values.... I wonder how they're actually being used.
> 
> L.

Nevermind, I think I get it. epsilon reflects the smallest exponent, 
whereas min_positive represents the reflects the resolution of the mantissa.

Both have bad names though. What terminology do mathematicians use for 
these 'constants'?

L.



More information about the Digitalmars-d mailing list