Re: Posix(?) on numeric entry



Thanks for replies.

Now I have:

gdouble value = 4.1;
gchar buffer[G_ASCII_DTOSTR_BUF_SIZE];

gtk_entry_set_text (GTK_ENTRY (value_entry), \
      g_ascii_dtostr(buffer, G_ASCII_DTOSTR_BUF_SIZE, value));


but on output I got for value -> 4.0999999999999996

How can I "round" value? Or g_ascii_formatd(...) is more appropriate?

Giulio
 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Personalizza il tuo cellulare con un semplice sms, clicca qui
* 
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=3115&d=15-2



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]