You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Environment:
Corman Common Lisp 3.1 (Patch level 2) under Windows 10 64bit
Issue:
The Format function's F directive's k parameter fails to move the decimal point of the floating point argument to the right when preceded by a tilde and 2 consecutive commas. This fails in Corman CL, but works in SBCL 1.4.14 64bit and in Clisp 2.49 when tested.
Corman CL Example1: Note the issue is that 0.1 is returned rather than 10.0
Other Format F directive k parameter scenarios seem to work fine for Corman CL...
Corman CL Example2: Corman CL correctly produces the same result as SBCL if a 0 or 1 is entered for the d parameter (decimal digits) between the two commas before the k parameter.
This is the same issue found and fixed in Clozure Common Lisp. This is an oddly obscure bug to coincidentally share with another Common Lisp implementation. Perhaps the solution used to fix Clozure CL can also be used for Corman CL? Do the two Common Lisp implementations already share some code? If yes, can additional Clozure CL code be used to fix other/future Corman CL issues as they're found? See the following closed Clozure CL issue: The Format function's F directive's k parameter fails when preceded by a tilde and 2 commas The Format function's F directive's k parameter fails when preceded by a tilde and 2 commas Clozure/ccl#51
CLHS: 22.3.3.1 Tilde F: Fixed-Format Floating-Point.
"The full form is ~w,d,k,overflowchar,padcharF. The parameter w is the width of the field to be printed; d is the number of digits to print after the decimal point; k is a scale factor that defaults to zero." http://www.lispworks.com/documentation/HyperSpec/Body/22_cca.htm
The text was updated successfully, but these errors were encountered:
ninejaguar
changed the title
The Format function's F directive's k parameter fails when preceded by a tilde and 2 commas
The Format function's F directive's k parameter fails when preceded only by a tilde and 2 commas
Feb 17, 2019
Environment:
Corman Common Lisp 3.1 (Patch level 2) under Windows 10 64bit
Issue:
The Format function's F directive's k parameter fails to move the decimal point of the floating point argument to the right when preceded by a tilde and 2 consecutive commas. This fails in Corman CL, but works in SBCL 1.4.14 64bit and in Clisp 2.49 when tested.
Corman CL Example1: Note the issue is that 0.1 is returned rather than 10.0
SBCL Example1: SBCL produces the correct result, just as Clisp does.
Other Format F directive k parameter scenarios seem to work fine for Corman CL...
Corman CL Example2: Corman CL correctly produces the same result as SBCL if a 0 or 1 is entered for the d parameter (decimal digits) between the two commas before the k parameter.
SBCL Example2: The same correct results as Clisp and Corman CL.
Reference:
This is the same issue found and fixed in Clozure Common Lisp. This is an oddly obscure bug to coincidentally share with another Common Lisp implementation. Perhaps the solution used to fix Clozure CL can also be used for Corman CL? Do the two Common Lisp implementations already share some code? If yes, can additional Clozure CL code be used to fix other/future Corman CL issues as they're found? See the following closed Clozure CL issue:
The Format function's F directive's k parameter fails when preceded by a tilde and 2 commas
The Format function's F directive's k parameter fails when preceded by a tilde and 2 commas Clozure/ccl#51
CLHS: 22.3.3.1 Tilde F: Fixed-Format Floating-Point.
"The full form is ~w,d,k,overflowchar,padcharF. The parameter w is the width of the field to be printed; d is the number of digits to print after the decimal point; k is a scale factor that defaults to zero."
http://www.lispworks.com/documentation/HyperSpec/Body/22_cca.htm
The text was updated successfully, but these errors were encountered: