Hello my friends,
I know this topic has been discussed before but I haven’t found a solution yet.
I would like to print all the decimal places of a real number.
I use this method:
Dim i As Integer
Var DeciX, s As String
For i = 0 To 30
DeciX = DeciX + "#"
Next
s = Format(Valeur, "#." + DeciX)
Return s
My value is Pi : 3.141592653589793238462643383279502884197
And the result is : 3,1415926535897931159979634685442
How to explain that?
Your result is correct. “Valeur” must be a double-precision floating point variable. This has 15 decimal places of precision (at most). This is exactly what you have: 3,141592653589793