Skip to content

Conversation

@adienes
Copy link
Member

@adienes adienes commented Oct 14, 2025

#59668 changed prevfloat(x, d) to no longer just call nextfloat(x, -d), so as to avoid bugs resulting from intermediate overflow when d is unsigned.

as predicted in #59668 (comment) and then observed in #59668 (comment), this causes some package failures. The failures are exposing a bug, so it's ultimately a good thing, but this PR would restore the old behavior at least when d isa Signed and only fails when we'd actually hit the unsigned buggy case.

@adienes adienes added the maths Mathematical functions label Oct 14, 2025
@adienes
Copy link
Member Author

adienes commented Oct 14, 2025

actually, this introduces ambiguities if someone defines prevfloat(::MyIntegerType, ::Integer)

I guess it's better to just tell / help the packages to adapt.

@adienes adienes closed this Oct 14, 2025
@adienes adienes deleted the easier_prevfloat branch October 14, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maths Mathematical functions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant