Modify

Opened 17 years ago

Closed 17 years ago

#1008 closed Bug (No Bug)

Math function mod( ) result display bug

Reported by: txj Owned by:
Milestone: Component: AutoIt
Version: 3.3.0.0 Severity: None
Keywords: mod Cc:

Description

code like this

MsgBox(0, "result", mod(-3, -1))

display is -0 , it is incorrect, it must be displayed as 0 .

I hope this bug changed in the next version(3.3.1.0) of AutoIt.

my operating system is Simplified Chinese Windows 2000 advanced server + SP4 + Rollup1 + many hotfixes.

Attachments (1)

ResultOfMod.jpg (4.1 KB ) - added by anonymous 17 years ago.

Download all attachments as: .zip

Change History (2)

by anonymous, 17 years ago

Attachment: ResultOfMod.jpg added

comment:1 by J-Paul Mesnage, 17 years ago

Resolution: No Bug
Status: newclosed

as this function can work on floating number the computation is done in float so the result is in float too.
The mod function always return a nulber with the same sign as the divisor.
That the reason you get a -0 due to the precision display.

I understand that can be a little confusing when using integers just use int(mod(x,y)) if you use only integers

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.