Skip to content

Conversation

@MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Sep 1, 2022

Previous one can't properly handle such edge cases:

copysign(1.0, +0.0)   ->  +0.0
copysign(1.0, -0.0)   ->  -0.0
copysign(1.0, +NaN)   ->  NaN
copysign(1.0, -NaN)   ->  NaN

Now, these cases don't change destination x argument. Only its sign:

copysign(1.0, +0.0)   ->  +1
copysign(1.0, -0.0)   ->  -1
copysign(1.0, +NaN)   ->  +1
copysign(1.0, -NaN)   ->  -1
  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey MaxGraey merged commit 5e17892 into AssemblyScript:main Sep 25, 2022
@MaxGraey MaxGraey deleted the fix-portable-copysign branch September 25, 2022 17:40
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.

1 participant