mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 20:43:41 +01:00
Remove the non-standard gamma() function. Use lgamma() instead.
This commit is contained in:
parent
388f0f1d32
commit
532fe1553e
8 changed files with 8 additions and 158 deletions
|
@ -281,10 +281,6 @@ double y0(double);
|
||||||
double y1(double);
|
double y1(double);
|
||||||
double yn(int, double);
|
double yn(int, double);
|
||||||
|
|
||||||
#if __XSI_VISIBLE <= 500 || __BSD_VISIBLE
|
|
||||||
double gamma(double);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE
|
#if __XSI_VISIBLE <= 600 || __BSD_VISIBLE
|
||||||
double scalb(double, double);
|
double scalb(double, double);
|
||||||
#endif
|
#endif
|
||||||
|
@ -312,10 +308,9 @@ int finite(double) __pure2;
|
||||||
int isnanf(float) __pure2;
|
int isnanf(float) __pure2;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Reentrant version of gamma & lgamma; passes signgam back by reference
|
* Reentrant version of lgamma; passes signgam back by reference as the
|
||||||
* as the second argument; user must allocate space for signgam.
|
* second argument; user must allocate space for signgam.
|
||||||
*/
|
*/
|
||||||
double gamma_r(double, int *);
|
|
||||||
double lgamma_r(double, int *);
|
double lgamma_r(double, int *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -402,7 +397,6 @@ float fminf(float, float) __pure2;
|
||||||
#if __BSD_VISIBLE
|
#if __BSD_VISIBLE
|
||||||
float dremf(float, float);
|
float dremf(float, float);
|
||||||
int finitef(float) __pure2;
|
int finitef(float) __pure2;
|
||||||
float gammaf(float);
|
|
||||||
float j0f(float);
|
float j0f(float);
|
||||||
float j1f(float);
|
float j1f(float);
|
||||||
float jnf(int, float);
|
float jnf(int, float);
|
||||||
|
@ -412,11 +406,9 @@ float y1f(float);
|
||||||
float ynf(int, float);
|
float ynf(int, float);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Float versions of reentrant version of gamma & lgamma; passes
|
* Float versions of reentrant version of lgamma; passes signgam back by
|
||||||
* signgam back by reference as the second argument; user must
|
* reference as the second argument; user must allocate space for signgam.
|
||||||
* allocate space for signgam.
|
|
||||||
*/
|
*/
|
||||||
float gammaf_r(float, int *);
|
|
||||||
float lgammaf_r(float, int *);
|
float lgammaf_r(float, int *);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
$(CUR_SRCS) = common.c \
|
$(CUR_SRCS) = common.c \
|
||||||
e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
|
e_acos.c e_acosf.c e_acosh.c e_acoshf.c e_asin.c e_asinf.c \
|
||||||
e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
|
e_atan2.c e_atan2f.c e_atanh.c e_atanhf.c e_cosh.c e_coshf.c e_exp.c \
|
||||||
e_expf.c e_fmod.c e_fmodf.c e_gamma.c e_gamma_r.c e_gammaf.c \
|
e_expf.c e_fmod.c e_fmodf.c \
|
||||||
e_gammaf_r.c e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \
|
e_hypot.c e_hypotf.c e_j0.c e_j0f.c e_j1.c e_j1f.c \
|
||||||
e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \
|
e_jn.c e_jnf.c e_lgamma.c e_lgamma_r.c e_lgammaf.c e_lgammaf_r.c \
|
||||||
e_lgammal.c e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.c \
|
e_lgammal.c e_log.c e_log10.c e_log10f.c e_log2.c e_log2f.c e_logf.c \
|
||||||
e_pow.c e_powf.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \
|
e_pow.c e_powf.c e_remainder.c e_remainderf.c e_scalb.c e_scalbf.c \
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
|
DLLEXPORT int isopenlibm(void);
|
||||||
|
|
||||||
DLLEXPORT int isopenlibm(void) {
|
DLLEXPORT int isopenlibm(void) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,36 +0,0 @@
|
||||||
|
|
||||||
/* @(#)e_gamma.c 1.3 95/01/18 */
|
|
||||||
/*
|
|
||||||
* ====================================================
|
|
||||||
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* Developed at SunSoft, a Sun Microsystems, Inc. business.
|
|
||||||
* Permission to use, copy, modify, and distribute this
|
|
||||||
* software is freely granted, provided that this notice
|
|
||||||
* is preserved.
|
|
||||||
* ====================================================
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cdefs-compat.h"
|
|
||||||
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma.c,v 1.8 2008/02/22 02:30:34 das Exp $");
|
|
||||||
|
|
||||||
/* __ieee754_gamma(x)
|
|
||||||
* Return the logarithm of the Gamma function of x.
|
|
||||||
*
|
|
||||||
* Method: call __ieee754_gamma_r
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openlibm_math.h>
|
|
||||||
|
|
||||||
#include "math_private.h"
|
|
||||||
|
|
||||||
DLLEXPORT double
|
|
||||||
__ieee754_gamma(double x)
|
|
||||||
{
|
|
||||||
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
|
||||||
int signgam;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return __ieee754_gamma_r(x,&signgam);
|
|
||||||
}
|
|
|
@ -1,33 +0,0 @@
|
||||||
|
|
||||||
/* @(#)e_gamma_r.c 1.3 95/01/18 */
|
|
||||||
/*
|
|
||||||
* ====================================================
|
|
||||||
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* Developed at SunSoft, a Sun Microsystems, Inc. business.
|
|
||||||
* Permission to use, copy, modify, and distribute this
|
|
||||||
* software is freely granted, provided that this notice
|
|
||||||
* is preserved.
|
|
||||||
* ====================================================
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cdefs-compat.h"
|
|
||||||
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gamma_r.c,v 1.8 2008/02/22 02:30:34 das Exp $");
|
|
||||||
|
|
||||||
/* __ieee754_gamma_r(x, signgamp)
|
|
||||||
* Reentrant version of the logarithm of the Gamma function
|
|
||||||
* with user provide pointer for the sign of Gamma(x).
|
|
||||||
*
|
|
||||||
* Method: See __ieee754_lgamma_r
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openlibm_math.h>
|
|
||||||
|
|
||||||
#include "math_private.h"
|
|
||||||
|
|
||||||
DLLEXPORT double
|
|
||||||
__ieee754_gamma_r(double x, int *signgamp)
|
|
||||||
{
|
|
||||||
return __ieee754_lgamma_r(x,signgamp);
|
|
||||||
}
|
|
|
@ -1,37 +0,0 @@
|
||||||
/* e_gammaf.c -- float version of e_gamma.c.
|
|
||||||
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ====================================================
|
|
||||||
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
||||||
* Permission to use, copy, modify, and distribute this
|
|
||||||
* software is freely granted, provided that this notice
|
|
||||||
* is preserved.
|
|
||||||
* ====================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cdefs-compat.h"
|
|
||||||
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf.c,v 1.7 2008/02/22 02:30:35 das Exp $");
|
|
||||||
|
|
||||||
/* __ieee754_gammaf(x)
|
|
||||||
* Return the logarithm of the Gamma function of x.
|
|
||||||
*
|
|
||||||
* Method: call __ieee754_gammaf_r
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openlibm_math.h>
|
|
||||||
|
|
||||||
#include "math_private.h"
|
|
||||||
|
|
||||||
DLLEXPORT float
|
|
||||||
__ieee754_gammaf(float x)
|
|
||||||
{
|
|
||||||
#ifdef OPENLIBM_ONLY_THREAD_SAFE
|
|
||||||
int signgam;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return __ieee754_gammaf_r(x,&signgam);
|
|
||||||
}
|
|
|
@ -1,34 +0,0 @@
|
||||||
/* e_gammaf_r.c -- float version of e_gamma_r.c.
|
|
||||||
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ====================================================
|
|
||||||
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
|
|
||||||
*
|
|
||||||
* Developed at SunPro, a Sun Microsystems, Inc. business.
|
|
||||||
* Permission to use, copy, modify, and distribute this
|
|
||||||
* software is freely granted, provided that this notice
|
|
||||||
* is preserved.
|
|
||||||
* ====================================================
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "cdefs-compat.h"
|
|
||||||
//__FBSDID("$FreeBSD: src/lib/msun/src/e_gammaf_r.c,v 1.8 2008/02/22 02:30:35 das Exp $");
|
|
||||||
|
|
||||||
/* __ieee754_gammaf_r(x, signgamp)
|
|
||||||
* Reentrant version of the logarithm of the Gamma function
|
|
||||||
* with user provide pointer for the sign of Gamma(x).
|
|
||||||
*
|
|
||||||
* Method: See __ieee754_lgammaf_r
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <openlibm_math.h>
|
|
||||||
|
|
||||||
#include "math_private.h"
|
|
||||||
|
|
||||||
DLLEXPORT float
|
|
||||||
__ieee754_gammaf_r(float x, int *signgamp)
|
|
||||||
{
|
|
||||||
return __ieee754_lgammaf_r(x,signgamp);
|
|
||||||
}
|
|
|
@ -280,9 +280,7 @@ irint(double x)
|
||||||
#define __ieee754_fmod fmod
|
#define __ieee754_fmod fmod
|
||||||
#define __ieee754_pow pow
|
#define __ieee754_pow pow
|
||||||
#define __ieee754_lgamma lgamma
|
#define __ieee754_lgamma lgamma
|
||||||
#define __ieee754_gamma gamma
|
|
||||||
#define __ieee754_lgamma_r lgamma_r
|
#define __ieee754_lgamma_r lgamma_r
|
||||||
#define __ieee754_gamma_r gamma_r
|
|
||||||
#define __ieee754_log10 log10
|
#define __ieee754_log10 log10
|
||||||
#define __ieee754_sinh sinh
|
#define __ieee754_sinh sinh
|
||||||
#define __ieee754_hypot hypot
|
#define __ieee754_hypot hypot
|
||||||
|
@ -306,9 +304,7 @@ irint(double x)
|
||||||
#define __ieee754_fmodf fmodf
|
#define __ieee754_fmodf fmodf
|
||||||
#define __ieee754_powf powf
|
#define __ieee754_powf powf
|
||||||
#define __ieee754_lgammaf lgammaf
|
#define __ieee754_lgammaf lgammaf
|
||||||
#define __ieee754_gammaf gammaf
|
|
||||||
#define __ieee754_lgammaf_r lgammaf_r
|
#define __ieee754_lgammaf_r lgammaf_r
|
||||||
#define __ieee754_gammaf_r gammaf_r
|
|
||||||
#define __ieee754_log10f log10f
|
#define __ieee754_log10f log10f
|
||||||
#define __ieee754_log2f log2f
|
#define __ieee754_log2f log2f
|
||||||
#define __ieee754_sinhf sinhf
|
#define __ieee754_sinhf sinhf
|
||||||
|
|
Loading…
Reference in a new issue