How to increase decimal places

Dear GAMS users!
Hope you are all fine.
I have written a code in GAMS and hopefully it works well.
But the point is that i want the results to be more precise.
GAMS gives the value of 0 to those variables which have a decimal places of 0.001 (may be less than than i am not sure)
How is it possible to increase the decimal places of the results that GAMS shows?
As i searched the menus, it is possible to have decimal places of 7 but that doesn’t satisfies me i want more precision than that.
Some of the variables i work with have more than 15 zeros after decimal.
I also tried to exporting variables to Excel and then increasing the decimal places in Excel, but it didn’t work. Because GAMS exports non-zero variables and so those with high decimal places take the value of zero and keep their value during exportation to GAMS.
Don’t you have an idea?
Looking forward for your nice soloutions;
Cordially;
Ali Zarrineh


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

  1. I think you must use the option decimals = n to change it the n decimals. And you can give n the value 30 or 20 to n.

  2. For example you can write option decimals=30.





    De : gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] De la part de Ali Zarrineh
    Envoyé : mardi 10 juillet 2012 13:45
    À : gamsworld@googlegroups.com
    Objet : How to increase decimal places



    Dear GAMS users!

Hope you are all fine.

I have written a code in GAMS and hopefully it works well.

But the point is that i want the results to be more precise.

GAMS gives the value of 0 to those variables which have a decimal places of 0.001 (may be less than than i am not sure)

How is it possible to increase the decimal places of the results that GAMS shows?

As i searched the menus, it is possible to have decimal places of 7 but that doesn’t satisfies me i want more precision than that.

Some of the variables i work with have more than 15 zeros after decimal.

I also tried to exporting variables to Excel and then increasing the decimal places in Excel, but it didn’t work. Because GAMS exports non-zero variables and so those with high decimal places take the value of zero and keep their value during exportation to GAMS.

Don’t you have an idea?

Looking forward for your nice soloutions;

Cordially;

Ali Zarrineh


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

As Herve said, you can use OPTION DECIMALS = n. But I don’t think GAMS allows decimal places greater than 8, does it? This question was posted a couple of days ago but the fact is up to now the maximum decimal places supported in GAMS is 8.

Best wishes,
Destin

On Tue, Jul 10, 2012 at 9:25 PM, hervé GUENE wrote:

  1. I think you must use the option decimals = n to change it the n decimals. And you can give n the value 30 or 20 to n.

  2. For example you can write option decimals=30.





    De : gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] De la part de Ali Zarrineh
    Envoyé : mardi 10 juillet 2012 13:45
    À : gamsworld@googlegroups.com
    Objet : How to increase decimal places



    Dear GAMS users!

Hope you are all fine.

I have written a code in GAMS and hopefully it works well.

But the point is that i want the results to be more precise.

GAMS gives the value of 0 to those variables which have a decimal places of 0.001 (may be less than than i am not sure)

How is it possible to increase the decimal places of the results that GAMS shows?

As i searched the menus, it is possible to have decimal places of 7 but that doesn’t satisfies me i want more precision than that.

Some of the variables i work with have more than 15 zeros after decimal.

I also tried to exporting variables to Excel and then increasing the decimal places in Excel, but it didn’t work. Because GAMS exports non-zero variables and so those with high decimal places take the value of zero and keep their value during exportation to GAMS.

Don’t you have an idea?

Looking forward for your nice soloutions;

Cordially;

Ali Zarrineh


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Ali,

I googled “GAMS put decimals” and found the link below: it has lots of
relevant and helpful info.

http://support.gams.com/doku.php?id=gams:precision_of_data_within_gams

-Steve

On Tue, Jul 10, 2012 at 9:45 AM, Ali Zarrineh wrote:

Dear GAMS users!
Hope you are all fine.
I have written a code in GAMS and hopefully it works well.
But the point is that i want the results to be more precise.
GAMS gives the value of 0 to those variables which have a decimal places of
0.001 (may be less than than i am not sure)
How is it possible to increase the decimal places of the results that GAMS
shows?
As i searched the menus, it is possible to have decimal places of 7 but that
doesn’t satisfies me i want more precision than that.
Some of the variables i work with have more than 15 zeros after decimal.
I also tried to exporting variables to Excel and then increasing the decimal
places in Excel, but it didn’t work. Because GAMS exports non-zero variables
and so those with high decimal places take the value of zero and keep their
value during exportation to GAMS.
Don’t you have an idea?
Looking forward for your nice soloutions;
Cordially;
Ali Zarrineh


“gamsworld” group.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to
gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/gamsworld?hl=en.



– Steven Dirkse, Ph.D. GAMS Development Corp., Washington DC Voice: (202)342-0180 Fax: (202)342-0181 sdirkse@gams.com http://www.gams.com

Dear Destin
Many thanks for your help;
Regards;
Ali

On Wed, Jul 11, 2012 at 12:59 PM, Destin Zed wrote:

As Herve said, you can use OPTION DECIMALS = n. But I don’t think GAMS allows decimal places greater than 8, does it? This question was posted a couple of days ago but the fact is up to now the maximum decimal places supported in GAMS is 8.

Best wishes,
Destin


On Tue, Jul 10, 2012 at 9:25 PM, hervé GUENE wrote:

  1. I think you must use the option decimals = n to change it the n decimals. And you can give n the value 30 or 20 to n.

  2. For example you can write option decimals=30.





    De : gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] De la part de Ali Zarrineh
    Envoyé : mardi 10 juillet 2012 13:45
    À : gamsworld@googlegroups.com
    Objet : How to increase decimal places



    Dear GAMS users!

Hope you are all fine.

I have written a code in GAMS and hopefully it works well.

But the point is that i want the results to be more precise.

GAMS gives the value of 0 to those variables which have a decimal places of 0.001 (may be less than than i am not sure)

How is it possible to increase the decimal places of the results that GAMS shows?

As i searched the menus, it is possible to have decimal places of 7 but that doesn’t satisfies me i want more precision than that.

Some of the variables i work with have more than 15 zeros after decimal.

I also tried to exporting variables to Excel and then increasing the decimal places in Excel, but it didn’t work. Because GAMS exports non-zero variables and so those with high decimal places take the value of zero and keep their value during exportation to GAMS.

Don’t you have an idea?

Looking forward for your nice soloutions;

Cordially;

Ali Zarrineh


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.


To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

\

To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.