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

Re: P1788 input/output



Michel
On 2013 Jul 22, at 15:59, Michel Hack wrote:
> Vincent Lefèvre wrote, concerning equality of "exact representations":
>> Now, I was also thinking of the usual IEEE 754 conversion property: a
>> binary number is often output as decimal with enough digits to recover
>> the original value when interpreting it in rounding-to-nearest in the
>> same floating-point format.  This property is used by the XML schema
>> spec (datatypes).
> 
> This gets us back to "recoverable representations" which I had brought
> up a number of times in the past.  The problem here is that one has to
> record or remember (a) the original type, and (b) the fact that this
> was indeed the result of intervalToRecoverable() -- because recovery
> will have to apply compatible rounding to recover the original interval.
> One of the conversion directions is likely to (technically) violate
> the containment rule, so one always has to be mindful of context.  Both
> intervalToRecoverable() and recoverableToInterval() could use to-nearest,
> or one could use outward rounding and the other inward rounding.
> 
> The nice thing with exact representations is that these difficulties
> can be avoided.

Yes, I remember your discussing "recoverable representations". I really don't care for them because they rely on some quite subtle mathematics, whereas hex-sig form is mathematically trivial, while also exposing the sign-exponent-significand parameters, which I think RR form does not?

John