AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Floating-Point Bug?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
Tekl



Joined: 24 Sep 2004
Posts: 813
Location: Germany

PostPosted: Sat Dec 04, 2004 12:51 am    Post subject: Floating-Point Bug? Reply with quote

Hi,

with the actual version the following code gives me a Zero instead of 0.033333

Code:

progressBarTotal = 100
progressBarTotal /= 3000
msgbox,%progressBarTotal%


Tekl
Back to top
View user's profile Send private message Visit poster's website
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10464

PostPosted: Sat Dec 04, 2004 5:06 am    Post subject: Reply with quote

Most math operations yield an integer result when given integers for the inputs. To force a floating point result, have one or more of the inputs end in point zero: progressBarTotal /= 3000.0
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group