diff options
author | siddhu8990 | 2015-09-03 02:06:47 +0530 |
---|---|---|
committer | siddhu8990 | 2015-09-03 02:06:47 +0530 |
commit | 3704cdf7eb9551353ac9175aa10be444755b8e22 (patch) | |
tree | e7d66716e67137209a55d880ebb58a7f69ce3484 /2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c | |
parent | 5675f7cd91515d5e88fd151943c3ec5cde57ceaa (diff) | |
download | Scilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.tar.gz Scilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.tar.bz2 Scilab2C-3704cdf7eb9551353ac9175aa10be444755b8e22.zip |
Intermediate commit. Not to be used
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c b/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c index b30c14e2..beed9b30 100644 --- a/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c +++ b/2.3-1/src/c/elementaryFunctions/cosh/i8cosha.c @@ -1,6 +1,6 @@ /* * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab - * Copyright (C) 2008-2008 - INRIA - Bruno JOFRET + * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET * * This file must be used under the terms of the CeCILL. * This source file is licensed as described in the file COPYING, which @@ -10,17 +10,11 @@ * */ -/* -// cosh(z) = 0.5 (exp(|z|) + exp(-|z|)) -// = 0.5 ( y + 1/y ) with y = exp(|z|) -*/ - -#include <math.h> #include "cosh.h" -#include "exp.h" -#include "abs.h" -float i8coshs(int8 x) { - float y = i8exps(i8abss(x)); - return (0.5f * (y + 1.0f / y)); +void i8cosha(int8* x, int size, int8* y) { + int i = 0; + for (i = 0; i < size; ++i) { + y[i] = i8coshs(x[i]); + } } |