diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-04-14 14:47:15 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-04-14 14:47:15 +0000 |
commit | 9d6bff35783dc768c5d72663e6e2d31769c5da91 (patch) | |
tree | 76675e6de1c3945b8f06b45b9400b9c7e240c5e8 /pp.c | |
parent | 523b30316ccbf7957aa8da41729ba68b3a5f47b5 (diff) | |
download | perl-9d6bff35783dc768c5d72663e6e2d31769c5da91.tar.gz |
Make atan2(0,0) return undef
p4raw-id: //depot/perl@33676
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2798,7 +2798,10 @@ PP(pp_atan2) dVAR; dSP; dTARGET; tryAMAGICbin(atan2,0); { dPOPTOPnnrl; - SETn(Perl_atan2(left, right)); + if (left == 0.0 && right == 0.0) + SETs(&PL_sv_undef); + else + SETn(Perl_atan2(left, right)); RETURN; } } |