kctvt Posted October 31, 2016 Posted October 31, 2016 (edited) Hi there, I have a small problem, and I dont know how to fix it. Example : Spoiler $b = 1.09549 $a = 1.09548 $c = $b - $a So, we know 1.09549 - 1.09548 ... will be : 0.00001 But no, see this , look at this picture. (Attach file) That is : 1e-005 , NOT 0.00001 ===== I used ROUND () to fix this , but I cant. $c1 = Round ($c,5) So, any body please help me. Thanks Edited October 31, 2016 by kctvt
orbs Posted October 31, 2016 Posted October 31, 2016 (edited) @kctvt, you need to reformat the output, like this: $b = 1.09549 $a = 1.09548 $c = $b - $a MsgBox(0, '', StringFormat('%.5f', $c)) EDIT: to clarify, this is only a visual representation. the actual numeric value is correct, 1e-005 = 0.00001 Edited October 31, 2016 by orbs kctvt 1 Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
RTFC Posted October 31, 2016 Posted October 31, 2016 It's called scientific notation. kctvt 1 My Contributions and Wrappers Spoiler BitMaskSudokuSolver BuildPartitionTable CodeCrypter CodeScanner DigitalDisplay Eigen4AutoIt FAT Suite HighMem MetaCodeFileLibrary OSgrid Pool RdRand SecondDesktop SimulatedAnnealing Xbase I/O
kctvt Posted November 1, 2016 Author Posted November 1, 2016 21 hours ago, orbs said: @kctvt, you need to reformat the output, like this: $b = 1.09549 $a = 1.09548 $c = $b - $a MsgBox(0, '', StringFormat('%.5f', $c)) EDIT: to clarify, this is only a visual representation. the actual numeric value is correct, 1e-005 = 0.00001 Hi Orbs , it worked Thanks. You saved my life yesterday
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