Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mark Evenson
ansi-test
Commits
080cdaa8
Commit
080cdaa8
authored
20 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Added a note for similarity of 0.0 and -0.0
parent
6e998f44
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansi-tests/notes.lsp
+2
-0
2 additions, 0 deletions
ansi-tests/notes.lsp
ansi-tests/sxhash.lsp
+4
-0
4 additions, 0 deletions
ansi-tests/sxhash.lsp
with
6 additions
and
0 deletions
ansi-tests/notes.lsp
+
2
−
0
View file @
080cdaa8
...
...
@@ -31,3 +31,5 @@
#+sbcl (rt::disable-note :open-if-exists-new-version-no-error)
(defnote :negative-zero-is-similar-to-positive-zero
"The definition of similarity implies that -0.0 and 0.0 are similar (for each float type.) If negative zeros are distinct this is probably not good, since it makes (defconstant x 0.0) be nonportable.")
This diff is collapsed.
Click to expand it.
ansi-tests/sxhash.lsp
+
4
−
0
View file @
080cdaa8
...
...
@@ -152,8 +152,10 @@
;;; Since similarity of numbers is 'same type and same mathematical value',
;;; and since sxhash must produce the same value for similar numeric arguments,
;;; (sxhash 0.0) and (sxhash -0.0) must be eql for all float types.
;;; This may be a spec bug, so I've added a note.
(deftest sxhash.17
:notes (:negative-zero-is-similar-to-positive-zero)
(loop for c1 in '(0.0s0 0.0f0 0.0d0 0.0l0)
for c2 in '(-0.0s0 -0.0f0 -0.0d0 -0.0l0)
for t1 = (type-of c1)
...
...
@@ -167,6 +169,7 @@
nil)
(deftest sxhash.18
:notes (:negative-zero-is-similar-to-positive-zero)
(loop for r1 in '(0.0s0 0.0f0 0.0d0 0.0l0)
for c1 = (complex r1)
for r2 in '(-0.0s0 -0.0f0 -0.0d0 -0.0l0)
...
...
@@ -182,6 +185,7 @@
nil)
(deftest sxhash.19
:notes (:negative-zero-is-similar-to-positive-zero)
(loop for r1 in '(0.0s0 0.0f0 0.0d0 0.0l0)
for c1 = (complex 0 r1)
for r2 in '(-0.0s0 -0.0f0 -0.0d0 -0.0l0)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment