The GAMS documentation mentions f.nr=1 (standard notation) and f.nr=2 (scientific notation) for formatting numeric items using the PUT statement. There are however a few more. Here we print values using different formats:
f.nr=1 f.nr=2 f.nr=3 f.nr=4 1.20 1.20E+00 1.2000000000 1.2 1.23 1.23E+00 1.2345000000 1.2345 123450000.00 1.23E+08 123450000.00 123450000 0.00 1.20E-07 0.0000001200 1.2E-7 0.00 1.23E-07 0.0000001235 1.2345E-7
References
- Dictionary of formats, https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0z62k899n6a7wn1r5in6q5253v1.htm
Appendix: GAMS code
set |
Helpful article
ReplyDelete