view modules/cbrt @ 16533:d91850ca525f

cbrt: Provide replacement on MSVC and Minix. * lib/math.in.h (cbrt): New declaration. * lib/cbrt.c: New file. * m4/cbrt.m4: New file. * m4/math_h.m4 (gl_MATH_H): Test whether cbrt is declared. (gl_MATH_H_DEFAULTS): Initialize GNULIB_CBRT, HAVE_CBRT. * modules/math (Makefile.am): Substitute GNULIB_CBRT, HAVE_CBRT. * modules/cbrt (Files): Add lib/cbrt.c, m4/cbrt.m4. (Depends-on): Add dependencies. (configure.ac): Arrange to compile replacement if HAVE_CBRT is 0. * tests/test-math-c++.cc: Check the declaration of cbrt. * doc/posix-functions/cbrt.texi: Mention that the module provides a replacement.
author Bruno Haible <bruno@clisp.org>
date Wed, 29 Feb 2012 23:42:53 +0100
parents 6ff1b1c23f57
children fdbe3125f81a
line wrap: on
line source

Description:
cbrt() function: cube root.

Files:
lib/cbrt.c
m4/cbrt.m4
m4/mathfunc.m4

Depends-on:
math
isfinite        [test $HAVE_CBRT = 0]
fabs            [test $HAVE_CBRT = 0]
frexp           [test $HAVE_CBRT = 0]
ldexp           [test $HAVE_CBRT = 0]

configure.ac:
gl_FUNC_CBRT
if test $HAVE_CBRT = 0; then
  AC_LIBOBJ([cbrt])
fi
gl_MATH_MODULE_INDICATOR([cbrt])

Makefile.am:

Include:
<math.h>

Link:
$(CBRT_LIBM)

License:
LGPL

Maintainer:
Bruno Haible