A
alsmeirelles
Hi all,
I Have run this test:
Private Sub test()
Dim d As Double
Dim f As Single
Dim output As String
d = 8888888888888.8887
f = 9999999988888.8887
output = "Original double is: " & d.ToString() & " Formated
Double is: " & FormatNumber(d, 2, TriState.True) & vbCrLf _
& "Original single is: " & f.ToString() & "Formated Single is: "
& FormatNumber(f, 2, TriState.True)
MsgBox(output)
End Sub
The result is this:
Original Double is: 8888888888888.8887 Formated Double is:
8.888.888.888.888,89
Original Single is: 1E+13 Formated Single is 10.000.000.000.000,00
Now cames the big question:
How come that 9999999988888.8887 was rounded to 10.000.000.000.000,00
(or 1E+13 in scientific notation)?
This test was run in VB.Net 2003, 1.1 Framework.
Thanks for any help.
I Have run this test:
Private Sub test()
Dim d As Double
Dim f As Single
Dim output As String
d = 8888888888888.8887
f = 9999999988888.8887
output = "Original double is: " & d.ToString() & " Formated
Double is: " & FormatNumber(d, 2, TriState.True) & vbCrLf _
& "Original single is: " & f.ToString() & "Formated Single is: "
& FormatNumber(f, 2, TriState.True)
MsgBox(output)
End Sub
The result is this:
Original Double is: 8888888888888.8887 Formated Double is:
8.888.888.888.888,89
Original Single is: 1E+13 Formated Single is 10.000.000.000.000,00
Now cames the big question:
How come that 9999999988888.8887 was rounded to 10.000.000.000.000,00
(or 1E+13 in scientific notation)?
This test was run in VB.Net 2003, 1.1 Framework.
Thanks for any help.