diff options
author | Bruno Haible <bruno@clisp.org> | 2011-10-08 22:32:31 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2011-10-08 22:32:31 +0200 |
commit | bb09133116a45861827711f5e8faf2c82b98c552 (patch) | |
tree | 843fcdcdb4e4a050968b7eed4e3b40bc9a400052 /lib/log10f.c | |
parent | 0fcd1e44a647cb60984c78c6e487815b74744760 (diff) | |
download | gnulib-bb09133116a45861827711f5e8faf2c82b98c552.tar.gz |
New module 'log10f'.
* lib/math.in.h (log10f): New declaration.
* lib/log10f.c: New file.
* m4/log10f.m4: New file.
* m4/math_h.m4 (gl_MATH_H): Test whether log10f is declared.
(gl_MATH_H_DEFAULTS): Initialize GNULIB_LOG10F, HAVE_LOG10F.
* modules/math (Makefile.am): Substitute GNULIB_LOG10F, HAVE_LOG10F.
* modules/log10f: New file.
* tests/test-math-c++.cc: Check the declaration of log10f.
* doc/posix-functions/log10f.texi: Mention the new module.
Diffstat (limited to 'lib/log10f.c')
-rw-r--r-- | lib/log10f.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/log10f.c b/lib/log10f.c new file mode 100644 index 0000000000..ad50c535d7 --- /dev/null +++ b/lib/log10f.c @@ -0,0 +1,26 @@ +/* Base 10 logarithmic 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 +log10f (float x) +{ + return (float) log10 ((double) x); +} |