mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-29 19:30:36 +02:00
This is a followup to edfca3b7e5
, which
added the 'posix_spawnp' module but not 'posix_spawn'.
* m4/gnulib-cache.m4: Add 'posix_spawn' module.
* gnulib-local/m4/clock_time.m4.diff: Adjust.
* configure.ac: Move 'gl_EARLY' use right after 'AC_PROG_CC'.
38 lines
1.1 KiB
C
38 lines
1.1 KiB
C
/* Logarithm.
|
|
Copyright (C) 2012-2023 Free Software Foundation, Inc.
|
|
|
|
This file is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU Lesser General Public License as
|
|
published by the Free Software Foundation, either version 3 of the
|
|
License, or (at your option) any later version.
|
|
|
|
This file 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 Lesser General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
|
|
|
#include <config.h>
|
|
|
|
/* Specification. */
|
|
#include <math.h>
|
|
|
|
double
|
|
log (double x)
|
|
#undef log
|
|
{
|
|
if (x <= 0.0)
|
|
{
|
|
/* Work around the OSF/1 5.1 bug. */
|
|
if (x == 0.0)
|
|
/* Return -Infinity. */
|
|
return -1.0 / 0.0;
|
|
/* Work around the NetBSD 5.1, Solaris 11.0 bug. */
|
|
else /* x < 0.0 */
|
|
/* Return NaN. */
|
|
return 0.0 / 0.0;
|
|
}
|
|
return log (x);
|
|
}
|