Skip to content

add test for asint #276

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

add test for asint #276

wants to merge 1 commit into from

Conversation

spall
Copy link
Collaborator

@spall spall commented Jul 3, 2025

Adds a test for asint testing int, uint, and float types.
Closes #169

- Name: ExpectedOut3 # The result we expect
Format: Int32
Stride: 16
Data: [-1, 0, -2147483648, 2147483647, -1, 0, -2147483648, 2147483647, -1, 0, 0, 0]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem correct to me. Shouldn't it be the following?

Suggested change
Data: [-1, 0, -2147483648, 2147483647, -1, 0, -2147483648, 2147483647, -1, 0, 0, 0]
Data: [-4194304, 0, -2147483648, 2143289344, -4194304, 0, -2147483648, 2143289344, -4194304, 0, 0, 0]

Because Out3 should be:

[asint(-nan), asint(0), asint(-0), asint(nan), asint(-nan), asint(0), asint(-0), asint(nan), asint(-nan), asint(0), 0, 0]

which should be the same as interpreting these hex values as int32s

[0xffc00000, 0x0, 0x80000000, 0x7fc00000, 0xffc00000, 0x0, 0x80000000, 0x7fc00000, 0xffc00000, 0x0, 0x0, 0x0]

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.

Add test for asint
2 participants