Perl is closer to C than to JavaScript.
$ cat a.c int main() { double x = 1; double y = 1; int z = x & y; return 0; } $ gcc -Wall -Wextra -pedantic a.c -o a && a a.c: In function ‘main’: a.c:4:15: error: invalid operands to binary & (have ‘double’ and ‘doub +le’) int z = x & y; ^ a.c:4:9: warning: unused variable ‘z’ [-Wunused-variable] int z = x & y; ^
And the underlying reason for that is that CPUs simply can't perform bitwise-AND on floats (because it makes little sense to do so).
In reply to Re^3: perl arithmetic is killing me! HELP!
by ikegami
in thread perl arithmetic is killing me! HELP!
by harangzsolt33
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |