Skip to content

SPSSWriter: Fix value of $sysmis.#1

Merged
tiamo merged 1 commit intotiamo:masterfrom
blp:master
Sep 4, 2015
Merged

SPSSWriter: Fix value of $sysmis.#1
tiamo merged 1 commit intotiamo:masterfrom
blp:master

Conversation

@blp
Copy link
Copy Markdown
Contributor

@blp blp commented Jul 26, 2015

$sysmis is supposed to be a floating-point value that, when written to an
SPSS system file, represents the system-missing value. The previous value
was incorrect: when written to a system file, it yielded the bytes
fe ff ff ff ff ff ef c3, instead of the correct bytes
ff ff ff ff ff ff ef ff. This was because of the difference between
integer and floating point: when -0xFFFFFFFFFFFFEFFF is converted to an
IEEE-754 "double", the bit representation changes. This commit corrects
the problem, as can be observed by running test_write.php and observing
the bytes written in the machine floating point record at offset 0xb40.

$sysmis is supposed to be a floating-point value that, when written to an
SPSS system file, represents the system-missing value.  The previous value
was incorrect: when written to a system file, it yielded the bytes
fe ff ff ff ff ff ef c3, instead of the correct bytes
ff ff ff ff ff ff ef ff.  This was because of the difference between
integer and floating point: when -0xFFFFFFFFFFFFEFFF is converted to an
IEEE-754 "double", the bit representation changes.  This commit corrects
the problem, as can be observed by running test_write.php and observing
the bytes written in the machine floating point record at offset 0xb40.
tiamo added a commit that referenced this pull request Sep 4, 2015
SPSSWriter: Fix value of $sysmis.
@tiamo tiamo merged commit f83d591 into tiamo:master Sep 4, 2015
@tiamo
Copy link
Copy Markdown
Owner

tiamo commented Sep 4, 2015

Thanks

tiamo pushed a commit that referenced this pull request Mar 5, 2019
Merge changes from upstream
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants