Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: Compressed intervals again (was: Draft decoration system...)



Vincent

On 14 Dec 2012, at 08:54, Vincent Lefevre wrote:
> It should be explicit that normalInterval() is a function that
> depends on the threshold. I suggest to say tau-normalInterval()
> and sigma-normalInterval() for more clarity.
OK. But I was thinking to overload it, since the type of the input can specify which actual operation is chosen.

More generally, what should the standard say about names of operations in the text and their names in a programming language? At the moment at start of 8.6 "Required operations" has (lifted from 754-2008 somewhere)
> 
> The names of operations in this standard, as well as symbols used for operations (e.g., for the comparisons in §8.6.9), may not correspond to those that any particular language would use.

But this should really be said much earlier, in the flavor-independent text (Ch 1), and it needs a more careful statement of policy on overloading operation-names. Something like
> The names of operations in this standard, as well as symbols used for operations (e.g., for the comparisons in §8.6.9), may not correspond to those that any particular language would use.
> Especially at Level 2, a generic (overloaded) operation-name may be used when the actual operation -- in particular the type of the result -- can be uniquely inferred from the input operands. [Example. The names of interval arithmetic operations such as xx+yy, and comparisons such as xx<=yy, can be overloaded since the standard specifies what input-type combinations shall be supported, and the result-type in each case. However, constructors such as <type>-nums2interval(a,b) include the name of the result-type to remove ambiguity. Similarly, operations such as midpoint <format>-mid(xx) include the name of a numeric result-format.]
> These conventions may not correspond to the overloading rules of any particular language.

Comments?

John