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 "~1,0F" 1.5)=C2=A0 =C2=A0 =C2=A0 =C2=A0-> "1= ."</div><div>=C2=A0 (b) (format "~1,0F" (/. 1 0))=C2=A0 ->= ; "+inf."</div><div>=C2=A0 (c) (format "~1,0F" (/. -1 0= )) -> "-inf."</div><div>=C2=A0 (d) (format "~1,0F" (= /. 0 0))=C2=A0 -> "+nan."</div><div>=C2=A0 For (a), (format &q= uot;~1,0F" 1.5) must return "2."</div><div>=C2=A0 because &#= 39;round' of Scheme uses banker'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's the diff:</div><div><br></div><div>=C2=A0 <<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",Menlo,Courier,monospace;font-size:12px">d35962746b6= ccf25ce7490fdf059305e8c5d5949...</span><span style=3D"color:rgb(36,41,46);f= ont-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courie= r,monospace;font-size:12px">4d557f6de759966dadcf66b808450e2f72e30097</span>= ></div><div><br></div><div>Regards,</div><div><br></div><div><br></div><= div>SRFI Editor</div></div> --001a1136f91a44ca8c055cc6db66--