Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1965 closed Bug (Works For Me)

Round() sometimes don't work

Reported by: maerzi@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Round Cc:


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 Changed 9 years ago by Zedna

Reproducing script is missing.

comment:2 follow-up: Changed 9 years ago by mvg

None reproducible. (Xp.x86)

comment:3 in reply to: ↑ 2 Changed 9 years ago by Jpm

Replying to mvg:

None reproducible. (Xp.x86)

that the reason Zedna ask for a repro script

comment:4 Changed 9 years ago by mvg

Roger. My mistake.

comment:5 Changed 9 years ago by Jon

  • Resolution set to Works For Me
  • Status changed from new to closed

comment:6 Changed 9 years ago by naitong

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 Changed 9 years ago by mvg


Floating hint for you.

500 * 1.007 <> 503.5 == TRUE

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.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.