Modify

Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#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, 15 years ago

Reproducing script is missing.

comment:2 by mvg, 15 years ago

+24h
None reproducible. (Xp.x86)

in reply to:  2 comment:3 by J-Paul Mesnage, 15 years ago

Replying to mvg:

+24h
None reproducible. (Xp.x86)

that the reason Zedna ask for a repro script

comment:4 by mvg, 15 years ago

Roger. My mistake.

comment:5 by Jon, 15 years ago

Resolution: Works For Me
Status: newclosed

comment:6 by naitong, 15 years ago

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, 15 years ago

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.