## c++ - comparison operators !< !<> ...

- Heinz Saathoff (10/10) Sep 08 2005 Hello,
- Walter Bright (10/19) Sep 08 2005 Yes.
- Heinz Saathoff (3/28) Sep 08 2005 Thanks. I will have a look on that article.

Hello, I just had a look at math.h and found the macros for isgreater, isless and some others. The definition of isgreater is #define isgreater(x,y) !((x) !> (y)) Are these !op comparison operators DMC-extension (I didn't find any reference to these elsewhere)? It seems that !op negates the result of the comparison, so that a !> b is the same as !(a > b) Is this right? If so, why have you extended the standard operators? - Heinz

Sep 08 2005

"Heinz Saathoff" <hsaat despammed.com> wrote in message news:MPG.1d8a0089f315b39d9896f1 news.digitalmars.com...I just had a look at math.h and found the macros for isgreater, isless and some others. The definition of isgreater is #define isgreater(x,y) !((x) !> (y)) Are these !op comparison operators DMC-extension (I didn't find any reference to these elsewhere)? It seems that !op negates the result of the comparison, so that a !> b is the same as !(a > b) Is this right?Yes.If so, why have you extended the standard operators?Back around 1990 or so, there was a group called NCEG (Numerical C Extensions Group) that was interested in fixing C's deficiencies at numerical computing. They produced an excellent proposal for doing this, and I implemented all of it. Unfortunately for C, it was never adopted by the C standard, though parts of it did find their way into the C99 standard. You can find the documentation for them at www.digitalmars.com/ctg/ctgNumerics.html

Sep 08 2005

Walter Bright schrieb...Thanks. I will have a look on that article. - HeinzI just had a look at math.h and found the macros for isgreater, isless and some others. The definition of isgreater is #define isgreater(x,y) !((x) !> (y)) Are these !op comparison operators DMC-extension (I didn't find any reference to these elsewhere)? It seems that !op negates the result of the comparison, so that a !> b is the same as !(a > b) Is this right?Yes.If so, why have you extended the standard operators?Back around 1990 or so, there was a group called NCEG (Numerical C Extensions Group) that was interested in fixing C's deficiencies at numerical computing. They produced an excellent proposal for doing this, and I implemented all of it. Unfortunately for C, it was never adopted by the C standard, though parts of it did find their way into the C99 standard. You can find the documentation for them at www.digitalmars.com/ctg/ctgNumerics.html

Sep 08 2005