OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-newlib/] [newlib-1.17.0/] [newlib/] [libm/] [mathfp/] [sf_sincos.c] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 jlechner
 
2
/* @(#)z_sinf.c 1.0 98/08/13 */
3
/******************************************************************
4
 * Sine
5
 *
6
 * Input:
7
 *   x - floating point value
8
 *
9
 * Output:
10
 *   sine of x
11
 *
12
 * Description:
13
 *   This routine returns the sine of x.
14
 *
15
 *****************************************************************/
16
 
17
#include "fdlibm.h"
18
#include "zmath.h"
19
 
20
void
21
_DEFUN (sincosf, (x, sinx, cosx),
22
        float x _AND
23
        float *sinx _AND
24
        float *cosx)
25
{
26
  *sinx = sin (x);
27
  *cosx = cos (x);
28
}
29
 
30
#ifdef _DOUBLE_IS_32BITS
31
 
32
void
33
sincos (double x, double *sinx, double *cosx)
34
{
35
  *sinx = (double) sinf ((float) x);
36
  *cosx = (double) cosf ((float) x);
37
}
38
 
39
#endif /* defined(_DOUBLE_IS_32BITS) */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.