|
|
- NAME
- #include <aros/libcall.h>
#include <proto/mathieeesingbas.h>
#include <proto/mathieeesingtrans.h>
#include <proto/exec.h>
#include <exec/types.h>
#include <libraries/mathieeesp.h>
float IEEESPSin ()
- SYNOPSIS
- float y
- FUNCTION
- Calculate the sine of a given IEEE single precision number in radians
- INPUTS
- y
- IEEE single precision floating point number
- RESULT
- IEEE single precision floating point number
flags:
zero : result is zero
negative : result is negative
overflow : 0
- NOTES
-
- EXAMPLE
- BUGS
-
- SEE ALSO
- MathIEEESingleTrans
- INTERNALS
- Algorithm for Calculation of sin(y):
z = floor ( |y| / pi );
y_1 = |y| - z * pi; => 0 <= y_1 < pi
if (y_1 > pi/2 ) then y_1 = pi - y_1;
=> 0 <= y_1 < pi/2
Res = y - y^3/3! + y^5/5! - y^7/7! + y^9/9! - y^11/11! =
= y(1+y^2(-1/3!+y^2(1/5!+y^2(-1/7!+y^2(1/9!-1/11!y^2)))));
if (y < 0)
Res = -Res;
if (z was an odd number)
Res = -Res;
|