3.5. Constants

A constant is any symbol that has been defined as such with the assignment operator ::=. Note that since the check is made at run-time, the constant is protected, even if the symbol name is evaluated at run-time.

Example:

Gamma> CON ::= 5.4545454;
5.4545454999999997663
Gamma> CON = 7;
Script error during command CON = 7; Assignment to constant symbol: CON
Gamma> 

There are four pre-defined constants in Gamma:

PIThe value of pi, approximately 3.14159.
EThe base of the natural logarithm, approximately 2.71828.
INFFloating point positive infinity.
NANFloating point not-a-number.

Please refer to Literals for more information on INF and NAN.