Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Arithmetic functions z/OS UNIX System Services User's Guide SA23-2279-00 |
|||||||||||||||||||||
awk recognizes the most common mathematical functions, as shown in the following table.
Several of these functions may require more explanation. The int function takes a floating-point number as an argument and returns an integer. The integer is just the floating-point number, without its fractional part. Every call to rand returns a new random number between 0 and 1. In this way, you can get a sequence of random numbers. You can use srand to set the starting point, or seed, for a random number sequence. If you set the seed to a particular value, you always get the same sequence of numbers from rand. This is useful if you want a program to use rand but obtain uniform results every time the program runs. |
Copyright IBM Corporation 1990, 2014
|