Modify ↓
Opened 16 years ago
Closed 16 years ago
#1104 closed Bug (No Bug)
Scientific number, addition failer. (x>2^53)
| Reported by: | anonymous | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.1.1 | Severity: | None |
| Keywords: | Scientific addition | Cc: |
Description
; Scientific number, addition failer. (x>2^53)
; after value 2^53 and up.
Local $i,$j,$v,$c=1
$v = 9007199254740992 ; int(2^53)
For $i = ($v-2)*1e0 to ($v+2)*1e0
If ($i<>$j) Then
ConsoleWrite('> ')
Else
ConsoleWrite('- ')
$c = 0
EndIf
ConsoleWrite($i&', '&int($i)&'.'&@CRLF)
If not $c Then ExitLoop
$j = $i
Next
;~ > 9.00719925474099e+015, 9007199254740991.
;~ > 9.00719925474099e+015, 9007199254740992.
;~ > 9.00719925474099e+015, 9007199254740993.
;~ - 9.00719925474099e+015, 9007199254740993.
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Jpm
- Resolution set to No Bug
- Status changed from new to closed
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.
Note: See
TracTickets for help on using
tickets.

No bug, you cannot assume that the precision of a Float number to integer can take in account number that have around 15 digits precision.
in this particular case compare to 249 the precision rounding take place at a different place.