>Everything is right, except... you forgot either the -c or -u switch >for the diff. (And no, I don't know why the default output from diffs >is mostly useless. Just one of those things, I expect)
ok resend with -u switch. /Stefan Index: ops/math.ops =================================================================== RCS file: /cvs/public/parrot/ops/math.ops,v retrieving revision 1.17 diff -u -r1.17 math.ops --- ops/math.ops 22 Apr 2004 09:17:38 -0000 1.17 +++ ops/math.ops 27 Apr 2004 14:43:47 -0000 @@ -851,10 +851,32 @@ goto NEXT(); } +######################################## + +=item B<sqrt>(out NUM, in INT) + +=item B<sqrt>(out NUM, in NUM) + +Set $1 to the square root of $2. + +=cut + +inline op sqrt(out NUM, in INT) :base_core { + $1 = sqrt((FLOATVAL)$2); + goto NEXT(); +} + +inline op sqrt(out NUM, in NUM) :base_core { + $1 = sqrt((FLOATVAL)$2); + goto NEXT(); +} + =back =cut + + ############################################################################### =head2 Transcendental mathematical operations @@ -1144,7 +1166,7 @@ =item B<sin>(out NUM, in INT) -item B<sin>(out NUM, in NUM) +=item B<sin>(out NUM, in NUM) Set $1 to the sine of $2 (given in radians). Index: t/op/trans.t =================================================================== RCS file: /cvs/public/parrot/t/op/trans.t,v retrieving revision 1.10 diff -u -r1.10 trans.t --- t/op/trans.t 8 Mar 2004 00:19:58 -0000 1.10 +++ t/op/trans.t 27 Apr 2004 14:43:47 -0000 @@ -16,7 +16,7 @@ =cut -use Parrot::Test tests => 18; +use Parrot::Test tests => 19; use Math::Trig qw( tan sec atan asin acos asec cosh sinh tanh sech ); # This defines two macros: @@ -603,4 +603,25 @@ ok 16 OUTPUT +output_is( <<"CODE", <<OUTPUT, "sqrt" ); [EMAIL PROTECTED] $fp_equality_macro ]} + set N1, 9.0 + sqrt N2, N1 + .fp_eq (N2, 3.0, EQ1) + print "not " +EQ1: print "ok 1\\n" + + set I1, 9 + sqrt N2, I1 + .fp_eq (N2, 3.0, EQ2) + print "not " +EQ2: print "ok 2\\n" + + end +CODE +ok 1 +ok 2 +OUTPUT + + 1;