You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiplication by Ufixed{UInt8, 8}(1) is no longer an identity #34
Yes, see #27. Aside from a general cleanup, it brought FixedPointNumbers into alignment with the rest of julia 0.4 in making them closed under arithmetic operations.
But the problem you've noticed is Not Good. I've got major deadlines for the next 5 days, so I sure hope someone can help deal with this and tag a new release. CC @vchuravy?
I see what is wrong... the root of the issue is the problem I am having in #32.
So UFixed8(1) = 0xFF and widemul(0xFF, 0xFF) = 0x000000000000fe01, shift that back 8 bits and you get 0xFE01 even with the additional rounding that we do in the multiplication you do not get back to one. I will look into this tomorrow morning and in the worst case restore the old definition (, but still making it closed).
Yeah the issue is more or less of [me] wanting to define UFixed numbers as traditional FixedPoint numbers that are just unsigned, while they are not :) and me realizing that after the PR went through.
If they need to be split out with different naming, I'm fine with that. I think we went through some discussion along these lines when they were first added, but that can be revisted.
Activity
timholy commentedon Oct 31, 2015
Yes, see #27. Aside from a general cleanup, it brought FixedPointNumbers into alignment with the rest of julia 0.4 in making them closed under arithmetic operations.
But the problem you've noticed is Not Good. I've got major deadlines for the next 5 days, so I sure hope someone can help deal with this and tag a new release. CC @vchuravy?
vchuravy commentedon Oct 31, 2015
I see what is wrong... the root of the issue is the problem I am having in #32.
So
UFixed8(1) = 0xFFandwidemul(0xFF, 0xFF) = 0x000000000000fe01, shift that back 8 bits and you get0xFE01even with the additional rounding that we do in the multiplication you do not get back to one. I will look into this tomorrow morning and in the worst case restore the old definition (, but still making it closed).cstjean commentedon Oct 31, 2015
Thank you. I think #27 was a great step forward, I hope the issue can be fixed!
vchuravy commentedon Oct 31, 2015
Yeah the issue is more or less of [me] wanting to define
UFixednumbers as traditional FixedPoint numbers that are just unsigned, while they are not :) and me realizing that after the PR went through.timholy commentedon Oct 31, 2015
If they need to be split out with different naming, I'm fine with that. I think we went through some discussion along these lines when they were first added, but that can be revisted.
Merge pull request #36 from vchuravy/vc/fixup