Jump to content

why this simple script gives me false not ture?


Recommended Posts

$QUOTE_END = 161.10
$QUOTE_STA = 161.05

    $QUOTE_END -= 0.05
    MsgBox(0,"",$QUOTE_END & "  " & $QUOTE_STA,2)
    MsgBox(0,"",$QUOTE_END >= $QUOTE_STA,2)

isn't 161.05>=161.05?

why it gives false instead of ture?

thanks

Link to comment
Share on other sites

thanks

must be a bug in Autoit

This is a standard behavior of floating point math on computers. It is correct to about 14 decimal places. AutoIt gets its math from the C++ libraries used to write and compile the interpreter.

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...