Bug in srfi-48?
Donald Allen <[email protected]> Wed, 11 Oct 2017 15:42:51 -0400
| Newsgroups | gmane.lisp.scheme.srfi.srfi-48 |
|---|---|
| Message-ID | <CAPsTYbw0hkELEKH1298=k9J9_g_bW4Ro1wEnJSaZAU1w949i5w@mail.gmail.com> |
--001a1141795a138ecc055b4aa139 Content-Type: text/plain; charset="UTF-8" X-SL-Modified: truncated_text Using Gambit 4.8.8 on an Arch Linux system: > (load "srfi-48.scm") "/home/dca/Software/newcash/gLibraries/srfi-48/srfi-48.scm" > (format "~a & ~7,2F\\%\\\\\n" "Framingham Mass Muni Purpose Loan" .997554209949891) *** ERROR IN compose-with-digits, "srfi-48.scm"@86.46 -- (Argument 2) NUMBER expected (+ 1 #f) Previous calls in my code with the numeric argument > 1 worked (in the sense of not producing errors), but here's an example where the result seems incorrect: 2> (format "~a & ~7,2F\\%\\\\\n" "Framingham Mass Muni Purpose Loan" 1.997554209949891) "Framingham Mass Muni Purpose Loan & 2.10\\%\\\\\n" 3> (/ (round (* 1.997554209949891 100)) 100) 2. /Don Allen --001a1141795a138ecc055b4aa139 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SL-Modified: truncated_html <div dir=3D"ltr"><div><div>Using Gambit 4.8.8 on an Arch Linux system:<br><= br>> (load "srfi-48.scm")<br>"/home/dca/Software/newcash/= gLibraries/srfi-48/srfi-48.scm"<br>> (format "~a & ~7,2F\\= %\\\\\n" "Framingham Mass Muni Purpose Loan" .99755420994989= 1)<br>*** ERROR IN compose-with-digits, "srfi-48.scm"@86.46 -- (A= rgument 2) NUMBER expected<br>(+ 1 #f)<br><br></div>Previous calls in my co= de with the numeric argument > 1 worked (in the sense of not producing e= rrors), but here's an example where the result seems incorrect:<br><br>= 2> (format "~a & ~7,2F\\%\\\\\n" "Framingham Mass Mun= i Purpose Loan" 1.997554209949891)<br>"Framingham Mass Muni Purpo= se Loan &=C2=A0=C2=A0=C2=A0 2.10\\%\\\\\n"<br><br>3> (/ (round = (* 1.997554209949891 100)) 100)<br>2.<br><br></div>/Don Allen<br><div><br><= /div></div> --001a1141795a138ecc055b4aa139--