RosettaCodeData/Task/Infinity/Perl-6/infinity.pl6

3 lines
143 B
Raku
Raw Permalink Normal View History

2018-06-22 20:57:24 +00:00
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'