Documentation for method narrow
assembled from the following pages:
Class: Numeric §
From Numeric
(Numeric) method narrow §
method narrow(Numeric --> Numeric)
Returns the number converted to the narrowest type that can hold it without loss of precision.
say (4.0 + 0i).narrow.raku; # OUTPUT: «4» say (4.0 + 0i).narrow.^name; # OUTPUT: «Int»