Hey, what's with the aggrieved tone? I wrote a2p 19 years ago, and have hardly looked at it since. Meanwhile the world has changed a few dozen times, and both awk and Perl have grown, and there's only one of me to go around. Yes, I'm vaguely embarrassed by a2p by now, but a2p is far from the only program I've abandoned to the care of others, and it's just not way up there on my list of priorities to take it back right now. So feel completely free to fix it yourself. :-)
Larry On Tue, Apr 11, 2006 at 11:44:43PM +0800, Dan Jacobson wrote: : 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]