Hello,
I think the floating-point operators:
a !<>= b
a !<> b
a <> b
a <>= b
a !> b
a !>= b
a !< b
a !<= b
are useless. A simple peephole optimization in the compiler can
automatically rewrite NaN test followed by regular operations into the
operations above, for example:
i
On Sun, 17 May 2009 21:14:46 +0400, Andrei Alexandrescu
wrote:
> Hello,
>
>
> I think the floating-point operators:
>
>a !<>= b
>a !<> b
>a <> b
>a <>= b
>a !> b
>a !>= b
>a !< b
>a !<= b
>
> are useless. A simple peephole optimization in the compiler can
> auto
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Denis Koroskin wrote:
> On Sun, 17 May 2009 21:14:46 +0400, Andrei Alexandrescu
> wrote:
>
>> Hello,
>>
>>
>> I think the floating-point operators:
>>
>>a !<>= b
>>a !<> b
>>a <> b
>>a <>= b
>>a !> b
>>a !>= b
>>a !< b
>>
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
> Hello,
> I think the floating-point operators:
>a !<>= b
>a !<> b
>a <> b
>a <>= b
>a !> b
>a !>= b
>a !< b
>a !<= b
> are useless. A simple peephole optimization in the compiler can
> auto
Andrei Alexandrescu Wrote:
> Hello,
>
>
> I think the floating-point operators:
>
>a !<>= b
>a !<> b
>a <> b
>a <>= b
>a !> b
>a !>= b
>a !< b
>a !<= b
>
> are useless. A simple peephole optimization in the compiler can
> automatically rewrite NaN test followed
Andrei Alexandrescu wrote:
> I think the floating-point operators:
>
>a !<>= b
>a !<> b
>a <> b
>a <>= b
>a !> b
>a !>= b
>a !< b
>a !<= b
>
> are useless.
Actually, I like the concept of comparison operators for partial orders.
When I first read the D1 specs, th
Denis Koroskin wrote:
On Sun, 17 May 2009 21:14:46 +0400, Andrei Alexandrescu
wrote:
Hello,
I think the floating-point operators:
a !<>= b
a !<> b
a <> b
a <>= b
a !> b
a !>= b
a !< b
a !<= b
are useless. A simple peephole optimization in the compiler can
automat
dsimcha wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s article
Hello,
I think the floating-point operators:
a !<>= b
a !<> b
a <> b
a <>= b
a !> b
a !>= b
a !< b
a !<= b
are useless. A simple peephole optimization in the compiler can
automatica
Hello Don,
But unfortunately, in
solving an obscure corner case, the IEEE standard destroyed one of the
most basic axioms in mathematics.
But math deals with numbers (for the most part) and as the name says NaN
is Not a Numebr.
(Not that I think it is or isn't a bad idea, I'm not in a posit
By the way, why is it that the is operator has the same behavior as ==
regarding NaNs? IMHO is should just compare the values bitwise.
Don wrote:
dsimcha wrote:
== Quote from Andrei Alexandrescu (seewebsiteforem...@erdani.org)'s
article
Hello,
I think the floating-point operators:
a !<>= b
a !<> b
a <> b
a <>= b
a !> b
a !>= b
a !< b
a !<= b
are useless. A simple peephole optimization in the compiler ca
Michiel Helvensteijn wrote:
> There's this thing, though. I would make it so !(a op b) is equivalent to
> (a !op b). It's a nice property. The IEEE standard requires that you set a
> certain exception flag when comparing with a NaN value, right? Well, just
> set the flag with the extra operators a
Don wrote:
Inclusion of the NCEG operators was a bit of tokenism, making a _very_
strong statement that D took numerical programmers seriously. But I
think D's at the point where it can make that statement without relying
on tokenism.
So is it ok to yank them?
Andrei
a <> b
It's an old wish of mine that this be used for the invocation of opCmp
(instead of opEquals), returning an int, and valid for
struct/class/built-ins/etc... (like perl's <=>, I think)
As for the other operators, I never used them and I don't think I would
use them ever often enough
Andrei Alexandrescu wrote:
Don wrote:
Inclusion of the NCEG operators was a bit of tokenism, making a _very_
strong statement that D took numerical programmers seriously. But I
think D's at the point where it can make that statement without
relying on tokenism.
So is it ok to yank them?
And
15 matches
Mail list logo