between and among: worth Phobosization?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Dec 17 18:17:05 PST 2013


On 12/17/13 5:58 PM, "Ola Fosheim Grøstad" 
<ola.fosheim.grostad+dlang at gmail.com>" wrote:
> On Tuesday, 17 December 2013 at 21:57:54 UTC, Andrei Alexandrescu wrote:
>> In an interval arithmetic approach numbers would compare actually
>> equal, i.e. 10 == IntervalInt(5, 100) would be true.
>
>
> Why is that? I would think that 10 == Interval(10,10), but
> interval(5,100).contains(10) ?

Yah, defining == my way would make it non-transitive.

> True interval arithmetic is difficult to
> implement though, since !(a<b) does not imply (a>=b) if I got it right…

I didn't peruse the wikipedia page in detail but it seems a lot of 
interval arithmetic is well-defined.

> So you you might have to introduce a tri-boolean type

That would be good too for distinct reasons.


Andrei




More information about the Digitalmars-d mailing list