Merge pull request #428 from ascherer/typeset-NaN

Consistent formatting of 'NaN'.
This commit is contained in:
Gabriel Dos Reis 2015-12-04 05:30:00 -08:00
commit ef03d8b700

View File

@ -4036,7 +4036,7 @@ Many language and library facilities rely on default constructors to initialize
The default constructor is only auto-generated if there is no user-declared constructor, hence it's impossible to initialize the vector `vd1` in the example above. The default constructor is only auto-generated if there is no user-declared constructor, hence it's impossible to initialize the vector `vd1` in the example above.
There is no "natural" default date (the big bang is too far back in time to be useful for most people), so this example is non-trivial. There is no "natural" default date (the big bang is too far back in time to be useful for most people), so this example is non-trivial.
`{0, 0, 0}` is not a valid date in most calendar systems, so choosing that would be introducing something like floating-point's NaN. `{0, 0, 0}` is not a valid date in most calendar systems, so choosing that would be introducing something like floating-point's `NaN`.
However, most realistic `Date` classes have a "first date" (e.g. January 1, 1970 is popular), so making that the default is usually trivial. However, most realistic `Date` classes have a "first date" (e.g. January 1, 1970 is popular), so making that the default is usually trivial.
##### Example ##### Example