sub tan { sin($_[0]) / cos($_[0]) }
-Perl returns C<undef> for C<atan(0,0)>.
+The return value for C<atan2(0,0)> is implementation-defined; consult
+your atan2(3) manpage for more information.
=item bind SOCKET,NAME
X<bind>
dVAR; dSP; dTARGET; tryAMAGICbin(atan2,0);
{
dPOPTOPnnrl;
- if (left == 0.0 && right == 0.0)
- SETs(&PL_sv_undef);
- else
- SETn(Perl_atan2(left, right));
+ SETn(Perl_atan2(left, right));
RETURN;
}
}
require './test.pl';
}
-plan tests => 17;
+plan tests => 16;
# compile time evaluation
# atan2() tests were removed due to differing results from calls to
# atan2() on various OS's and architectures. See perlport.pod for
# more information.
-
-# Just test that atan2(0,0) is undef, because that's implemented
-# from within perl.
-ok(!defined(atan2(0,0)), 'atan2(0,0) returns undef');