1*0a6a1f1dSLionel Sambuc /* $NetBSD: ldbl_dummy.c,v 1.2 2014/11/13 21:43:27 christos Exp $ */
284d9c625SLionel Sambuc
384d9c625SLionel Sambuc /*-
484d9c625SLionel Sambuc * Copyright (c) 2013 The NetBSD Foundation, Inc.
584d9c625SLionel Sambuc * All rights reserved.
684d9c625SLionel Sambuc *
784d9c625SLionel Sambuc * Redistribution and use in source and binary forms, with or without
884d9c625SLionel Sambuc * modification, are permitted provided that the following conditions
984d9c625SLionel Sambuc * are met:
1084d9c625SLionel Sambuc * 1. Redistributions of source code must retain the above copyright
1184d9c625SLionel Sambuc * notice, this list of conditions and the following disclaimer.
1284d9c625SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright
1384d9c625SLionel Sambuc * notice, this list of conditions and the following disclaimer in the
1484d9c625SLionel Sambuc * documentation and/or other materials provided with the distribution.
1584d9c625SLionel Sambuc *
1684d9c625SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1784d9c625SLionel Sambuc * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1884d9c625SLionel Sambuc * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1984d9c625SLionel Sambuc * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2084d9c625SLionel Sambuc * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2184d9c625SLionel Sambuc * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2284d9c625SLionel Sambuc * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2384d9c625SLionel Sambuc * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2484d9c625SLionel Sambuc * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2584d9c625SLionel Sambuc * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2684d9c625SLionel Sambuc * POSSIBILITY OF SUCH DAMAGE.
2784d9c625SLionel Sambuc */
2884d9c625SLionel Sambuc
2984d9c625SLionel Sambuc /*
3084d9c625SLionel Sambuc * Simple long double -> double wrappers for various transcendental functions.
3184d9c625SLionel Sambuc * They work neither on the additional range of long double nor do they use
3284d9c625SLionel Sambuc * the additional precision. They exist as stop gap fix for various programs
3384d9c625SLionel Sambuc * picking up long double, e.g. via the C++ run time.
3484d9c625SLionel Sambuc */
3584d9c625SLionel Sambuc
3684d9c625SLionel Sambuc #include <sys/cdefs.h>
37*0a6a1f1dSLionel Sambuc __RCSID("$NetBSD: ldbl_dummy.c,v 1.2 2014/11/13 21:43:27 christos Exp $");
3884d9c625SLionel Sambuc
3984d9c625SLionel Sambuc #include "namespace.h"
4084d9c625SLionel Sambuc #include <math.h>
4184d9c625SLionel Sambuc
__weak_alias(atan2l,_atan2l)4284d9c625SLionel Sambuc __weak_alias(atan2l, _atan2l)
4384d9c625SLionel Sambuc __weak_alias(hypotl, _hypotl)
4484d9c625SLionel Sambuc __weak_alias(logl, _logl)
4584d9c625SLionel Sambuc __weak_alias(log10l, _log10l)
4684d9c625SLionel Sambuc __weak_alias(expl, _expl)
4784d9c625SLionel Sambuc __weak_alias(exp2l, _exp2l)
4884d9c625SLionel Sambuc __weak_alias(powl, _powl)
4984d9c625SLionel Sambuc __weak_alias(cosl, _cosl)
5084d9c625SLionel Sambuc __weak_alias(sinl, _sinl)
5184d9c625SLionel Sambuc __weak_alias(tanl, _tanl)
5284d9c625SLionel Sambuc __weak_alias(coshl, _coshl)
5384d9c625SLionel Sambuc __weak_alias(sinhl, _sinhl)
5484d9c625SLionel Sambuc __weak_alias(tanhl, _tanhl)
5584d9c625SLionel Sambuc __weak_alias(acosl, _acosl)
5684d9c625SLionel Sambuc __weak_alias(asinl, _asinl)
5784d9c625SLionel Sambuc __weak_alias(atanl, _atanl)
5884d9c625SLionel Sambuc __weak_alias(acoshl, _acoshl)
5984d9c625SLionel Sambuc __weak_alias(asinhl, _asinhl)
6084d9c625SLionel Sambuc __weak_alias(atanhl, _atanhl)
61*0a6a1f1dSLionel Sambuc __weak_alias(erfl, _erfl)
62*0a6a1f1dSLionel Sambuc __weak_alias(erfcl, _erfcl)
6384d9c625SLionel Sambuc
6484d9c625SLionel Sambuc long double
6584d9c625SLionel Sambuc atan2l(long double y, long double x)
6684d9c625SLionel Sambuc {
6784d9c625SLionel Sambuc return atan2(y, x);
6884d9c625SLionel Sambuc }
6984d9c625SLionel Sambuc
7084d9c625SLionel Sambuc long double
hypotl(long double x,long double y)7184d9c625SLionel Sambuc hypotl(long double x, long double y)
7284d9c625SLionel Sambuc {
7384d9c625SLionel Sambuc return hypot(x, y);
7484d9c625SLionel Sambuc }
7584d9c625SLionel Sambuc
7684d9c625SLionel Sambuc long double
logl(long double x)7784d9c625SLionel Sambuc logl(long double x)
7884d9c625SLionel Sambuc {
7984d9c625SLionel Sambuc return log(x);
8084d9c625SLionel Sambuc }
8184d9c625SLionel Sambuc
8284d9c625SLionel Sambuc long double
log10l(long double x)8384d9c625SLionel Sambuc log10l(long double x)
8484d9c625SLionel Sambuc {
8584d9c625SLionel Sambuc return log10(x);
8684d9c625SLionel Sambuc }
8784d9c625SLionel Sambuc
8884d9c625SLionel Sambuc long double
expl(long double x)8984d9c625SLionel Sambuc expl(long double x)
9084d9c625SLionel Sambuc {
9184d9c625SLionel Sambuc return exp(x);
9284d9c625SLionel Sambuc }
9384d9c625SLionel Sambuc
9484d9c625SLionel Sambuc long double
exp2l(long double x)9584d9c625SLionel Sambuc exp2l(long double x)
9684d9c625SLionel Sambuc {
9784d9c625SLionel Sambuc return exp2(x);
9884d9c625SLionel Sambuc }
9984d9c625SLionel Sambuc
10084d9c625SLionel Sambuc long double
powl(long double x,long double y)10184d9c625SLionel Sambuc powl(long double x, long double y)
10284d9c625SLionel Sambuc {
10384d9c625SLionel Sambuc return pow(x, y);
10484d9c625SLionel Sambuc }
10584d9c625SLionel Sambuc
10684d9c625SLionel Sambuc long double
cosl(long double x)10784d9c625SLionel Sambuc cosl(long double x)
10884d9c625SLionel Sambuc {
10984d9c625SLionel Sambuc return cos(x);
11084d9c625SLionel Sambuc }
11184d9c625SLionel Sambuc
11284d9c625SLionel Sambuc long double
sinl(long double x)11384d9c625SLionel Sambuc sinl(long double x)
11484d9c625SLionel Sambuc {
11584d9c625SLionel Sambuc return sin(x);
11684d9c625SLionel Sambuc }
11784d9c625SLionel Sambuc
11884d9c625SLionel Sambuc
11984d9c625SLionel Sambuc long double
tanl(long double x)12084d9c625SLionel Sambuc tanl(long double x)
12184d9c625SLionel Sambuc {
12284d9c625SLionel Sambuc return tan(x);
12384d9c625SLionel Sambuc }
12484d9c625SLionel Sambuc
12584d9c625SLionel Sambuc long double
sinhl(long double x)12684d9c625SLionel Sambuc sinhl(long double x)
12784d9c625SLionel Sambuc {
12884d9c625SLionel Sambuc return sinh(x);
12984d9c625SLionel Sambuc }
13084d9c625SLionel Sambuc
13184d9c625SLionel Sambuc long double
coshl(long double x)13284d9c625SLionel Sambuc coshl(long double x)
13384d9c625SLionel Sambuc {
13484d9c625SLionel Sambuc return cosh(x);
13584d9c625SLionel Sambuc }
13684d9c625SLionel Sambuc
13784d9c625SLionel Sambuc long double
tanhl(long double x)13884d9c625SLionel Sambuc tanhl(long double x)
13984d9c625SLionel Sambuc {
14084d9c625SLionel Sambuc return tanh(x);
14184d9c625SLionel Sambuc }
14284d9c625SLionel Sambuc
14384d9c625SLionel Sambuc long double
acosl(long double x)14484d9c625SLionel Sambuc acosl(long double x)
14584d9c625SLionel Sambuc {
14684d9c625SLionel Sambuc return acos(x);
14784d9c625SLionel Sambuc }
14884d9c625SLionel Sambuc
14984d9c625SLionel Sambuc long double
asinl(long double x)15084d9c625SLionel Sambuc asinl(long double x)
15184d9c625SLionel Sambuc {
15284d9c625SLionel Sambuc return asin(x);
15384d9c625SLionel Sambuc }
15484d9c625SLionel Sambuc
15584d9c625SLionel Sambuc long double
atanl(long double x)15684d9c625SLionel Sambuc atanl(long double x)
15784d9c625SLionel Sambuc {
15884d9c625SLionel Sambuc return atan(x);
15984d9c625SLionel Sambuc }
16084d9c625SLionel Sambuc
16184d9c625SLionel Sambuc long double
asinhl(long double x)16284d9c625SLionel Sambuc asinhl(long double x)
16384d9c625SLionel Sambuc {
16484d9c625SLionel Sambuc return asinh(x);
16584d9c625SLionel Sambuc }
16684d9c625SLionel Sambuc
16784d9c625SLionel Sambuc long double
acoshl(long double x)16884d9c625SLionel Sambuc acoshl(long double x)
16984d9c625SLionel Sambuc {
17084d9c625SLionel Sambuc return acosh(x);
17184d9c625SLionel Sambuc }
17284d9c625SLionel Sambuc
17384d9c625SLionel Sambuc long double
atanhl(long double x)17484d9c625SLionel Sambuc atanhl(long double x)
17584d9c625SLionel Sambuc {
17684d9c625SLionel Sambuc return atanh(x);
17784d9c625SLionel Sambuc }
178*0a6a1f1dSLionel Sambuc
179*0a6a1f1dSLionel Sambuc long double
erfl(long double x)180*0a6a1f1dSLionel Sambuc erfl(long double x)
181*0a6a1f1dSLionel Sambuc {
182*0a6a1f1dSLionel Sambuc return erf(x);
183*0a6a1f1dSLionel Sambuc }
184*0a6a1f1dSLionel Sambuc
185*0a6a1f1dSLionel Sambuc long double
erfcl(long double x)186*0a6a1f1dSLionel Sambuc erfcl(long double x)
187*0a6a1f1dSLionel Sambuc {
188*0a6a1f1dSLionel Sambuc return erfc(x);
189*0a6a1f1dSLionel Sambuc }
190