Result = 1,35307692307692E-02Code:Dim q1 As Double
Dim q2 As Double
Dim res As Double
q1 = 17.59
q2 = 1300
res = q1 / q2
MsgBox res
With Windows calculator
17.59 / 1300 = 0.0135307692 ......
Someone know why?
Printable View
Result = 1,35307692307692E-02Code:Dim q1 As Double
Dim q2 As Double
Dim res As Double
q1 = 17.59
q2 = 1300
res = q1 / q2
MsgBox res
With Windows calculator
17.59 / 1300 = 0.0135307692 ......
Someone know why?
I add another info.
The strange thing is that if we build a dll ActiveX that receive q1 and q2 value and make the result, if the application caller is a VB application the result is 1,25307.....
Instead, if tha application caller is VC++, the result is right and it is 0.01353....
For me it's incredible...
Someone know why?!?!?
Quote:
Originally Posted by E.Hyde
1.35307692307692E-02 is the same as 0.0135307692307692
The E-02 is scientific notation. The number after the E tells how many places to move the decimal and which direction to move it in. In this case, the negative means to move it left and the 2 means to move it 2 places (which gives you 0.0135307692307692).
Both are same sir
use this
Dim q1 As Double
Dim q2 As Double
Dim res As Double
Dim resf As Double
q1 = 17.59
q2 = 1300
res = q1 / q2
resf = Format(res, "##,##0.000000000")
MsgBox resf
you have to change the format
I'm ashamed of this.
Thanks a lot, sorry, but i'm a champion in math!!