summaryrefslogtreecommitdiff
path: root/src/elementaryFunctions/cos
diff options
context:
space:
mode:
authorjofret2007-02-23 17:07:39 +0000
committerjofret2007-02-23 17:07:39 +0000
commit870f1db45dae6e6d137b83bb4a4e5e9b47e73b89 (patch)
tree03c8aef4774ae44af3ba89781c47f6303bad42da /src/elementaryFunctions/cos
parent9d6ec22d29413e2b662acd523c1171a2228f13f6 (diff)
downloadscilab2c-870f1db45dae6e6d137b83bb4a4e5e9b47e73b89.tar.gz
scilab2c-870f1db45dae6e6d137b83bb4a4e5e9b47e73b89.tar.bz2
scilab2c-870f1db45dae6e6d137b83bb4a4e5e9b47e73b89.zip
* src/elementaryFunctions/includes :
Add includes directory for profiling functions. * src/elementaryFunctions/*/*.h : Moving headers to includes. * src/elementaryFunctions/*/*.c : Better dependancies with includes. * src/elementaryFunctions/*/Makedile : Changing includes / headers / link.
Diffstat (limited to 'src/elementaryFunctions/cos')
-rw-r--r--src/elementaryFunctions/cos/Makefile10
-rw-r--r--src/elementaryFunctions/cos/ccosa.c6
-rw-r--r--src/elementaryFunctions/cos/ccoss.c16
-rw-r--r--src/elementaryFunctions/cos/cos.h57
-rw-r--r--src/elementaryFunctions/cos/dcosa.c4
-rw-r--r--src/elementaryFunctions/cos/scosa.c4
-rw-r--r--src/elementaryFunctions/cos/zcosa.c6
-rw-r--r--src/elementaryFunctions/cos/zcoss.c16
8 files changed, 27 insertions, 92 deletions
diff --git a/src/elementaryFunctions/cos/Makefile b/src/elementaryFunctions/cos/Makefile
index 118716cc..fab89b1e 100644
--- a/src/elementaryFunctions/cos/Makefile
+++ b/src/elementaryFunctions/cos/Makefile
@@ -5,7 +5,7 @@
## Made by Bruno JOFRET <bruno.jofret@inria.fr>
##
## Started on Thu Nov 30 16:33:40 2006 jofret
-## Last update Wed Jan 31 11:57:33 2007 jofret
+## Last update Fri Feb 23 16:33:38 2007 jofret
##
## Copyright INRIA 2006
##
@@ -14,9 +14,9 @@ NAME = ../../lib/libCos.a
RM = rm -f
CC = gcc
-INCLUDE = ../../type
-LINK = ../../lib
-CFLAGS = -Werror -Wall -pedantic -ansi -I $(INCLUDE) -L $(LINK) $(STANDARD)
+INCLUDE = -I ../../type -I ../includes
+LINK = -L ../../lib
+CFLAGS = -Werror -Wall -pedantic -ansi $(INCLUDE) $(LINK) $(STANDARD)
AR = ar cru
RANLIB = ranlib
@@ -29,7 +29,7 @@ SRC = scoss.c \
ccosa.c \
zcosa.c
-HEAD = cos.h
+HEAD = ../includes/cos.h
OBJ = $(SRC:.c=.o)
all: $(NAME)
diff --git a/src/elementaryFunctions/cos/ccosa.c b/src/elementaryFunctions/cos/ccosa.c
index 4c49b29b..5657e320 100644
--- a/src/elementaryFunctions/cos/ccosa.c
+++ b/src/elementaryFunctions/cos/ccosa.c
@@ -5,14 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 14:54:24 2006 jofret
-** Last update Wed Jan 31 11:14:50 2007 jofret
+** Last update Fri Feb 23 16:16:05 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "floatComplex.h"
-
-floatComplex ccoss(floatComplex);
+#include "cos.h"
void ccosa(floatComplex* x, int strideX, floatComplex* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/cos/ccoss.c b/src/elementaryFunctions/cos/ccoss.c
index 91a822fa..66d73129 100644
--- a/src/elementaryFunctions/cos/ccoss.c
+++ b/src/elementaryFunctions/cos/ccoss.c
@@ -5,21 +5,19 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 12:04:28 2006 jofret
-** Last update Mon Feb 5 17:24:00 2007 jofret
+** Last update Fri Feb 23 16:35:12 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "floatComplex.h"
-
-float scoss(float);
-float scoshs(float);
-float ssins(float);
-float ssinhs(float);
+#include "cos.h"
+#include "sin.h"
+#include "cosh.h"
+#include "sinh.h"
floatComplex ccoss(floatComplex z) {
- float real = creal(z);
- float imag = cimag(z);
+ float real = creals(z);
+ float imag = cimags(z);
return FloatComplex(scoss(real) * scoshs(imag),
-ssins(real) * ssinhs(imag));
diff --git a/src/elementaryFunctions/cos/cos.h b/src/elementaryFunctions/cos/cos.h
deleted file mode 100644
index 13a4b303..00000000
--- a/src/elementaryFunctions/cos/cos.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-** -*- C -*-
-**
-** cos.h
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Tue Dec 5 15:49:18 2006 jofret
-** Last update Thu Dec 7 15:53:29 2006 jofret
-**
-** Copyright INRIA 2006
-*/
-
-/*
-** Compute Cosine for different types .
-*/
-
-/*
-** \brief Float Cosine function
-*/
-float scoss(float);
-
-/*
-** \brief Double Cosine function
-*/
-double dcoss(double);
-
-/*
-** \brief Float Complex Cosine function
-*/
-floatComplex ccoss(floatComplex);
-
-/*
-** \brief Double Complex Cosine function
-*/
-doubleComplex zcoss(doubleComplex);
-
-/*
-** \brief Float Matrix Cosine function
-*/
-void scosa(float*, int, float*, int, int);
-
-/*
-** \brief Double Matrix Cosine function
-*/
-void dcosa(double*, int, double*, int, int);
-
-/*
-** \brief Float Complex Matrix Cosine function
-*/
-void ccosa(floatComplex*, int, floatComplex*, int, int);
-
-/*
-** \brief Double Complex Matrix Cosine function
-*/
-void zcosa(doubleComplex*, int, doubleComplex*, int, int);
-
-
diff --git a/src/elementaryFunctions/cos/dcosa.c b/src/elementaryFunctions/cos/dcosa.c
index 45c18465..0027e533 100644
--- a/src/elementaryFunctions/cos/dcosa.c
+++ b/src/elementaryFunctions/cos/dcosa.c
@@ -5,12 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 14:54:56 2006 jofret
-** Last update Thu Dec 7 17:30:17 2006 jofret
+** Last update Fri Feb 23 16:15:34 2007 jofret
**
** Copyright INRIA 2006
*/
-double dcoss(double);
+#include "cos.h"
void dcosa(double* x, int strideX, double* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/cos/scosa.c b/src/elementaryFunctions/cos/scosa.c
index ef9ae739..745b5d85 100644
--- a/src/elementaryFunctions/cos/scosa.c
+++ b/src/elementaryFunctions/cos/scosa.c
@@ -5,12 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 16:03:27 2006 jofret
-** Last update Thu Dec 7 17:32:22 2006 jofret
+** Last update Fri Feb 23 16:15:20 2007 jofret
**
** Copyright INRIA 2006
*/
-float scoss(float);
+#include "cos.h"
void scosa(float* x, int strideX, float* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/cos/zcosa.c b/src/elementaryFunctions/cos/zcosa.c
index 525c04d5..a68c6e30 100644
--- a/src/elementaryFunctions/cos/zcosa.c
+++ b/src/elementaryFunctions/cos/zcosa.c
@@ -5,14 +5,12 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 16:12:02 2006 jofret
-** Last update Wed Jan 31 10:19:21 2007 jofret
+** Last update Fri Feb 23 16:24:10 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "doubleComplex.h"
-
-doubleComplex zcoss(doubleComplex);
+#include "cos.h"
void zcosa(doubleComplex* x, int strideX, doubleComplex* y, int strideY, int size) {
int i = 0;
diff --git a/src/elementaryFunctions/cos/zcoss.c b/src/elementaryFunctions/cos/zcoss.c
index c5fe96bc..12000191 100644
--- a/src/elementaryFunctions/cos/zcoss.c
+++ b/src/elementaryFunctions/cos/zcoss.c
@@ -5,21 +5,19 @@
** Made by Bruno JOFRET <bruno.jofret@inria.fr>
**
** Started on Thu Dec 7 12:05:48 2006 jofret
-** Last update Mon Feb 5 17:25:27 2007 jofret
+** Last update Fri Feb 23 16:35:32 2007 jofret
**
** Copyright INRIA 2006
*/
-#include "doubleComplex.h"
-
-double dcoss(double);
-double dcoshs(double);
-double dsins(double);
-double dsinhs(double);
+#include "cos.h"
+#include "sin.h"
+#include "cosh.h"
+#include "sinh.h"
doubleComplex zcoss(doubleComplex z) {
- double real = creal(z);
- double imag = cimag(z);
+ double real = zreals(z);
+ double imag = zimags(z);
return DoubleComplex(dcoss(real) * dcoshs(imag),
-dsins(real) * dsinhs(imag));