-->
当前位置:首页 > 题库

PROGRAMMING:Sine function

Luz5年前 (2021-05-10)题库413
The sine of any angle is calculated according to McLaughlin formula.
![ Title. JPG] (~ / 5224d057-495b-4086-8b5f-03a494dcdc3a. JPG)
####Input format
> $$x$$ $$\epsilon$$
Note: $$x $$is the angle (unit: radian), $$$epsilon $$is the calculation precision.
####Output format
> $$y$$
Note: $$y $$is the sine value of $$x $$. Output 6 decimal places with% f format qualifier.
Requirement: the absolute value of the last item calculated is less than $$\ epsilon $$.
####Input sample 1
```in
0.5235987755982989 0.00000001
```
####Output sample 1
```out
zero point five zero zero zero zero zero
```
####Input sample 2
```in
314.6828641345776 0.000001
```
####Output sample 2
```out
zero point five zero zero zero zero zero
```
Tip: convert x to the angle in the interval $$(- 2, PI, 2, PI) $, so as to improve the accuracy and speed up the calculation.







answer:If there is no answer, please comment