xref: /freebsd/lib/msun/src/s_tgammaf.c (revision 0dd5a5603e7a33d976f8e6015620bbc79839c609)
171c11dd5SDavid Schultz /*-
2*4d846d26SWarner Losh  * SPDX-License-Identifier: BSD-2-Clause
35e53a4f9SPedro F. Giffuni  *
471c11dd5SDavid Schultz  * Copyright (c) 2008 David Schultz <das@FreeBSD.ORG>
571c11dd5SDavid Schultz  * All rights reserved.
671c11dd5SDavid Schultz  *
771c11dd5SDavid Schultz  * Redistribution and use in source and binary forms, with or without
871c11dd5SDavid Schultz  * modification, are permitted provided that the following conditions
971c11dd5SDavid Schultz  * are met:
1071c11dd5SDavid Schultz  * 1. Redistributions of source code must retain the above copyright
1171c11dd5SDavid Schultz  *    notice, this list of conditions and the following disclaimer.
1271c11dd5SDavid Schultz  * 2. Redistributions in binary form must reproduce the above copyright
1371c11dd5SDavid Schultz  *    notice, this list of conditions and the following disclaimer in the
1471c11dd5SDavid Schultz  *    documentation and/or other materials provided with the distribution.
1571c11dd5SDavid Schultz  *
1671c11dd5SDavid Schultz  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1771c11dd5SDavid Schultz  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1871c11dd5SDavid Schultz  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
1971c11dd5SDavid Schultz  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2071c11dd5SDavid Schultz  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2171c11dd5SDavid Schultz  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2271c11dd5SDavid Schultz  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2371c11dd5SDavid Schultz  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2471c11dd5SDavid Schultz  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2571c11dd5SDavid Schultz  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2671c11dd5SDavid Schultz  * SUCH DAMAGE.
2771c11dd5SDavid Schultz  */
2871c11dd5SDavid Schultz 
2971c11dd5SDavid Schultz #include <math.h>
3071c11dd5SDavid Schultz 
3171c11dd5SDavid Schultz /*
3271c11dd5SDavid Schultz  * We simply call tgamma() rather than bloating the math library with
3371c11dd5SDavid Schultz  * a float-optimized version of it. The reason is that tgammaf() is
3471c11dd5SDavid Schultz  * essentially useless, since the function is superexponential and
3571c11dd5SDavid Schultz  * floats have very limited range.
3671c11dd5SDavid Schultz  */
3771c11dd5SDavid Schultz float
tgammaf(float x)3871c11dd5SDavid Schultz tgammaf(float x)
3971c11dd5SDavid Schultz {
4071c11dd5SDavid Schultz 
4171c11dd5SDavid Schultz 	return (tgamma(x));
4271c11dd5SDavid Schultz }
43