Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ansi-test
ansi-test
Commits
d60a23ae
Commit
d60a23ae
authored
Nov 26, 2019
by
Daniel Kochmański
Browse files
Merge branch 'patch-2' into 'master'
Add more cases to FORMAT.F.46 See merge request
!34
parents
91e61bee
71fd482d
Changes
1
Hide whitespace changes
Inline
Side-by-side
printer/format/format-f.lsp
View file @
d60a23ae
...
...
@@ -559,9 +559,16 @@
(def-format-test format.f.45b
"~3f" (1.1) "1.1")
;; This fails on ECL 15.3.7
;;; Rationale for FORMAT.F.46: (format nil "~2f ~1f ~0f" 0.01 0.01 0.01) on SBCL
;;; 1.5.7 evaluates to ".0 .01 .01" which is enough for me to state that these
;;; three cases are not a part of one equivalence partition and that testing for
;;; these three cases explicitly is likely to find bugs in implementations:
;;; * ~2f is a case where the resulting float fits in the width;
;;; * ~1f is a case where the resulting float does not fit in the width;
;;; * ~0f is a case where the width is zero and therefore might be handled
;;; specially in the code.
(def-format-test format.f.46
"~0f" (0.01
) "
.0")
"
~2f ~1f
~0f" (0.01
0.01 0.01) ".0 .0
.0")
;; sbcl prints "."
(def-format-test format.f.46b
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment