Returns the largest integer for a given integer type.
INTMAX(inttype)
inttype |
- |
Optional. An integer, the integer type or code. Defaults to the native integer type. Valid arguments are: |
Name |
Code |
Data Type |
INTMAX |
INT8 SBYTE |
1 |
8-bit Signed Byte |
127 |
UINT8 UBYTE BYTE |
2 |
8-bit Unsigned Byte |
255 |
INT16 SINT |
3 |
16-bit (2-byte) Signed Integer |
32767 |
UINT16 UINT |
4 |
16-bit (2-byte) Unsigned Integer |
65535 |
INT32 LONG |
5 |
32-bit (4-byte) Signed Integer |
2,147,483,647 |
UINT32 ULONG |
8 |
32-bit (4-byte) Unsigned Integer |
4,294,967,295 |
INT64 |
9 |
64-bit (8-byte) Signed Integer |
9,223,372,036,854,775,807 |
UINT64 |
10 |
64-bit (8-byte) Unsigned Integer |
18,446,744,073,709,551,615 |
1000 + N |
N-bit Signed Integer |
2N-1-1 |
|
2000 + N |
N-bit Unsigned Integer |
2N-1 |
A scalar, the largest integer for the given type.
intmax()
returns the largest integer that is native to the operating system (typically 32 or 64 bits).
intmax(int16)
returns 32767, the largest 16 bit signed integer.
intmax("int16")
returns 32767, the largest 16 bit signed integer. The inttype parameter can also be a string.
intmax(int64)
returns 9223372036854775807, the largest 64 bit signed integer.
intmax(1005)
returns 15, the largest 5 bit signed integer.
intmax(2005)
returns 31, the largest 5 bit unsigned integer.
W1: {intmax(2000+16)}
W2: 20*log10(w1)
W3: {intmax(2000+24)}
W4: 20*log10(w3)
W1 represents the quantization levels of a 16 bit audio system. W2 displays the dynamic range of the system, approximately 96.33 dB.
W3 represents the quantization levels of a 24 bit audio system. W4 displays the dynamic range of the system, approximately 144.49 dB.
The dynamic range or signal to noise ratio of an audio system is the ability to distinguish between very soft and very loud sounds. Each bit of the digital system contributes approximately 6.02 dB of dynamic range.
The inttype parameter can be a string with a value equal to Name in the table above.
INTMAX also supports N bit integer format. An inttype value of 1000 + N specifies N bit signed integer values and 2000 + N specifies N bit unsigned integer values. For example:
1003
implies a 3 bit signed integer value.
2005
implies a 5 bit unsigned integer value.
See INTMIN to return the smallest integer for an integer type.