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

Re: Motion 46: finalise interval literals, amendments



Sorry, I don't understand why needing to store 1 when processing [1, h] to distinguish between 1 <= u and 1 > u needs unbounded memory.  Can't you just store 1 as a floating point value of bounded size (eg, 8 bytes for double precision)?

Does the problem only occur when using arbitrary precision and with an arbitrarily long numerator?

- Ian McIntosh          IBM Canada Lab         Compiler Back End Support and Development


Inactive hide details for Vincent Lefevre ---07/11/2013 09:17:37 AM---On 2013-07-10 19:27:43 -0700, Dmitry Nadezhin wrote: > > Vincent Lefevre ---07/11/2013 09:17:37 AM---On 2013-07-10 19:27:43 -0700, Dmitry Nadezhin wrote: > > Am I right that this p/q feature is the ONL


    From:

Vincent Lefevre <vincent@xxxxxxxxxx>

    To:

Ian McIntosh/Toronto/IBM@IBMCA

    Date:

07/11/2013 09:17 AM

    Subject:

Re: Motion 46: finalise interval literals, amendments





On 2013-07-10 19:27:43 -0700, Dmitry Nadezhin wrote:
> > Am I right that this p/q feature is the ONLY place in the standard
> > that specifies data structures of unbounded size?
>
> No, this feature is not the only place.
>
> Suppose input stream with interval literal [l,h] where l and u are
> decimal string. We need to store l in memory to distinguish between
> l <= u and l > u.

In the discussion about nums2interval, I wanted to drop this
distinction because of such kind of problems, which may occur
with some numeric types. Of course, problems are the same with
interval literals.

So, if rationals are supported, I agree that we should not require
correct rounding for all possible inputs. In particular, this would
mean that the above distinction needs to be dropped.

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



GIF image

GIF image