How to compute correctly rounded trigonometric functions in degrees?

前端 未结 4 1496
轻奢々
轻奢々 2021-01-02 18:32

How could I define trigonometric functions that take arguments in degrees instead of the usual radians, and compute correctly rounded results for these arguments?

Mu

4条回答
  •  渐次进展
    2021-01-02 19:09

    You first need to detect the exact cases, and this has already been answered. Now, for the other cases, there's the well-known problem of the table maker's dilemma. If your arithmetic has a fixed (and small) precision and you want a certified bound on the intermediate precision that might be needed, there are two known solutions:

    • Obtain a bound based on Nesterenko and Waldschmidt's theorem, as described in Section 4.3 of my PhD thesis (BTW, I think this would also give you the form of the exact cases). But you will get very large bounds on the precision (at least several millions bits?).
    • Find the hardest-to-round case. It suffices to do the search in [0,180], since any larger argument will reduce to a value in [0,180] with the same fractional part (since the period is an integer).

提交回复
热议问题