summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/Trigonometry
diff options
context:
space:
mode:
authorAnkitr192017-07-04 15:26:35 +0530
committerAnkitr192017-07-04 15:26:35 +0530
commitafae3013c86d26dc1b233228431be208705acff0 (patch)
tree26ed27e507f543efa553e4af5f8a9c9a5b44500e /src/c/elementaryFunctions/Trigonometry
parentefd4b2645e3fd3c3cdd7b65501a0e7ae26d03c59 (diff)
downloadScilab2C_fossee_old-afae3013c86d26dc1b233228431be208705acff0.tar.gz
Scilab2C_fossee_old-afae3013c86d26dc1b233228431be208705acff0.tar.bz2
Scilab2C_fossee_old-afae3013c86d26dc1b233228431be208705acff0.zip
New function and rpi issues resolved
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry')
-rw-r--r--src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c b/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
index ad7d095..1f6cf9b 100644
--- a/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
+++ b/src/c/elementaryFunctions/Trigonometry/sinc/zsinca.c
@@ -14,18 +14,22 @@
#include "sinc.h"
#include "sin.h"
#include "doubleComplex.h"
+#include "division.h"
void zsinca(doubleComplex* sample,int size,doubleComplex* oup)
{
int j;
+ double r,i;
for(j=0;j<size;j++)
{
- if(sample[j]==0)
+ r=zreals(sample[j]);
+ i=zimags(sample[j]);
+ if(r==0 && i==0)
{
- oup[j]==DoubleComplex(1,0);
+ oup[j]=DoubleComplex(1,0);
}
else
{
- oup[j]=zsins(sample[j])/sample[j];
+ oup[j]=zrdivs(zsins(sample[j]),sample[j]);
}
}
}