Re: P1788 input/output
On 2013 Jul 22, at 09:36, Vincent Lefevre wrote:
> On 2013-07-19 20:57:20 +0100, John Pryce wrote:
>> On 2013 Jun 28, at 13:18, Vincent Lefevre wrote:
>>> ...If we don't plan to specify free-form output (I don't think we should,
>>> as this must remain language-defined or implementation-defined, IMHO),
>>> then we don't need it: this is just a language matter. You can mention
>>> that in a footnote.
>> Why shouldn't we? Maybe there's a misunderstanding, "free-form"
>> isn't the correct word? But IMO we need a "vanilla" way to turn an
>> interval to an interval literal.
> Well, it depends on what you propose...
E.g., outputting it in inf-sup from using %g conversion on each bound. E.g. if xx is (a good approximation of) [\pi/1000,\pi], the vanilla form interval2text(xx) might give the string
"[3.1415e-3, 3.1416]"
(If %g defaults to 5 sig figs; I forget.)
> I have a few comments on the latest version (2013-07-16):
>
> In the last paragraph of §12.1: "exact representation" is vague.
> Is this "exact character-string representation"? To avoid any
> ambiguity, it should give a reference to §12.4.
OK
> In §12.4: I don't understand the paragraph after the note. Don't
> you mean interval2exact and interval2text?
It seems correct & reasonably clear to me. But maybe delete
> ", and the operation exact2interval shall be the same as text2interval"
and at the end of that paragraph add
> Since s is an interval literal whose exact value equals x, the operation T-text2interval will recover x exactly and can be used to perform the function of T-exact2interval.
Does that say it better?
> I think 0 should also be represented as "0".
When? Instead of the hex-sig form "0x0p0"?
> And couldn't interval literals "[x]" be allowed for point intervals?
For this & the previous: exact representation is meant to be human-readable, but that's not its prime aim! A simple description is more important. These seem low-priority changes. Unless I'm misunderstanding you.
For *input*, i.e. exact2interval(), there's nothing to stop one using these simplifications, if one is actually using text2interval() to do the job.
John Pryce
John