Created
February 9, 2017 16:44
-
-
Save zoffixznet/292d5634b8d6b652b976d36fd1b09e28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ZoffixW> m: sub e ($x, $y) { $x - $y * ($x/$y).round }; say e -2, 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0.7182818284590462» | |
<ZoffixW> m: sub e ($x, $y) { $x - $y * ($x/$y).floor }; say e -2, 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0.7182818284590462» | |
<ZoffixW> m: say -2 % 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0» | |
<ZoffixW> m: sub e ($x, $y) { ($x/$y).floor }; say e -2, 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0.7182818284590462» | |
<ZoffixW> m: say -2 / 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«-1» | |
<ZoffixW> m: say (-2 / 2).floor | |
<camelia> rakudo-moar 1615c8: OUTPUT«-1» | |
<ZoffixW> m: sub e ($x, $y ) {42}; say e -2, 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0.7182818284590462» | |
<ZoffixW> m: say e -2, 2 | |
<camelia> rakudo-moar 1615c8: OUTPUT«0.7182818284590462» | |
<ZoffixW> m: say e | |
<camelia> rakudo-moar 1615c8: OUTPUT«2.71828182845905» |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment