I am posting some code found on https://documentation.sas.com/doc/da/pgmsascdc/v_058/imlug/imlug_nonlinearoptexpls_sect003.htm
I am having trouble understanding the simple assignment statement shown in the example from the above web page . I am copying and pasting those lines below . Can someone here explain what is 10. and 1. in the below assignment statements ? What does the '. ' signify ? Thanks a lot for answering . Where is the SAS official documentation explaining what that " . " does ?
y1 = 10. * (x[2] - x[1] * x[1]);
y2 = 1. - x[1];
Thank You for reading and answering .
The dot is a decimal point. In some languages such as FORTRAN, C, and Python, there is a difference between floating point numbers and integer numbers. The person who wrote this example was probably a programmer in one of these languages and was probably used to using decimal points to emphasize floating point computations.
SAS IML does not distinguish between numerical types. Every number is a double-precision floating point number. Thus, the example can also be written as
y1 = 10 * (x[2] - x[1] * x[1]);
y2 = 1 - x[1];
Thank You for reading and answering . I was searching the SAS documentation for an answer , and I found none ! Its good to know , that it was probably something specific to this particular programmer who wrote this example.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!