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.201.20E+001.20000000001.2
1.231.23E+001.23450000001.2345
123450000.001.23E+08123450000.00123450000
0.001.20E-070.00000012001.2E-7
0.001.23E-070.00000012351.2345E-7
References
- Dictionary of formats, https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0z62k899n6a7wn1r5in6q5253v1.htm
Appendix: GAMS code
set |