Author mark.dickinson
Recipients mark.dickinson, rhettinger, serhiy.storchaka
Date 2013-02-10.12:19:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I suspect that this is simply an error in the original code:  the docstring says that mu should be in the range [0, 2*pi), so reducing mu modulo 2*pi makes little sense.  I guess the lines at the end of the method were intended to be written:

        if u3 >= 0.5:
            theta = (mu + _acos(f)) % TWOPI
            theta = (mu - _acos(f)) % TWOPI

instead of:

        if u3 >= 0.5:
            theta = (mu % TWOPI) + _acos(f)
            theta = (mu % TWOPI) - _acos(f)

That would then give consistent results, at least.
Date User Action Args
2013-02-10 12:19:23mark.dickinsonsetrecipients: + mark.dickinson, rhettinger, serhiy.storchaka
2013-02-10 12:19:23mark.dickinsonsetmessageid: <>
2013-02-10 12:19:23mark.dickinsonlinkissue17149 messages
2013-02-10 12:19:23mark.dickinsoncreate