Modify ↓
Opened on Jun 26, 2011 at 11:08:10 AM
Closed on Jul 1, 2011 at 11:08:46 PM
Last modified on Aug 12, 2011 at 12:19:36 AM
#1965 closed Bug (Works For Me)
Round() sometimes don't work
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | Round | Cc: |
Description
I'm using the function like this Round($i ,2).
It is working most times but sometimes it gives back a number like 8.17438492012498
Attachments (0)
Change History (7)
comment:5 by , on Jul 1, 2011 at 11:08:46 PM
| Resolution: | → Works For Me |
|---|---|
| Status: | new → closed |
comment:6 by , on Aug 11, 2011 at 3:39:23 AM
Local $ret = 500 * 1.007 MsgBox(0,"", $ret) ; => 503.5 MsgBox(0,"", Round($ret)) ; => 503 ,but it should be 504 as follows MsgBox(0,"", Round(503.5)); => 504
This is not the same as maerzi's, but there must be something wrong with Round
comment:7 by , on Aug 12, 2011 at 12:19:36 AM
Unlikely.
Floating hint for you.
500 * 1.007 <> 503.5 == TRUE
Note:
See TracTickets
for help on using tickets.

Reproducing script is missing.