From: Tanaka Akira Date: 2008-05-21T11:58:32+09:00 Subject: [ruby-dev:34786] Re: 1 << 2.71 In article , Yukihiro Matsumoto writes: > はい。その意図そのものを検討中ではありますが。 > ちなみにPerlもそうですね。 > > perl -le 'print 1<<2.71' > 4 ちなみに C と Python と Gauche ではエラーですね。 % cat t.c int main(int argc, char **argv) { 1 << 2.71; return 0; } nute(11:57:06)% gcc t.c t.c: In function 'main': t.c:3: error: invalid operands to binary << % python Python 2.4.4 (#2, Apr 15 2008, 23:43:20) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 1 << 2.71 Traceback (most recent call last): File "", line 1, in ? TypeError: unsupported operand type(s) for <<: 'int' and 'float' % gosh gosh> (ash 1 2.71) *** ERROR: small integer required, but got 2.71 Stack Trace: _______________________________________ gosh> -- [田中 哲][たなか あきら][Tanaka Akira]