octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45339] sind, cosd don't do range reduction ac


From: Charles Karney
Subject: [Octave-bug-tracker] [bug #45339] sind, cosd don't do range reduction accurately
Date: Wed, 04 May 2016 12:26:03 +0000
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #4, bug #45339 (project octave):

I've checked the specifications of sinPi, cosPi, atan2Pi in IEEE Std 754
2008.  I recommend making sind, cosd, atan2d behave in compatible ways
(and I don't think that the patches I provided ensure this).
Specifically

[sind is odd]

    sind(n*180) = -0 if n is a negative integer
    sind(n*180) = +0 if n is a positive integer
    sind(+/-0)  = +/-0

[cosd is even]

    cosd(n*180+90) = +0 for all integer n

[symmetries of atan2d]

    atan2d(+/-0, -0) = +/-180
    atan2d(+/-0, +0) = +/-0
    atan2d(+/-0, x)  = +/-180 for x < 0
    atan2d(+/-0, x)  = +/-0 for x > 0
    and similar special cases for x or y = +/-inf


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45339>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]