A `Num` object stores a floating-point number. It is immutable. On most platforms, it's an IEEE 754 64-bit floating point numbers, aka "double precision".

## Inf§

The value `Inf` is an instance of `Num` and represents value that's too large to represent in 64-bit double-precision floating point number (roughly, above `1.7976931348623158e308` for positive `Inf` and below `-1.7976931348623157e308` for negative `Inf`) as well as returned from certain operations as defined by the IEEE 754-2008 standard.

The `∞` `U+221E` Unicode character can be used instead of the word `Inf` and can be handy when `Inf` would otherwise require an unspace, such as when writing Complex numbers:

Note that there are just two infinities (positive and negative), so even if an operation that would instinctively give a "larger" infinity is performed, the result in still an infinity of the original magnitude. The infinities can be compared, operated and used as an argument as if they were simply a number that's too big to represent or to signify "without bounds" or limits:

In some cases, it's used as an implicit value to represent "all of them"

In the example above, `Inf` can be eliminated, since it's the default value for the second argument of `.comb`, used to indicate how many parts should be returned.

Division of an infinity by another infinity results in a `NaN`:

## NaN§

The value `NaN` is an instance of `Num` and represents a floating point not-a-number value, which is returned from some routines where a concrete number as the answer is not defined, but a Numeric value is still acceptable. `NaN` is defined and boolifies to `True`, but is not numerically equal to any value (including itself).

To test for `NaN`, use isNaN method or === operator:

## method new§

`Num.new` without argument will create a `Num` with the value `0e0`. With an argument, it will be coerced to `Num` and then returned.

## method rand§

Returns a pseudo random number between 0 and the invocant.

## sub srand§

Seeds the pseudo random number generator used by Num.rand with the provided value. Note that `srand` is called with a platform dependent value when a Raku program is started.

## method Capture§

Throws `X::Cannot::Capture`.

## method Int§

Converts the number to an Int. Fails with `X::Numeric::CannotConvert` if the invocant is a `NaN` or `Inf`/`-Inf`. No rounding is performed.

## method Rat§

Converts the number to a Rat with `\$epsilon` precision. If the invocant is a `Inf`, `-Inf`, or a `NaN`, converts them to a Rat with `0` denominator and `1`, `-1`, or `0` numerator, respectively.

## method FatRat§

Converts the number to a FatRat with the precision `\$epsilon`. If invocant is a `Inf`, `-Inf`, or a `NaN`, converts them to a FatRat with `0` denominator and `1`, `-1`, or `0` numerator, respectively.

## method Num§

Returns the invocant.

## method Str§

Returns a string representation of the number.

`Cool` being a parent class of `Num`, an explicit call to the `Num.Str` method is seldom needed.

## method Bridge§

Returns the number.