Re: Errata for SRFI 48: Intermediate Format Strings

"Arthur A. Gleckler" <[email protected]> Mon, 30 Oct 2017 10:20:14 -0700
Newsgroups gmane.lisp.scheme.srfi.srfi-48
Message-ID <CALnw4LKpexux0Awx4VFgLarBU4i=Zq2tzVB_ypFMP-innDbHUg@mail.gmail.com>
--001a1136f91a44ca8c055cc6db66
Content-Type: text/plain; charset="UTF-8"
X-SL-Modified: truncated_text

Yet more fixes from Mr. Hamayama:

  I found following error cases.

  (a) (format "~1,0F" 1.5)       -> "1."
  (b) (format "~1,0F" (/. 1 0))  -> "+inf."
  (c) (format "~1,0F" (/. -1 0)) -> "-inf."
  (d) (format "~1,0F" (/. 0 0))  -> "+nan."
  For (a), (format "~1,0F" 1.5) must return "2."
  because 'round' of Scheme uses banker's rounding.

  The reason of (a) is that integer part and fractional part
  were processed separately.

  For (b)-(d), it is necessary to check +inf.0, -inf.0, +nan.0, -nan.0.

  I fixed these cases and updated tests.

Here's the diff:

  <https://github.com/scheme-requests-for-implementation/srfi-48/compare/
d35962746b6ccf25ce7490fdf059305e8c5d5949...
4d557f6de759966dadcf66b808450e2f72e30097>

Regards,


SRFI Editor

--001a1136f91a44ca8c055cc6db66
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-SL-Modified: truncated_html

<div dir=3D"ltr"><div>Yet more fixes from Mr. Hamayama:</div><div><br></div=
><div>=C2=A0 I found following error cases.</div><div><br></div><div>=C2=A0=
 (a) (format &quot;~1,0F&quot; 1.5)=C2=A0 =C2=A0 =C2=A0 =C2=A0-&gt; &quot;1=
.&quot;</div><div>=C2=A0 (b) (format &quot;~1,0F&quot; (/. 1 0))=C2=A0 -&gt=
; &quot;+inf.&quot;</div><div>=C2=A0 (c) (format &quot;~1,0F&quot; (/. -1 0=
)) -&gt; &quot;-inf.&quot;</div><div>=C2=A0 (d) (format &quot;~1,0F&quot; (=
/. 0 0))=C2=A0 -&gt; &quot;+nan.&quot;</div><div>=C2=A0 For (a), (format &q=
uot;~1,0F&quot; 1.5) must return &quot;2.&quot;</div><div>=C2=A0 because &#=
39;round&#39; of Scheme uses banker&#39;s rounding.</div><div><br></div><di=
v>=C2=A0 The reason of (a) is that integer part and fractional part</div><d=
iv>=C2=A0 were processed separately.</div><div><br></div><div>=C2=A0 For (b=
)-(d), it is necessary to check +inf.0, -inf.0, +nan.0, -nan.0.</div><div><=
br></div><div>=C2=A0 I fixed these cases and updated tests.</div><div><br><=
/div><div>Here&#39;s the diff:</div><div><br></div><div>=C2=A0 &lt;<a href=
=3D"https://github.com/scheme-requests-for-implementation/srfi-48/compare/"=
>https://github.com/scheme-requests-for-implementation/srfi-48/compare/</a>=
<span style=3D"color:rgb(36,41,46);font-family:SFMono-Regular,Consolas,&quo=
t;Liberation Mono&quot;,Menlo,Courier,monospace;font-size:12px">d35962746b6=
ccf25ce7490fdf059305e8c5d5949...</span><span style=3D"color:rgb(36,41,46);f=
ont-family:SFMono-Regular,Consolas,&quot;Liberation Mono&quot;,Menlo,Courie=
r,monospace;font-size:12px">4d557f6de759966dadcf66b808450e2f72e30097</span>=
&gt;</div><div><br></div><div>Regards,</div><div><br></div><div><br></div><=
div>SRFI Editor</div></div>

--001a1136f91a44ca8c055cc6db66--