Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionempecher notation scientifique
Dim x As Double x = 1.0024 MsgBox Format$(x - 1, "0.###############") x = 1.00000056 MsgBox Format$(x - 1, "0.###############")
Dim x As Double x = 1.0024 MsgBox Format$(x - 1, "0.###############")
on a un nombre fixe de décimales
Public Function DecBin(ByVal Rt As Integer) As String Dim Binaire As String = "" Dim Bin As String = "" Do Application.DoEvents() Bin &= CStr(Rt Mod 2) Rt = CInt(Int(Rt / 2)) Loop Until Rt 1 Or Rt 0 If Rt = 0 Then Bin &= "0" Else Bin &= "1" End If If Bin.Length < 8 Then Do While Bin.Length < 8 Bin &= "0" Loop End If For Rt = 7 To 0 Step -1 Binaire &= Bin.ToCharArray(Rt, 1) Next Return Binaire End Function
dim x as double dim y as double dim res as double x = 1.7 y = 1.3 res = x+y