NCL treats numbers with decimal points, or expressed in scientific notation, as real numbers and uses floating point arithmetic in the evaluation of real number expressions. The result of a real number calculation, as with integer arithmetic, is placed in a target variable. Unlike integer arithmetic however, the result is not a simple integer but is maintained in the scientific notation form.
The number 22.8 is therefore held in a variable as:
+.22800000000000E+02
which means:
0.228 times 10 to the power of 2
A special built-in function, &NUMEDIT, is used to reformat real number results into conventional format so that they can be displayed as standard decimal numbers.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |