#1332 closed Bug (Fixed)
Mod funktion wrong output
Reported by: | Nike | Owned by: | Valik |
---|---|---|---|
Milestone: | 3.3.1.7 | Component: | AutoIt |
Version: | 3.3.0.0 | Severity: | None |
Keywords: | Cc: |
Description
mod("175367809538821201","1767842701") returns 421042353 but its wrong in real its 421042338
why autoit says its 421042353 ?? funny mathematic bug oO
Attachments (0)
Change History (8)
comment:1 Changed 15 years ago by jchd
comment:2 follow-up: ↓ 3 Changed 15 years ago by Valik
Yes, the problem is because the operation is being performed as floating point.
comment:3 in reply to: ↑ 2 Changed 15 years ago by anonymous
Replying to Valik:
Yes, the problem is because the operation is being performed as floating point.
Do you think it can get changed anytime soon or will it be part of a deeper rework to be expected significantly later?
A workaround can be to code a small dll for 64-bit bitwise ops, Mod() and possibly other functions. Is it worth doing it, since it's very easy?
comment:4 follow-up: ↓ 5 Changed 15 years ago by Valik
I have changes made to do it as an int first and fall back onto floating point but I'm not sure at this time if that will be changed in the next release, at a later time or ever.
comment:5 in reply to: ↑ 4 Changed 15 years ago by anonymous
Replying to Valik:
OK.
Last thing: are there other _basic_ core function besides bitwise ops and Mod() having a 32-bit int or floating-point limitation right now, that could benefit of a 64-bit int add-on?
comment:6 Changed 15 years ago by Valik
I don't know that an add-on would really help the situation. Its kind of something that needs fixed internally and its something that we need to do as soon as possible.
comment:7 Changed 15 years ago by Valik
- Milestone set to 3.3.1.7
- Owner set to Valik
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [5432] in version: 3.3.1.7
comment:8 Changed 15 years ago by Valik
This ticket is referenced in revision: [5433]
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Could it be a sign that Mod() in doing a floating-point computation instead of integral? Sounds like a 56-bit mantissa representation limitation.