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

Re: text2interval again /



Richard Fateman wrote:
> On 3/7/2013 8:52 PM, Michel Hack wrote:
> > If the sign of the error is known -- and it can be known when directed
> > rounding is used appropriately -- then this is perfectly ok.
>
> This is pretty unlikely, it seems to me.  Most programming environments
> do not support directed rounding in any convenient or portable fashion
> and so few mathematical libraries use them.  And if they were used, it
> would be in internal forms to achieve a final result which was correctly
> rounded to nearest.

Motion 24 requires support for directed rounding in P1788, although this
has not yet been incorporated in the draft text as far as I could figure
out in a quick browsing.  The purpose is clear: sometimes better enclosures
can be computed using directed rounding on endpoints than by using intervals
as primitive objects, e.g. to exploit monotonicity properties.

Portability of directed rounding has improved a lot in the last ten years,
as support of <fenv.h> in C has become widespread, with fesetround().

> That is, something like:
>    set_rounding_mode(negative_infinity)
>    y:=sin(x)
> is not the kind of thing supported anyplace I know of, to get
> a lower bound on sin(x).  Perhaps you know of such a system?

Well, a P1788-conforming system would have either that,
or an interval version of sin() where one could use
  y:= inf(sin(nums2interval(x,x)),
(or perhaps no support for trigonometric functions, which
might end up just being recommended rather than required,
in which case that environment would indeed be unsuitable
for writing this kind of program).

I note that 754-2008 recommends, but does not require, support
for correctly-rounded versions of many of the common elementary
functions, and such libraries have become available in the last
decade.  Correct rounding includes support for directed rounding.

Michel.
---Sent: 2013-03-08 15:43:43 UTC