Skip to content

Commit

Permalink
Prevent spurious negative zeros
Browse files Browse the repository at this point in the history
  • Loading branch information
Util committed Jul 22, 2011
1 parent 604bb6f commit ab7d01c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pmc/complex.pmc
Original file line number Diff line number Diff line change
Expand Up @@ -1773,12 +1773,12 @@ atanh = i atan(-ix)
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
SET_ATTR_re(INTERP, d, im);
SET_ATTR_im(INTERP, d, -re);
SET_ATTR_im(INTERP, d, FLOAT_IS_ZERO(re) ? 0.0 : -re);

(PMC *d) = PCCINVOKE(INTERP, d, "asin");
GET_ATTR_re(INTERP, d, re);
GET_ATTR_im(INTERP, d, im);
SET_ATTR_re(INTERP, d, -im);
SET_ATTR_re(INTERP, d, FLOAT_IS_ZERO(im) ? 0.0 : -im);
SET_ATTR_im(INTERP, d, re);

RETURN(PMC *d);
Expand Down Expand Up @@ -1828,12 +1828,12 @@ atanh = i atan(-ix)
GET_ATTR_re(INTERP, SELF, re);
GET_ATTR_im(INTERP, SELF, im);
SET_ATTR_re(INTERP, d, im);
SET_ATTR_im(INTERP, d, -re);
SET_ATTR_im(INTERP, d, FLOAT_IS_ZERO(re) ? 0.0 : -re);

(PMC *d) = PCCINVOKE(INTERP, d, "atan");
GET_ATTR_re(INTERP, d, re);
GET_ATTR_im(INTERP, d, im);
SET_ATTR_re(INTERP, d, -im);
SET_ATTR_re(INTERP, d, FLOAT_IS_ZERO(im) ? 0.0 : -im);
SET_ATTR_im(INTERP, d, re);

RETURN(PMC *d);
Expand Down

0 comments on commit ab7d01c

Please sign in to comment.