diff options
author | Bruno Haible <bruno@clisp.org> | 2011-10-09 00:48:38 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-10-09 00:48:38 +0200 |
commit | 07c704f0e5199d1cff52930ecf98d6a3631da3c8 (patch) | |
tree | f1477ca5550a0266ba057136e782f8f87e14ef84 /lib/coshf.c | |
parent | a8e1d33e94757bf88f11e8ee93a27d343e07670c (diff) | |
download | gnulib-07c704f0e5199d1cff52930ecf98d6a3631da3c8.tar.gz |
New module 'coshf'.
* lib/math.in.h (coshf): New declaration.
* lib/coshf.c: New file.
* m4/coshf.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether coshf is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_COSHF, HAVE_COSHF.
* modules/math (Makefile.am): Substitute GNULIB_COSHF, HAVE_COSHF.
* modules/coshf: New file.
* tests/test-math-c++.cc: Check the declaration of coshf.
* doc/posix-functions/coshf.texi: Mention the new module.
Diffstat (limited to 'lib/coshf.c')
-rw-r--r-- | lib/coshf.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/coshf.c b/lib/coshf.c new file mode 100644 index 0000000000..c9775d7ad4 --- /dev/null +++ b/lib/coshf.c @@ -0,0 +1,26 @@ +/* Hyperbolic cosine function. + Copyright (C) 2011 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. */ + +#include <config.h> + +/* Specification. */ +#include <math.h> + +float +coshf (float x) +{ + return (float) cosh ((double) x); +} |