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

Re: Motion P1788/M0029.01: Level-3-interface-only --- Final version to vote on



> From: John Pryce <j.d.pryce@xxxxxxxxxxxx>
> Subject: Re: Motion P1788/M0029.01: Level-3-interface-only --- Final version to vote on
> Date: Wed, 4 Jan 2012 15:39:06 +0000
> To: stds-1788 <stds-1788@xxxxxxxxxxxxxxxxx>
> 
> 
> Vincent
> 
> On 4 Jan 2012, at 13:08, Vincent Lefevre wrote:
> > Sorry, I'm quite late in the discussion...
> > On 2011-12-14 15:37:26 -0800, Dan Zuras Intervals wrote:
> >> 	If our compiler people do not object, I think this is an
> >> 	excellent idea.  The use of "type" as an abstraction &
> >> 	"format" as the layout in memory is more in keeping with
> >> 	the colloquial use of these words.  Therefore, more clear
> >> 	to our users.
> >
> > Well, in languages, the "type" notion carries more than an abstraction
> > and even the layout in memory. For instance, in C, you have two
> > different types "int" and "long", and they are different even if
> > they have the same properties (same width and so on).
> >
> > One needs to be very careful here. For instance, what if you have
> > an interval encoded by (inf,sup) and another one (-inf,sup), with
> > the same abstraction (Level 3 is also the same). Would you consider
> > that since the abstraction is the same, their type (in P1788) is
> > also the same? If yes, would you allow operations between them?

	Vincent,

	I feel this brings up a false concern.  For any given
	machine one would choose one or another (not both) on
	grounds of efficiency of implementation on THAT machine.

	As for a colllection of machines...

> 
> Late, but well asked. I have tried to address this in the Level 2 text. =
> Here is the current, pretty rough, version.  IGNORE everything from 6.7 =
> onward. The key subclauses for the question you ask are 6.1 to 6.3. See =
> especially the Example in 6.3.1.
> 
> My answer to your (inf,sup) question is that they would normally be =
> different types.
> 
> A silly addendum to this is:
> However, a weird implementation could treat them as the same type T. It =
> would have to have some way to know which mode of storage was being used =
> for each particular datum. Then the Level 3 pairs of, say binary64, =
> numbers (2,3) and (-2,3) could both represent the Level 2 datum "[2,3] =
> of type T" and would therefore be regarded as the same datum at Level 2, =
> see end of 6.1 para 3.
> This might conceivably make sense if you had a 200-processor machine =
> where (inf,sup) was more efficient on 100 of the processors, and =
> (-inf,sup) was more efficient the other 100, and the compiler inserts =
> code to flip the relevant sign bit whenever it sees a datum is flying =
> from one kind of processor to the other...??

	On a heterogeneous collection of machines, interchange
	would happen in exactly this manner.  So the issue of
	operations among [lo,hi] or [-lo,hi], or even [lo,-hi]
	implementations never comes up because one never sees
	more than one implementation on any conforming system.


				Dan

> 
> Vincent, you are just the person whom I should like to pick holes in my =
> presentation. I look forward to your doing so.
> 
> Regards
> 
> John
>