handling T.min the right way

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


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.



More information about the Digitalmars-d mailing list