Skip to content

pyImathTest: compare array vs scalar quaternion results with a tolerance (#515) - #597

Merged
cary-ilm merged 1 commit into
AcademySoftwareFoundation:mainfrom
mshooter-ilm:pyimathtest-quat-tolerance
Sep 14, 2026
Merged

cary-ilm merged 1 commit into
AcademySoftwareFoundation:mainfrom
mshooter-ilm:pyimathtest-quat-tolerance

Conversation

@mshooter-ilm

Copy link
Copy Markdown
Contributor

Problem:
testQuatArrays compared results of array operations (slerp, *= inverse(), normalized()) bit-exactly against the equivalent scalar operations. Vectorized and non-vectorized code paths can legitimately differ in the last few bits, and on aarch64, ppc64le, riscv64, s390x and loongarch64 they do (issue #515).

Solution:
This adds a small quatEqual helper using the file's existing 1e-5 tolerance and uses it for those comparisons on all platforms; plain copies are still compared exactly.

Split out of #596 (python wheels), whose Linux arm64 wheel test needs it.

mshooter-ilm added a commit to mshooter-ilm/Imath that referenced this pull request Sep 14, 2026

@cary-ilm cary-ilm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, thanks!

@cary-ilm
cary-ilm merged commit bcc69ce into AcademySoftwareFoundation:main Sep 14, 2026
35 checks passed
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