Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPSSWriter: Fix value of $sysmis. #1

Merged
merged 1 commit into from Sep 4, 2015
Merged

SPSSWriter: Fix value of $sysmis. #1

merged 1 commit into from Sep 4, 2015

Conversation

@blp
Copy link
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 issue Sep 4, 2015
SPSSWriter: Fix value of $sysmis.
@tiamo tiamo merged commit f83d591 into tiamo:master Sep 4, 2015
@tiamo
Copy link
Owner

@tiamo tiamo commented Sep 4, 2015

Thanks

tiamo pushed a commit that referenced this issue 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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants