Re: Motion 31: V04.2 Revision of proposed Level 1 text
On 2012-01-26 18:01:01 -0500, Michel Hack wrote:
> 5.6.1 Constants. I suppose 'expressible in the C language" is just a
> placeholder at this point. This is separate from using C syntax in
> an illustrative manner in the standard ("This standard writes..."),
> which is ok.
I agree. Also, not telling which C version makes this ambiguous.
However the definition is the same in C99 and C11.
> Table 2, Required forwards elementary functions, Note h: round() should imply
> ties-away-from-zero? Really? Why not stick with the 754 default,
> ties-to-even (at least for BFP; for DFP ties-to-even is recommended,
> but subject to language definition).
There's no default in 754, but 2 different functions:
convertToIntegerTiesToEven and convertToIntegerTiesToAway.
Here C's round() function corresponds to convertToIntegerTiesToAway,
but convertToIntegerTiesToEven is also available with rint() and
the rounding mode to nearest-even.
However, in ECMAScript (ECMA 262), round(x) rounds halfway cases
toward +inf, so that it is equivalent to floor(x+0.5) at Level 1.
And in LIA-2, round() rounds halfway cases to the even integer.
> Perhaps tie it to the language's rule for default rounding, avoiding
> mention of 754, or just mention it as an example.
I wonder what "language's rule for default rounding" means.
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)