Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3963

Decimal precision

$
0
0

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?

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 3963

Trending Articles