1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10module; 11#include <cmath> 12 13export module std:cmath; 14export namespace std { 15 16 using std::double_t; 17 using std::float_t; 18 19 using std::acos; 20 using std::acosf; 21 using std::acosl; 22 23 using std::asin; 24 using std::asinf; 25 using std::asinl; 26 27 using std::atan; 28 using std::atanf; 29 using std::atanl; 30 31 using std::atan2; 32 using std::atan2f; 33 using std::atan2l; 34 35 using std::cos; 36 using std::cosf; 37 using std::cosl; 38 39 using std::sin; 40 using std::sinf; 41 using std::sinl; 42 43 using std::tan; 44 using std::tanf; 45 using std::tanl; 46 47 using std::acosh; 48 using std::acoshf; 49 using std::acoshl; 50 51 using std::asinh; 52 using std::asinhf; 53 using std::asinhl; 54 55 using std::atanh; 56 using std::atanhf; 57 using std::atanhl; 58 59 using std::cosh; 60 using std::coshf; 61 using std::coshl; 62 63 using std::sinh; 64 using std::sinhf; 65 using std::sinhl; 66 67 using std::tanh; 68 using std::tanhf; 69 using std::tanhl; 70 71 using std::exp; 72 using std::expf; 73 using std::expl; 74 75 using std::exp2; 76 using std::exp2f; 77 using std::exp2l; 78 79 using std::expm1; 80 using std::expm1f; 81 using std::expm1l; 82 83 using std::frexp; 84 using std::frexpf; 85 using std::frexpl; 86 87 using std::ilogb; 88 using std::ilogbf; 89 using std::ilogbl; 90 91 using std::ldexp; 92 using std::ldexpf; 93 using std::ldexpl; 94 95 using std::log; 96 using std::logf; 97 using std::logl; 98 99 using std::log10; 100 using std::log10f; 101 using std::log10l; 102 103 using std::log1p; 104 using std::log1pf; 105 using std::log1pl; 106 107 using std::log2; 108 using std::log2f; 109 using std::log2l; 110 111 using std::logb; 112 using std::logbf; 113 using std::logbl; 114 115 using std::modf; 116 using std::modff; 117 using std::modfl; 118 119 using std::scalbn; 120 using std::scalbnf; 121 using std::scalbnl; 122 123 using std::scalbln; 124 using std::scalblnf; 125 using std::scalblnl; 126 127 using std::cbrt; 128 using std::cbrtf; 129 using std::cbrtl; 130 131 // [c.math.abs], absolute values 132 using std::abs; 133 134 using std::fabs; 135 using std::fabsf; 136 using std::fabsl; 137 138 using std::hypot; 139 using std::hypotf; 140 using std::hypotl; 141 142 // [c.math.hypot3], three-dimensional hypotenuse 143 using std::hypot; 144 145 using std::pow; 146 using std::powf; 147 using std::powl; 148 149 using std::sqrt; 150 using std::sqrtf; 151 using std::sqrtl; 152 153 using std::erf; 154 using std::erff; 155 using std::erfl; 156 157 using std::erfc; 158 using std::erfcf; 159 using std::erfcl; 160 161 using std::lgamma; 162 using std::lgammaf; 163 using std::lgammal; 164 165 using std::tgamma; 166 using std::tgammaf; 167 using std::tgammal; 168 169 using std::ceil; 170 using std::ceilf; 171 using std::ceill; 172 173 using std::floor; 174 using std::floorf; 175 using std::floorl; 176 177 using std::nearbyint; 178 using std::nearbyintf; 179 using std::nearbyintl; 180 181 using std::rint; 182 using std::rintf; 183 using std::rintl; 184 185 using std::lrint; 186 using std::lrintf; 187 using std::lrintl; 188 189 using std::llrint; 190 using std::llrintf; 191 using std::llrintl; 192 193 using std::round; 194 using std::roundf; 195 using std::roundl; 196 197 using std::lround; 198 using std::lroundf; 199 using std::lroundl; 200 201 using std::llround; 202 using std::llroundf; 203 using std::llroundl; 204 205 using std::trunc; 206 using std::truncf; 207 using std::truncl; 208 209 using std::fmod; 210 using std::fmodf; 211 using std::fmodl; 212 213 using std::remainder; 214 using std::remainderf; 215 using std::remainderl; 216 217 using std::remquo; 218 using std::remquof; 219 using std::remquol; 220 221 using std::copysign; 222 using std::copysignf; 223 using std::copysignl; 224 225 using std::nan; 226 using std::nanf; 227 using std::nanl; 228 229 using std::nextafter; 230 using std::nextafterf; 231 using std::nextafterl; 232 233 using std::nexttoward; 234 using std::nexttowardf; 235 using std::nexttowardl; 236 237 using std::fdim; 238 using std::fdimf; 239 using std::fdiml; 240 241 using std::fmax; 242 using std::fmaxf; 243 using std::fmaxl; 244 245 using std::fmin; 246 using std::fminf; 247 using std::fminl; 248 249 using std::fma; 250 using std::fmaf; 251 using std::fmal; 252 253 // [c.math.lerp], linear interpolation 254 using std::lerp; 255 256 // [c.math.fpclass], classification / comparison functions 257 using std::fpclassify; 258 using std::isfinite; 259 using std::isgreater; 260 using std::isgreaterequal; 261 using std::isinf; 262 using std::isless; 263 using std::islessequal; 264 using std::islessgreater; 265 using std::isnan; 266 using std::isnormal; 267 using std::isunordered; 268 using std::signbit; 269 270 // [sf.cmath], mathematical special functions 271#if 0 272 // [sf.cmath.assoc.laguerre], associated Laguerre polynomials 273 using std::assoc_laguerre; 274 using std::assoc_laguerref; 275 using std::assoc_laguerrel; 276 277 // [sf.cmath.assoc.legendre], associated Legendre functions 278 using std::assoc_legendre; 279 using std::assoc_legendref; 280 using std::assoc_legendrel; 281 282 // [sf.cmath.beta], beta function 283 using std::beta; 284 using std::betaf; 285 using std::betal; 286 287 // [sf.cmath.comp.ellint.1], complete elliptic integral of the first kind 288 using std::comp_ellint_1; 289 using std::comp_ellint_1f; 290 using std::comp_ellint_1l; 291 292 // [sf.cmath.comp.ellint.2], complete elliptic integral of the second kind 293 using std::comp_ellint_2; 294 using std::comp_ellint_2f; 295 using std::comp_ellint_2l; 296 297 // [sf.cmath.comp.ellint.3], complete elliptic integral of the third kind 298 using std::comp_ellint_3; 299 using std::comp_ellint_3f; 300 using std::comp_ellint_3l; 301 302 // [sf.cmath.cyl.bessel.i], regular modified cylindrical Bessel functions 303 using std::cyl_bessel_i; 304 using std::cyl_bessel_if; 305 using std::cyl_bessel_il; 306 307 // [sf.cmath.cyl.bessel.j], cylindrical Bessel functions of the first kind 308 using std::cyl_bessel_j; 309 using std::cyl_bessel_jf; 310 using std::cyl_bessel_jl; 311 312 // [sf.cmath.cyl.bessel.k], irregular modified cylindrical Bessel functions 313 using std::cyl_bessel_k; 314 using std::cyl_bessel_kf; 315 using std::cyl_bessel_kl; 316 317 // [sf.cmath.cyl.neumann], cylindrical Neumann functions 318 // cylindrical Bessel functions of the second kind 319 using std::cyl_neumann; 320 using std::cyl_neumannf; 321 using std::cyl_neumannl; 322 323 // [sf.cmath.ellint.1], incomplete elliptic integral of the first kind 324 using std::ellint_1; 325 using std::ellint_1f; 326 using std::ellint_1l; 327 328 // [sf.cmath.ellint.2], incomplete elliptic integral of the second kind 329 using std::ellint_2; 330 using std::ellint_2f; 331 using std::ellint_2l; 332 333 // [sf.cmath.ellint.3], incomplete elliptic integral of the third kind 334 using std::ellint_3; 335 using std::ellint_3f; 336 using std::ellint_3l; 337 338 // [sf.cmath.expint], exponential integral 339 using std::expint; 340 using std::expintf; 341 using std::expintl; 342 343 // [sf.cmath.hermite], Hermite polynomials 344 using std::hermite; 345 using std::hermitef; 346 using std::hermitel; 347 348 // [sf.cmath.laguerre], Laguerre polynomials 349 using std::laguerre; 350 using std::laguerref; 351 using std::laguerrel; 352 353 // [sf.cmath.legendre], Legendre polynomials 354 using std::legendre; 355 using std::legendref; 356 using std::legendrel; 357 358 // [sf.cmath.riemann.zeta], Riemann zeta function 359 using std::riemann_zeta; 360 using std::riemann_zetaf; 361 using std::riemann_zetal; 362 363 // [sf.cmath.sph.bessel], spherical Bessel functions of the first kind 364 using std::sph_bessel; 365 using std::sph_besself; 366 using std::sph_bessell; 367 368 // [sf.cmath.sph.legendre], spherical associated Legendre functions 369 using std::sph_legendre; 370 using std::sph_legendref; 371 using std::sph_legendrel; 372 373 // [sf.cmath.sph.neumann], spherical Neumann functions; 374 // spherical Bessel functions of the second kind 375 using std::sph_neumann; 376 using std::sph_neumannf; 377 using std::sph_neumannl; 378#endif 379} // namespace std 380