Skip to content

Conversation

kojix2
Copy link
Contributor

@kojix2 kojix2 commented May 24, 2025

Fixed test failures on macOS.

Problem: casting negative float to unsigned int works differently on macOS.

  • Linux: result is a large number (two’s complement).
  • macOS: result is 0 (unexpected).

Solution: updated macros to handle negative values the same on all systems:

#define m_from_double(x) ((x) < 0 ? (dtype)((long long)(x)) : (dtype)(x))

@kojix2 kojix2 changed the title Ci mac2 Fix cross-platform negative value conversion for unsigned integer types May 24, 2025
@kou
Copy link
Contributor

kou commented May 25, 2025

We need #225 before this.

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