| 1 |
/* Copyright (C) 2015 Povilas Kanapickas <[email protected]> |
| 2 |
|
| 3 |
This file is part of cppreference-doc |
| 4 |
|
| 5 |
This work is licensed under the Creative Commons Attribution-ShareAlike 3.0 |
| 6 |
Unported License. To view a copy of this license, visit |
| 7 |
http://creativecommons.org/licenses/by-sa/3.0/ or send a letter to Creative |
| 8 |
Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. |
| 9 |
|
| 10 |
Permission is granted to copy, distribute and/or modify this document |
| 11 |
under the terms of the GNU Free Documentation License, Version 1.3 or |
| 12 |
any later version published by the Free Software Foundation; with no |
| 13 |
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. |
| 14 |
*/ |
| 15 |
|
| 16 |
#ifndef CPPREFERENCE_CMATH_H |
| 17 |
#define CPPREFERENCE_CMATH_H |
| 18 |
|
| 19 |
namespace std { |
| 20 |
|
| 21 |
#define HUGE_VAL 0 |
| 22 |
|
| 23 |
#if CPPREFERENCE_STDVER>= 2011 |
| 24 |
#define HUGE_VALF 0 |
| 25 |
#define HUGE_VALL 0 |
| 26 |
#define INFINITY 0 |
| 27 |
#define NAN 0 |
| 28 |
#define MATH_ERRNO 0 |
| 29 |
#define MATH_ERREXCEPT 0 |
| 30 |
#define math_errhandling 0 |
| 31 |
#define FP_NORMAL 0 |
| 32 |
#define FP_SUBNORMAL 0 |
| 33 |
#define FP_ZERO 0 |
| 34 |
#define FP_INFINITE 0 |
| 35 |
#define FP_NAN 0 |
| 36 |
typedef float float_t; |
| 37 |
typedef double double_t; |
| 38 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 39 |
|
| 40 |
float abs(float arg); |
| 41 |
double abs(double arg); |
| 42 |
long double abs(long double arg); |
| 43 |
float fabs(float arg); |
| 44 |
double fabs(double arg); |
| 45 |
long double fabs(long double arg); |
| 46 |
float fmod(float x, float y); |
| 47 |
double fmod(double x, double y); |
| 48 |
long double fmod(long double x, long double y); |
| 49 |
|
| 50 |
#if CPPREFERENCE_STDVER>= 2011 |
| 51 |
float remainder(float x, float y); |
| 52 |
double remainder(double x, double y); |
| 53 |
long double remainder(long double x, long double y); |
| 54 |
float remquo(float x, float y, int* quo); |
| 55 |
double remquo(double x, double y, int* quo); |
| 56 |
long double remquo(long double x, long double y, int* quo); |
| 57 |
float fma(float x, float y, float z); |
| 58 |
double fma(double x, double y, double z); |
| 59 |
long double fma(long double x, long double y, long double z); |
| 60 |
float fmax(float x, float y); |
| 61 |
double fmax(double x, double y); |
| 62 |
long double fmax(long double x, long double y); |
| 63 |
float fmin(float x, float y); |
| 64 |
double fmin(double x, double y); |
| 65 |
long double fmin(long double x, long double y); |
| 66 |
float fdim(float x, float y); |
| 67 |
double fdim(double x, double y); |
| 68 |
long double fdim(long double x, long double y); |
| 69 |
float nanf(const char* arg); |
| 70 |
double nan(const char* arg); |
| 71 |
long double nanl(const char* arg); |
| 72 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 73 |
|
| 74 |
float exp(float arg); |
| 75 |
double exp(double arg); |
| 76 |
long double exp(long double arg); |
| 77 |
|
| 78 |
#if CPPREFERENCE_STDVER>= 2011 |
| 79 |
double exp2(double n); |
| 80 |
float exp2(float n); |
| 81 |
long double exp2(long double n); |
| 82 |
float expm1(float arg); |
| 83 |
double expm1(double arg); |
| 84 |
long double expm1(long double arg); |
| 85 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 86 |
|
| 87 |
float log(float arg); |
| 88 |
double log(double arg); |
| 89 |
long double log(long double arg); |
| 90 |
float log10(float arg); |
| 91 |
double log10(double arg); |
| 92 |
long double log10(long double arg); |
| 93 |
|
| 94 |
#if CPPREFERENCE_STDVER>= 2011 |
| 95 |
float log2(float arg); |
| 96 |
double log2(double arg); |
| 97 |
long double log2(long double arg); |
| 98 |
float log1p(float arg); |
| 99 |
double log1p(double arg); |
| 100 |
long double log1p(long double arg); |
| 101 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 102 |
|
| 103 |
float pow(float base, float exp); |
| 104 |
double pow(double base, double exp); |
| 105 |
long double pow(long double base, long double exp); |
| 106 |
float pow(float base, int iexp); |
| 107 |
double pow(double base, int iexp); |
| 108 |
long double pow(long double base, int iexp); |
| 109 |
float sqrt(float arg); |
| 110 |
double sqrt(double arg); |
| 111 |
long double sqrt(long double arg); |
| 112 |
|
| 113 |
#if CPPREFERENCE_STDVER>= 2011 |
| 114 |
float cbrt(float arg); |
| 115 |
double cbrt(double arg); |
| 116 |
long double cbrt(long double arg); |
| 117 |
float hypot(float x, float y); |
| 118 |
double hypot(double x, double y); |
| 119 |
long double hypot(long double x, long double y); |
| 120 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 121 |
|
| 122 |
float sin(float arg); |
| 123 |
double sin(double arg); |
| 124 |
long double sin(long double arg); |
| 125 |
float cos(float arg); |
| 126 |
double cos(double arg); |
| 127 |
long double cos(long double arg); |
| 128 |
float tan(float arg); |
| 129 |
double tan(double arg); |
| 130 |
long double tan(long double arg); |
| 131 |
float asin(float arg); |
| 132 |
double asin(double arg); |
| 133 |
long double asin(long double arg); |
| 134 |
float acos(float arg); |
| 135 |
double acos(double arg); |
| 136 |
long double acos(long double arg); |
| 137 |
float atan(float arg); |
| 138 |
double atan(double arg); |
| 139 |
long double atan(long double arg); |
| 140 |
float atan2(float y, float x); |
| 141 |
double atan2(double y, double x); |
| 142 |
long double atan2(long double y, long double x); |
| 143 |
float sinh(float arg); |
| 144 |
double sinh(double arg); |
| 145 |
long double sinh(long double arg); |
| 146 |
float cosh(float arg); |
| 147 |
double cosh(double arg); |
| 148 |
long double cosh(long double arg); |
| 149 |
float tanh(float arg); |
| 150 |
double tanh(double arg); |
| 151 |
long double tanh(long double arg); |
| 152 |
|
| 153 |
#if CPPREFERENCE_STDVER>= 2011 |
| 154 |
float asinh(float arg); |
| 155 |
double asinh(double arg); |
| 156 |
long double asinh(long double arg); |
| 157 |
float acosh(float arg); |
| 158 |
double acosh(double arg); |
| 159 |
long double acosh(long double arg); |
| 160 |
float atanh(float arg); |
| 161 |
double atanh(double arg); |
| 162 |
long double atanh(long double arg); |
| 163 |
float erf(float arg); |
| 164 |
double erf(double arg); |
| 165 |
long double erf(long double arg); |
| 166 |
float erfc(float arg); |
| 167 |
double erfc(double arg); |
| 168 |
long double erfc(long double arg); |
| 169 |
float tgamma(float arg); |
| 170 |
double tgamma(double arg); |
| 171 |
long double tgamma(long double arg); |
| 172 |
float lgamma(float arg); |
| 173 |
double lgamma(double arg); |
| 174 |
long double lgamma(long double arg); |
| 175 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 176 |
|
| 177 |
float ceil(float arg); |
| 178 |
double ceil(double arg); |
| 179 |
long double ceil(long double arg); |
| 180 |
float floor(float arg); |
| 181 |
double floor(double arg); |
| 182 |
long double floor(long double arg); |
| 183 |
float trunc(float arg); |
| 184 |
double trunc(double arg); |
| 185 |
long double trunc(long double arg); |
| 186 |
|
| 187 |
#if CPPREFERENCE_STDVER>= 2011 |
| 188 |
float round(float arg); |
| 189 |
double round(double arg); |
| 190 |
long double round(long double arg); |
| 191 |
long lround(float arg); |
| 192 |
long lround(double arg); |
| 193 |
long lround(long double arg); |
| 194 |
long long llround(float arg); |
| 195 |
long long llround(double arg); |
| 196 |
long long llround(long double arg); |
| 197 |
float nearbyint(float arg); |
| 198 |
double nearbyint(double arg); |
| 199 |
long double nearbyint(long double arg); |
| 200 |
|
| 201 |
float rint(float arg); |
| 202 |
double rint(double arg); |
| 203 |
long double rint(long double arg); |
| 204 |
long lrint(float arg); |
| 205 |
long lrint(double arg); |
| 206 |
long lrint(long double arg); |
| 207 |
long long llrint(float arg); |
| 208 |
long long llrint(double arg); |
| 209 |
long long llrint(long double arg); |
| 210 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 211 |
|
| 212 |
float frexp(float arg, int* exp); |
| 213 |
double frexp(double arg, int* exp); |
| 214 |
long double frexp(long double arg, int* exp); |
| 215 |
|
| 216 |
float ldexp(float x, int exp); |
| 217 |
double ldexp(double x, int exp); |
| 218 |
long double ldexp(long double x, int exp); |
| 219 |
|
| 220 |
float modf(float x, float* iptr); |
| 221 |
double modf(double x, double* iptr); |
| 222 |
long double modf(long double x, long double* iptr); |
| 223 |
|
| 224 |
#if CPPREFERENCE_STDVER>= 2011 |
| 225 |
float scalbn(float x, int exp); |
| 226 |
double scalbn(double x, int exp); |
| 227 |
long double scalbn(long double x, int exp); |
| 228 |
float scalbln(float x, long exp); |
| 229 |
double scalbln(double x, long exp); |
| 230 |
long double scalbln(long double x, long exp); |
| 231 |
|
| 232 |
int ilogb(float arg); |
| 233 |
int ilogb(double arg); |
| 234 |
int ilogb(long double arg); |
| 235 |
|
| 236 |
float logb(float arg); |
| 237 |
double logb(double arg); |
| 238 |
long double logb(long double arg); |
| 239 |
|
| 240 |
float nextafter(float from, float to); |
| 241 |
double nextafter(double from, double to); |
| 242 |
long double nextafter(long double from, long double to); |
| 243 |
float nexttoward(float from, long double to); |
| 244 |
double nexttoward(double from, long double to); |
| 245 |
long double nexttoward(long double from, long double to); |
| 246 |
|
| 247 |
float copysign(float x, float y); |
| 248 |
double copysign(double x, double y); |
| 249 |
long double copysign(long double x, long double y); |
| 250 |
|
| 251 |
int fpclassify(float arg); |
| 252 |
int fpclassify(double arg); |
| 253 |
int fpclassify(long double arg); |
| 254 |
|
| 255 |
bool isfinite(float arg); |
| 256 |
bool isfinite(double arg); |
| 257 |
bool isfinite(long double arg); |
| 258 |
|
| 259 |
bool isinf(float arg); |
| 260 |
bool isinf(double arg); |
| 261 |
bool isinf(long double arg); |
| 262 |
|
| 263 |
bool isnan(float arg); |
| 264 |
bool isnan(double arg); |
| 265 |
bool isnan(long double arg); |
| 266 |
|
| 267 |
bool isnormal(float arg); |
| 268 |
bool isnormal(double arg); |
| 269 |
bool isnormal(long double arg); |
| 270 |
|
| 271 |
bool signbit(float arg); |
| 272 |
bool signbit(double arg); |
| 273 |
bool signbit(long double arg); |
| 274 |
|
| 275 |
bool isgreater(float x, float y); |
| 276 |
bool isgreater(double x, double y); |
| 277 |
bool isgreater(long double x, long double y); |
| 278 |
|
| 279 |
bool isgreaterequal(float x, float y); |
| 280 |
bool isgreaterequal(double x, double y); |
| 281 |
bool isgreaterequal(long double x, long double y); |
| 282 |
|
| 283 |
bool isless(float x, float y); |
| 284 |
bool isless(double x, double y); |
| 285 |
bool isless(long double x, long double y); |
| 286 |
|
| 287 |
bool islessequal(float x, float y); |
| 288 |
bool islessequal(double x, double y); |
| 289 |
bool islessequal(long double x, long double y); |
| 290 |
|
| 291 |
bool islessgreater(float x, float y); |
| 292 |
bool islessgreater(double x, double y); |
| 293 |
bool islessgreater(long double x, long double y); |
| 294 |
|
| 295 |
bool isunordered(float x, float y); |
| 296 |
bool isunordered(double x, double y); |
| 297 |
bool isunordered(long double x, long double y); |
| 298 |
#endif // CPPREFERENCE_STDVER>= 2011 |
| 299 |
} // namespace std |
| 300 |
|
| 301 |
#endif // CPPREFERENCE_CMATH_H |