help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Precision of numbers writing Objective to Access Table


From: Robbie Morrison
Subject: Re: [Help-glpk] Precision of numbers writing Objective to Access Table
Date: Thu, 4 Nov 2010 05:40:15 +1300 (NZDT)
User-agent: SquirrelMail/1.4.17

Hello Andrew and Xypron

------------------------------------------------------------
To:          address@hidden, ...
Subject:     Re: [Help-glpk] Precision of numbers writing Objective to
Access Table
Message-ID: <address@hidden>
From:       "glpk xypron" <address@hidden>
Date:        Tue, 02 Nov 2010 23:17:23 +0100
------------------------------------------------------------

> --- glpsql.c       2010-10-16 02:00:31.000000000 +0200
> +++ glpsql.c       2010-11-02 23:13:36.000000000 +0100
> @@ -959,7 +959,7 @@
>        strcat( query, part );
>        switch (mpl_tab_get_type(dca, k))
>        {  case 'N':
> -            sprintf(num, "%-18g",mpl_tab_get_num(dca, k));
> +            sprintf(num, "%.18g", DBL_DIG, mpl_tab_get_num(dca, k));

I imagine that "%.18g" should be "%.*g".

>              strcat( query, num );
>              break;
>           case 'S':

---
Robbie Morrison
PhD student -- policy-oriented energy system simulation
Technical University of Berlin (TU-Berlin), Germany
University email (redirected) : address@hidden
Webmail (preferred)           : address@hidden
[from Webmail client]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]