fenhanxue Posted November 28, 2017 Share Posted November 28, 2017 why the reslut is 0.29999999999 ??? how can i get 0.3 ? Link to comment Share on other sites More sharing options...
nend Posted November 28, 2017 Share Posted November 28, 2017 I don't know why but I have a sollution, round it. MsgBox(0, '', round(12.7-12.4, 2)) MsgBox(0, '', round(12.7-12.4, 2)) Link to comment Share on other sites More sharing options...
jchd Posted November 28, 2017 Share Posted November 28, 2017 That's because neither 12.7 nor 12.4 are representable exactly under IEEE754 double format: ConsoleWrite(Hex(12.7) & @LF) ConsoleWrite(Hex(12.4) & @LF) This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
spudw2k Posted November 28, 2017 Share Posted November 28, 2017 More info from AutoIt Bug Tracker:https://www.autoitscript.com/trac/autoit/ticket/2810 Read the Wiki article linked on the Issue page for details on IEEE754 Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Link to comment Share on other sites More sharing options...
argumentum Posted November 28, 2017 Share Posted November 28, 2017 therefore: MsgBox(0, '', (( 12.7 * 100 ) - ( 12.4 * 100)) / 100 ) You have to make all real to integers. Once you're done, put it back as real. fenhanxue 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now