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

Re: Difficulties in implementation of textToInterval(s)



Dmitry, 

> On May 21, 2016, at 14:11, Dmitry Nadezhin <dmitry.nadezhin@xxxxxxxxxx> wrote:
> 
> Ned,
> 
> If you decide to make changes in textToInterval(s) text,
> then perhaps you consider to put omitted text about rational number literal
> from the paragraph 9.7.2(c) of IEEE 1788
> as the third case of section 6.6.2 of the P1788.1 .
> 
> In this case every output of IEEE 1788 intervalToText(X, cs) operation
> can be parsed by P1788.1 textToInterval(s) constructor.
> 
> Also, if I don't miss something,
> the omission of rational number literal
> is the only obstacle which prevents P1788.1 to
> become a flavor of IEEE 1788.

For the sake of simplicity, I would really like to keep the rational number literals
out of the simplified standard. 
> 
> About difficulty of conversion.
> Now section 6.7.5 of P1788.1 requires that constructot textToInterval(s)
> must return the hull of exact interval for any input string s.
> It might be difficult if s contains long decimal literal or long rational literals.
> Does it make sense to demand hull only for strings of limited length ?
> We could follow specification of decimal to binary conversion from IEEE 754-2008.
> The section 5.12.2 of of IEEE 754-2008 requires exact conversion only for
> decimal strings with H decimal digits or less. H = 20 for bin64 format.
> For longer strings, accuracy of the constructor could be implementation-dependent.

If we have l and u in [ l, u ] of the same radix (as suggested in my previous e-mail), 
we can leave it as implementation dependent how they are (outward) rounded when 
converted to binary64.  

Ned

> 
> Best Regards,
>  -Dima