Y a la methode un peu viellote : #define base 10 #define precision 100000000 double nb = 2000.000200000; char ch[101]; char decimal[20]; char flottant[15]; itoa(int(nb),decimal,base); double Pflottante = nb-int(nb) + 1; itoa(int(Pflottante*precision),flottant,base); ch[0] = '\0'; strcat(ch,decimal); strcat(ch,"."); strcat(ch,&flottant[1]);
je le fais ici avec des doubles c'est plus precis mais plus gros..
rrk275
|