Back to index

glibc  2.9
w_lgammaf.c
Go to the documentation of this file.
00001 /* file: lgammaf.c */
00002 
00003 
00004 // Copyright (c) 2002 Intel Corporation
00005 // All rights reserved.
00006 //
00007 // Contributed 2002 by the Intel Numerics Group, Intel Corporation
00008 //
00009 // Redistribution and use in source and binary forms, with or without
00010 // modification, are permitted provided that the following conditions are
00011 // met:
00012 //
00013 // * Redistributions of source code must retain the above copyright
00014 // notice, this list of conditions and the following disclaimer.
00015 //
00016 // * Redistributions in binary form must reproduce the above copyright
00017 // notice, this list of conditions and the following disclaimer in the
00018 // documentation and/or other materials provided with the distribution.
00019 //
00020 // * The name of Intel Corporation may not be used to endorse or promote
00021 // products derived from this software without specific prior written
00022 // permission.
00023 
00024 //
00025 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00026 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00027 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00028 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
00033 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00036 //
00037 // Intel Corporation is the author of this code, and requests that all
00038 // problem reports or change requests be submitted to it directly at
00039 // http://www.intel.com/software/products/opensource/libraries/num.htm.
00040 //
00041 //
00042 
00043 // History
00044 //==============================================================
00045 // 02/04/02: Initial version
00046 // 02/22/02: Removed lgamma/gamma
00047 //
00048 /*
00049 //   FUNCTIONS:    float   lgammaf(float x)
00050 //                 float   gammaf(float x)
00051 //                 Natural logarithm of GAMMA function
00052 */
00053 
00054 #include "libm_support.h"
00055 
00056 
00057 extern float  __libm_lgammaf(float /*x*/, int* /*signgam*/, int /*signgamsz*/);
00058 
00059 
00060 float __ieee754_lgammaf(float x)
00061 {
00062 #ifdef __POSIX__
00063     extern int    signgam;
00064 #else
00065     int    signgam;
00066 #endif
00067     return __libm_lgammaf(x, &signgam, sizeof(signgam));
00068 }
00069 weak_alias (__ieee754_lgammaf, lgammaf)
00070 
00071 float __ieee754_gammaf(float x)
00072 {
00073 #ifdef __POSIX__
00074     extern int    signgam;
00075 #else
00076     int    signgam;
00077 #endif
00078     return __libm_lgammaf(x, &signgam, sizeof(signgam));
00079 }
00080 weak_alias (__ieee754_gammaf, gammaf)