-
Apr 12th, 2013, 03:28 PM
#1
Thread Starter
Fanatic Member
Division results in 8.32957075464354E-03
Here is the equation:
401.25 / 48171.75
this results in this:
8.32957075464354E-03
how do I get the correct number which is: 120.05420560....
The total number is 28 decimals long. Basically I need 4 to 8 decimal places. I tried some different rounding functions I found but to no avail.
thanks
-
Apr 12th, 2013, 03:49 PM
#2
Re: Division results in 8.32957075464354E-03
Originally Posted by mojo69
how do I get the correct number which is: 120.05420560....
Microsoft Calculator's result for 401.25 / 48171.75 is: 0.0083295707546435410795746469663236
Originally Posted by mojo69
The total number is 28 decimals long. Basically I need 4 to 8 decimal places. I tried some different rounding functions I found but to no avail.
Have you tried the Round function?
Code:
Round(401.25 / 48171.75, 8)
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
-
Apr 12th, 2013, 09:30 PM
#3
Re: Division results in 8.32957075464354E-03
Er, there is no way that dividing a smaller number by a larger number is going to give a value of 1 or greater.
You have the two values reversed in your expression.
-
Apr 12th, 2013, 09:47 PM
#4
Re: Division results in 8.32957075464354E-03
Definitely backwards
Code:
Debug.Print 48171.75 / 401.25
Yeilds 120.054205607477
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|