Next: Adding noise operators, Previous: Bitwise operators, Up: Arithmetic operators [Contents][Index]

With the operators below you can convert the numerical data type of your input, see Numeric data types.
For example, let’s assume that your colleague gives you thousands of single exposure images for archival, but they have a double-precision floating point type!
You know that the statistical error a single-exposure image can never exceed 6 or 7 significant digits, so you would prefer to archive them as a single-precision floating point and save space on your computer (a double-precision floating point is also double the file size!).
You can do this with the `float32`

operator described below.

`uint8`

Convert the type of the popped operand to 8-bit unsigned integer type (see Numeric data types). The internal conversion of C will be used.

`int8`

Convert the type of the popped operand to 8-bit signed integer type (see Numeric data types). The internal conversion of C will be used.

`uint16`

Convert the type of the popped operand to 16-bit unsigned integer type (see Numeric data types). The internal conversion of C will be used.

`int16`

Convert the type of the popped operand to 16-bit signed integer (see Numeric data types). The internal conversion of C will be used.

`uint32`

Convert the type of the popped operand to 32-bit unsigned integer type (see Numeric data types). The internal conversion of C will be used.

`int32`

Convert the type of the popped operand to 32-bit signed integer type (see Numeric data types). The internal conversion of C will be used.

`uint64`

Convert the type of the popped operand to 64-bit unsigned integer (see Numeric data types). The internal conversion of C will be used.

`float32`

Convert the type of the popped operand to 32-bit (single precision) floating point (see Numeric data types). The internal conversion of C will be used.

`float64`

Convert the type of the popped operand to 64-bit (double precision) floating point (see Numeric data types). The internal conversion of C will be used.

GNU Astronomy Utilities 0.16 manual, October 2021.