my $num = Inf; given $num { say "+Inf" when Inf; say "-Inf" when -Inf; say "NaN" when NaN; }