Modify

#1965 closed Bug (Works For Me)

Round() sometimes don't work

Reported by: maerzi@… 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:1 by Zedna, on Jun 26, 2011 at 11:23:57 AM

Reproducing script is missing.

comment:2 by mvg, on Jun 27, 2011 at 12:59:32 PM

+24h
None reproducible. (Xp.x86)

in reply to:  2 comment:3 by Jpm, on Jun 27, 2011 at 7:28:03 PM

Replying to mvg:

+24h
None reproducible. (Xp.x86)

that the reason Zedna ask for a repro script

comment:4 by mvg, on Jun 28, 2011 at 12:37:46 AM

Roger. My mistake.

comment:5 by Jon, on Jul 1, 2011 at 11:08:46 PM

Resolution: Works For Me
Status: newclosed

comment:6 by naitong, 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 mvg, on Aug 12, 2011 at 12:19:36 AM

Unlikely.

Floating hint for you.

500 * 1.007 <> 503.5 == TRUE

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.