summaryrefslogtreecommitdiff
path: root/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c')
-rw-r--r--src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c b/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c
index 3cf032a..3a4b23c 100644
--- a/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c
+++ b/src/c/elementaryFunctions/Trigonometry/cotd/dcotda.c
@@ -1,16 +1,23 @@
+/* Copyright (C) 2016 - IIT Bombay - FOSSEE
+
+ This file must be used under the terms of the CeCILL.
+ This source file is licensed as described in the file COPYING, which
+ you should have received as part of this distribution. The terms
+ are also available at
+ http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
+ Author: Shamik Guha
+ Organization: FOSSEE, IIT Bombay
+ Email: toolbox@scilab.in
+*/
+
#include "cotd.h"
-#include <math.h>
-#define PI 3.14159265
void dcotda(double* in,int size,double* out)
{
- double val;
int i=0;
- val = PI / 180.0;
for(i=0;i<size;i++)
{
- out[i]=1/tan(in[i]*val);
- /*printf("The cotangent of %lf degrees is %lf \n", in[i], out[i]);*/
+ out[i]=dcotds(in[i]);
}
}