Skip to content

Commit

Permalink
Merge pull request #445 from MartinNowak/nceg
Browse files Browse the repository at this point in the history
remove NCEG specs
  • Loading branch information
andralex committed Dec 18, 2013
2 parents 5d336d5 + 17729ed commit 8238186
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
15 changes: 0 additions & 15 deletions d-floating-point.dd
Expand Up @@ -243,21 +243,6 @@ $(LI $(D ulong getNaNPayload(real x)) -- returns the integer payload. Note that

$(P $(I Never) store a pointer as an integer payload inside a NaN. The garbage collector will not be able to find it!)

$(H2 NCEG comparison operations)

$(P As well as the usual $(D <), $(D >), $(D <=), and $(D >=) comparison operators, D also supports the "NCEG" operators. Most of them are the direct negation of the ordinary operators. Additionally, $(D <>), $(D <>=), $(D !<>), and $(D !<>=) are provided. These 8 new operators are different from the normal operators only when a NaN is involved, so for the most part they are quite obscure. They are useful mainly in eliminating the possibility of NaN before beginning a calculation.
The most useful relationships are probably:
$(UL
$(LI $(D x <>= y) is the same as $(D !isNaN(x) && !isNaN(y)), (except that signalling NaNs may be triggered by <>=).)
$(LI $(D x !<>= y) is the same as $(D isNaN(x) || isNaN(y)).)
)
If $(D y) is any compile-time constant (eg 0), these reduce to $(D !isNaN(x) and isNaN(x)).
Note that $(D x==x) is the same as $(D !isNaN(x)), and $(D x!=x) is the same as $(D isNaN(x)).
$(D abs(x) !< x.infinity) is the same as $(D isNaN(x) || isInfinity(x))
The above relationships are useful primarily because they can be used in compile time functions.
Very few uses are known for the remaining NCEG operators.
)

$(H2 The IEEE Rounding Modes)

$(P The rounding mode is controlled within a scope. Rounding mode will be restored to its previous state at the end of that scope.
Expand Down
19 changes: 0 additions & 19 deletions float.dd
Expand Up @@ -122,25 +122,6 @@ $(H3 Exception Flags)
$(P These flags can be set/reset via the functions in
$(DPLLINK phobos/std_c_fenv.html, std.c.fenv).)

$(H3 Floating Point Comparisons)

$(P In addition to the usual $(D <) $(D <)$(D =)
$(D >) $(D >)$(D =) $(D ==) $(D !=) comparison
operators, D adds more that are
specific to floating point. These are
$(D !<>=)
$(D <>)
$(D <>=)
$(D !<=)
$(D !<)
$(D !>=)
$(D !>)
$(D !<>)
and match the semantics for the
NCEG extensions to C.
See $(DDSUBLINK expression, floating_point_comparisons, Floating point comparisons).
)

$(H3 $(LNAME2 floating-point-transformations, Floating Point Transformations))

$(P An implementation may perform transformations on
Expand Down

0 comments on commit 8238186

Please sign in to comment.