user
Task

Write a function which tests if infinity is supported for floating point numbers (this step should be omitted for languages where the language specification already demands the existence of infinity, e.g. by demanding IEEE numbers), and if so, returns positive infinity.   Otherwise, return the largest possible positive floating point number.

For languages with several floating point types, use the type of the literal constant   **1.5**   as floating point type.

Related task

* Extreme floating point values
assistant
(formerly Perl 6)
Inf support is required by language spec on all abstract Numeric types (in the absence of subset constraints) including Num, Rat and Int types. Native integers cannot support Inf, so attempting to assign Inf will result in an exception; native floats are expected to follow IEEE standards including +/- Inf and NaN.

```
my $x = 1.5/0;       # Failure: catchable error, if evaluated will return: "Attempt to divide by zero ... 
my $y = (1.5/0).Num; # assigns 'Inf'

```