3 ms·
The use of an annotative '#e' to get an exact number contrasts with Perl 6's choices for the default interpretation of number literals. The Perl 6 choice adopts
by raiph 11y ago
The use of an annotative '#e' to get an exact number contrasts with Perl 6's choices for the default interpretation of number literals. The Perl 6 choice adopts scientific notation to correspond to floats:
200000000000000000000 # exact (integer) 2 * 10 ** 20
0.00000000000000000002 # exact (rational) 2 * 10 ** -20
0.2e-19 # inexact (float) 2 * 10 ** -20
2e20 # inexact (float) 2 * 10 ** 20