Package: perl
Version: 5.8.7-10
Severity: normal
File: /usr/bin/a2p
Big fat a2p bug, not mentioned on man page even:
$ awk 'BEGIN{print 0.6 % 11}'
0.6
$ echo 'BEGIN{print 0.6 % 11}'|a2p|perl
0
$ echo 'BEGIN{print 0.6 % 11}'|a2p|tail -1
print 0.6 % 11;
If it is OK that 0.6=0 sometimes then the a2p man page should say why.
And perlop is wrong:
Binary "%" computes the modulus of two numbers. Given integer
operands $a and $b: If $b is positive, then "$a % $b" is $a
minus the largest multiple of $b that is not greater than $a.
As it doesn't mention what happens to non integers!! OK, what about
non-integers?! Say something!
Note that when "use integer" is in scope, "%" gives you direct
access to the modulus operator as implemented by your C
compiler. This operator is not as well defined for negative
operands, but it will execute faster.
Well it wasn't in scope. And you still don't mention non-integers!
[EMAIL PROTECTED]: the gawk manual should go into the details of what
gawk's % operator does.
P.S., a2p mangles my Unicode, big5, etc. _comments_. PERL_UNICODE doesn't help.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]