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

Re: Constructors motion 30 Version 2: small amendment



On 2012-02-07 12:07:21 -0500, Michel Hack wrote:
> Dan Zuras wrote:
> >  P.S. - While num2interval() takes a floating-point number as input
> >         I'm sure that text2interval() can be made safe by defining the
> >         output to be ?roundDown(text2num(text)),roundUp(text2num(text))?.
> 
> Surely he meant:
>           ?text2num(text,roundDown), text2num(text,roundUp)?.

That's very ambiguous. What if text is "3/pi"? Does roundDown mean
that one should use this rounding direction for all operations, in
which case one would get roundDown(3/roundDown(pi())) = 1 with
p = 2 in binary, which is incorrect.

> (In other words, the conversion from string to level-2 datum must use
> directed rounding.  Whether text2num() supports explicit rounding, or
> whether the two conversions must be bracketed by blocks that specify
> a local rounding direction, is a separate issue -- but one that we
> addressed with Motion 24.03, Rounded Operations, which passed.)

Using a local rounding direction doesn't solve the problem, as one
may need to mix rounding directions, as seen above.

Moreover, with text2interval(), the text may specify an interval
such as [-1,1], which is not a numeric value.

-- 
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)