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

Re: Level 2 query, number 2



Michel et al,

Isn't this question the same as decimal-to-binary and
binary-to-decimal conversion, something that has been well studied?

Michel, your analysis appears to be correct.  The question then
is related to "do we really want an inward rounding in decimal to binary
conversion (or visa versa)?"  To me, that seems a bit dangerous.  (I'm guessing
most of us would want outward, but perhaps tight, rounding in each
direction, when the operations are considered separately.)

One solution would be, as you say, use of
octal or hex, leading to two external representations of intervals
(the comprehensible but lossy decimal representation and the loss-free
octal or hex representation).  However, I am trying to recall or prove that
there is a mantissa length M in decimal representations that assures that
every binary number, say, in 754 double, is uniquely represented with
M digits.  If so, then we can use such a decimal representation, although
we would then need two conversion routines: one with outward rounding
and one with "lossless" rounding.  My own preference would be to stick
with outward rounding, and use hex representation for lossless conversion;
it seems simpler to me.

Baker

On 9/4/2011 5:37 PM, Michel Hack wrote:
1. Every (bare) interval type T must have a loss-free way to write
    any datum (i.e. interval) in T as text, and to read that text
    back to recover the original datum exactly.

Assuming we're going back to the same representation (e.g. on the same
platform).  Even then it needs the concept of recovery conversion, unless
the text representation was exact (e.g. %a hex representation of BFP, or
decimal representation of DFP).  Otherwise you could get two successive
outward roundings.

I seem to recall that this was discussed previously.  If the text is not
exact, conversion to text could be outward-rounding, and recovery conversion
would then be inward rounding.  Alternatively, both could use to-nearest,
but then the text would have to be flagged as being a representation of an
internal interval type.  In either case we need to distinguish between
import/export conversion and conversion of one interval type (internal) to
another (text, possibly external).  The advantage of the notion of recovery
conversion is that only one internal-to-text method is needed, though we
still need two text-to-internal methods.

Michel.
---Sent: 2011-09-04 22:53:47 UTC



--

---------------------------------------------------------------
Ralph Baker Kearfott,   rbk@xxxxxxxxxxxxx   (337) 482-5346 (fax)
(337) 482-5270 (work)                     (337) 993-1827 (home)
URL: http://interval.louisiana.edu/kearfott.html
Department of Mathematics, University of Louisiana at Lafayette
(Room 217 Maxim D. Doucet Hall, 1403 Johnston Street)
Box 4-1010, Lafayette, LA 70504-1010, USA
---------------------------------------------------------------