Skip to content

Fix/rounding consolidation#1046

Merged
boriel merged 5 commits intomainfrom
fix/rounding_consolidation
Feb 9, 2026
Merged

Fix/rounding consolidation#1046
boriel merged 5 commits intomainfrom
fix/rounding_consolidation

Conversation

@boriel
Copy link
Collaborator

@boriel boriel commented Feb 9, 2026

What / Why

Fixed a bug related to Fixed to Long and Ulong typecast, where the rounding and the sign were not consistent.

Fixes #1040

ZX Spectrum ROM always rounds "towards -Infinity", so:

 * INT(1.9) == 1
 * INT(-1.1) == -2

We do the same for Constant values so the results are consistent.
@boriel boriel merged commit 5f3540e into main Feb 9, 2026
1 check passed
@boriel boriel deleted the fix/rounding_consolidation branch February 9, 2026 18:29
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.

[Bug]: Inconsistent results when rounding negative values

1 participant