1176388Sdas/*- 2176388Sdas * Copyright (c) 2008 David Schultz <das@FreeBSD.ORG> 3176388Sdas * All rights reserved. 4176388Sdas * 5176388Sdas * Redistribution and use in source and binary forms, with or without 6176388Sdas * modification, are permitted provided that the following conditions 7176388Sdas * are met: 8176388Sdas * 1. Redistributions of source code must retain the above copyright 9176388Sdas * notice, this list of conditions and the following disclaimer. 10176388Sdas * 2. Redistributions in binary form must reproduce the above copyright 11176388Sdas * notice, this list of conditions and the following disclaimer in the 12176388Sdas * documentation and/or other materials provided with the distribution. 13176388Sdas * 14176388Sdas * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15176388Sdas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16176388Sdas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17176388Sdas * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18176388Sdas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19176388Sdas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20176388Sdas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21176388Sdas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22176388Sdas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23176388Sdas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24176388Sdas * SUCH DAMAGE. 25176388Sdas */ 26176388Sdas 27176388Sdas#include <sys/cdefs.h> 28176388Sdas__FBSDID("$FreeBSD$"); 29176388Sdas 30176388Sdas#include <math.h> 31176388Sdas 32176388Sdas/* 33176388Sdas * We simply call tgamma() rather than bloating the math library with 34176388Sdas * a float-optimized version of it. The reason is that tgammaf() is 35176388Sdas * essentially useless, since the function is superexponential and 36176388Sdas * floats have very limited range. 37176388Sdas */ 38176388Sdasfloat 39176388Sdastgammaf(float x) 40176388Sdas{ 41176388Sdas 42176388Sdas return (tgamma(x)); 43176388Sdas} 44