NAME

maxval - maximum representable value for a type

SYNOPSIS

res = type.maxval()

DESCRIPTION

If type is a numeric type (like Int, Float, etc.), maxval returns the largest positive finite value that can be represented by that type.

If type is an array of types, maxval returns an array containing the maximum value for each type in the input.

RETURN VALUE

Returns the maximum representable value(s) for the given type(s).

ERRORS

ArgCheck: Thrown if the number of arguments is not 0.
TypeCheck: Thrown if the argument is not a type or an array of types.
RangeCheck: Thrown if the type is not numeric or does not have a well-defined maximum value.

EXAMPLE

    Byte.maxval()
127

    Float.maxval()
3.40282e+38

    [Short, UShort].maxval()
32767 65535

SEE ALSO

minval
typeof
typeof