Serenity Operating System
1/*
2 * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright notice, this
9 * list of conditions and the following disclaimer.
10 *
11 * 2. Redistributions in binary form must reproduce the above copyright notice,
12 * this list of conditions and the following disclaimer in the documentation
13 * and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26
27#pragma once
28
29#include <sys/cdefs.h>
30
31__BEGIN_DECLS
32
33#define HUGE_VAL 1e10000
34#define M_E 2.718281828459045
35#define M_PI 3.141592653589793
36#define M_PI_2 (M_PI / 2)
37#define M_TAU (M_PI * 2)
38#define M_LN2 0.69314718055995
39#define M_LN10 2.30258509299405
40
41double acos(double);
42float acosf(float);
43double asin(double);
44float asinf(float);
45double atan(double);
46float atanf(float);
47double atan2(double, double);
48float atan2f(float, float);
49double cos(double);
50float cosf(float);
51double cosh(double);
52float coshf(float);
53double sin(double);
54float sinf(float);
55double sinh(double);
56float sinhf(float);
57double tan(double);
58float tanf(float);
59double tanh(double);
60float tanhf(float);
61double ceil(double);
62float ceilf(float);
63double floor(double);
64float floorf(float);
65double round(double);
66float roundf(float);
67double fabs(double);
68float fabsf(float);
69double fmod(double, double);
70float fmodf(float, float);
71double exp(double);
72float expf(float);
73double frexp(double, int* exp);
74float frexpf(float, int* exp);
75double log(double);
76float logf(float);
77double log10(double);
78float log10f(float);
79double sqrt(double);
80float sqrtf(float);
81double modf(double, double*);
82float modff(float, float*);
83double ldexp(double, int exp);
84float ldexpf(float, int exp);
85
86double pow(double x, double y);
87
88double log2(double);
89float log2f(float);
90long double log2l(long double);
91double frexp(double, int*);
92float frexpf(float, int*);
93long double frexpl(long double, int*);
94
95__END_DECLS