tmp/tmpqdf0_ovk/{from.md → to.md}
RENAMED
|
@@ -209,11 +209,11 @@ namespace std {
|
|
| 209 |
float fabsf(float x);
|
| 210 |
long double fabsl(long double x);
|
| 211 |
|
| 212 |
float hypot(float x, float y); // see [library.c]
|
| 213 |
double hypot(double x, double y);
|
| 214 |
-
long double hypot(double x, double y); // see [library.c]
|
| 215 |
float hypotf(float x, float y);
|
| 216 |
long double hypotl(long double x, long double y);
|
| 217 |
|
| 218 |
// [c.math.hypot3], three-dimensional hypotenuse
|
| 219 |
float hypot(float x, float y, float z);
|
|
@@ -378,123 +378,128 @@ namespace std {
|
|
| 378 |
double fma(double x, double y, double z);
|
| 379 |
long double fma(long double x, long double y, long double z); // see [library.c]
|
| 380 |
float fmaf(float x, float y, float z);
|
| 381 |
long double fmal(long double x, long double y, long double z);
|
| 382 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 383 |
// [c.math.fpclass], classification / comparison functions
|
| 384 |
int fpclassify(float x);
|
| 385 |
int fpclassify(double x);
|
| 386 |
int fpclassify(long double x);
|
| 387 |
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
|
| 396 |
-
|
| 397 |
-
|
| 398 |
-
|
| 399 |
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
|
| 432 |
// [sf.cmath], mathematical special functions
|
| 433 |
|
| 434 |
-
// [sf.cmath.
|
| 435 |
double assoc_laguerre(unsigned n, unsigned m, double x);
|
| 436 |
float assoc_laguerref(unsigned n, unsigned m, float x);
|
| 437 |
long double assoc_laguerrel(unsigned n, unsigned m, long double x);
|
| 438 |
|
| 439 |
-
// [sf.cmath.
|
| 440 |
double assoc_legendre(unsigned l, unsigned m, double x);
|
| 441 |
float assoc_legendref(unsigned l, unsigned m, float x);
|
| 442 |
long double assoc_legendrel(unsigned l, unsigned m, long double x);
|
| 443 |
|
| 444 |
// [sf.cmath.beta], beta function
|
| 445 |
double beta(double x, double y);
|
| 446 |
float betaf(float x, float y);
|
| 447 |
long double betal(long double x, long double y);
|
| 448 |
|
| 449 |
-
// [sf.cmath.
|
| 450 |
double comp_ellint_1(double k);
|
| 451 |
float comp_ellint_1f(float k);
|
| 452 |
long double comp_ellint_1l(long double k);
|
| 453 |
|
| 454 |
-
// [sf.cmath.
|
| 455 |
double comp_ellint_2(double k);
|
| 456 |
float comp_ellint_2f(float k);
|
| 457 |
long double comp_ellint_2l(long double k);
|
| 458 |
|
| 459 |
-
// [sf.cmath.
|
| 460 |
double comp_ellint_3(double k, double nu);
|
| 461 |
float comp_ellint_3f(float k, float nu);
|
| 462 |
long double comp_ellint_3l(long double k, long double nu);
|
| 463 |
|
| 464 |
-
// [sf.cmath.
|
| 465 |
double cyl_bessel_i(double nu, double x);
|
| 466 |
float cyl_bessel_if(float nu, float x);
|
| 467 |
long double cyl_bessel_il(long double nu, long double x);
|
| 468 |
|
| 469 |
-
// [sf.cmath.
|
| 470 |
double cyl_bessel_j(double nu, double x);
|
| 471 |
float cyl_bessel_jf(float nu, float x);
|
| 472 |
long double cyl_bessel_jl(long double nu, long double x);
|
| 473 |
|
| 474 |
-
// [sf.cmath.
|
| 475 |
double cyl_bessel_k(double nu, double x);
|
| 476 |
float cyl_bessel_kf(float nu, float x);
|
| 477 |
long double cyl_bessel_kl(long double nu, long double x);
|
| 478 |
|
| 479 |
-
// [sf.cmath.
|
| 480 |
// cylindrical Bessel functions of the second kind
|
| 481 |
double cyl_neumann(double nu, double x);
|
| 482 |
float cyl_neumannf(float nu, float x);
|
| 483 |
long double cyl_neumannl(long double nu, long double x);
|
| 484 |
|
| 485 |
-
// [sf.cmath.
|
| 486 |
double ellint_1(double k, double phi);
|
| 487 |
float ellint_1f(float k, float phi);
|
| 488 |
long double ellint_1l(long double k, long double phi);
|
| 489 |
|
| 490 |
-
// [sf.cmath.
|
| 491 |
double ellint_2(double k, double phi);
|
| 492 |
float ellint_2f(float k, float phi);
|
| 493 |
long double ellint_2l(long double k, long double phi);
|
| 494 |
|
| 495 |
-
// [sf.cmath.
|
| 496 |
double ellint_3(double k, double nu, double phi);
|
| 497 |
float ellint_3f(float k, float nu, float phi);
|
| 498 |
long double ellint_3l(long double k, long double nu, long double phi);
|
| 499 |
|
| 500 |
// [sf.cmath.expint], exponential integral
|
|
@@ -515,27 +520,27 @@ namespace std {
|
|
| 515 |
// [sf.cmath.legendre], Legendre polynomials
|
| 516 |
double legendre(unsigned l, double x);
|
| 517 |
float legendref(unsigned l, float x);
|
| 518 |
long double legendrel(unsigned l, long double x);
|
| 519 |
|
| 520 |
-
// [sf.cmath.
|
| 521 |
double riemann_zeta(double x);
|
| 522 |
float riemann_zetaf(float x);
|
| 523 |
long double riemann_zetal(long double x);
|
| 524 |
|
| 525 |
-
// [sf.cmath.
|
| 526 |
double sph_bessel(unsigned n, double x);
|
| 527 |
float sph_besself(unsigned n, float x);
|
| 528 |
long double sph_bessell(unsigned n, long double x);
|
| 529 |
|
| 530 |
-
// [sf.cmath.
|
| 531 |
double sph_legendre(unsigned l, unsigned m, double theta);
|
| 532 |
float sph_legendref(unsigned l, unsigned m, float theta);
|
| 533 |
long double sph_legendrel(unsigned l, unsigned m, long double theta);
|
| 534 |
|
| 535 |
-
// [sf.cmath.
|
| 536 |
-
// spherical Bessel functions of the second kind
|
| 537 |
double sph_neumann(unsigned n, double x);
|
| 538 |
float sph_neumannf(unsigned n, float x);
|
| 539 |
long double sph_neumannl(unsigned n, long double x);
|
| 540 |
}
|
| 541 |
```
|
|
@@ -544,28 +549,28 @@ The contents and meaning of the header `<cmath>` are the same as the C
|
|
| 544 |
standard library header `<math.h>`, with the addition of a
|
| 545 |
three-dimensional hypotenuse function ([[c.math.hypot3]]) and the
|
| 546 |
mathematical special functions described in [[sf.cmath]].
|
| 547 |
|
| 548 |
[*Note 1*: Several functions have additional overloads in this
|
| 549 |
-
|
| 550 |
-
|
| 551 |
|
| 552 |
For each set of overloaded functions within `<cmath>`, with the
|
| 553 |
exception of `abs`, there shall be additional overloads sufficient to
|
| 554 |
ensure:
|
| 555 |
|
| 556 |
-
|
| 557 |
parameter has type `long double`, then all arguments of arithmetic
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
`double` parameter has type `double` or an integer type, then all
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
|
| 567 |
-
[*Note
|
| 568 |
compatible with C. — *end note*]
|
| 569 |
|
| 570 |
ISO C 7.12
|
| 571 |
|
|
|
|
| 209 |
float fabsf(float x);
|
| 210 |
long double fabsl(long double x);
|
| 211 |
|
| 212 |
float hypot(float x, float y); // see [library.c]
|
| 213 |
double hypot(double x, double y);
|
| 214 |
+
long double hypot(long double x, long double y); // see [library.c]
|
| 215 |
float hypotf(float x, float y);
|
| 216 |
long double hypotl(long double x, long double y);
|
| 217 |
|
| 218 |
// [c.math.hypot3], three-dimensional hypotenuse
|
| 219 |
float hypot(float x, float y, float z);
|
|
|
|
| 378 |
double fma(double x, double y, double z);
|
| 379 |
long double fma(long double x, long double y, long double z); // see [library.c]
|
| 380 |
float fmaf(float x, float y, float z);
|
| 381 |
long double fmal(long double x, long double y, long double z);
|
| 382 |
|
| 383 |
+
// [c.math.lerp], linear interpolation
|
| 384 |
+
constexpr float lerp(float a, float b, float t) noexcept;
|
| 385 |
+
constexpr double lerp(double a, double b, double t) noexcept;
|
| 386 |
+
constexpr long double lerp(long double a, long double b, long double t) noexcept;
|
| 387 |
+
|
| 388 |
// [c.math.fpclass], classification / comparison functions
|
| 389 |
int fpclassify(float x);
|
| 390 |
int fpclassify(double x);
|
| 391 |
int fpclassify(long double x);
|
| 392 |
|
| 393 |
+
bool isfinite(float x);
|
| 394 |
+
bool isfinite(double x);
|
| 395 |
+
bool isfinite(long double x);
|
| 396 |
|
| 397 |
+
bool isinf(float x);
|
| 398 |
+
bool isinf(double x);
|
| 399 |
+
bool isinf(long double x);
|
| 400 |
|
| 401 |
+
bool isnan(float x);
|
| 402 |
+
bool isnan(double x);
|
| 403 |
+
bool isnan(long double x);
|
| 404 |
|
| 405 |
+
bool isnormal(float x);
|
| 406 |
+
bool isnormal(double x);
|
| 407 |
+
bool isnormal(long double x);
|
| 408 |
|
| 409 |
+
bool signbit(float x);
|
| 410 |
+
bool signbit(double x);
|
| 411 |
+
bool signbit(long double x);
|
| 412 |
|
| 413 |
+
bool isgreater(float x, float y);
|
| 414 |
+
bool isgreater(double x, double y);
|
| 415 |
+
bool isgreater(long double x, long double y);
|
| 416 |
|
| 417 |
+
bool isgreaterequal(float x, float y);
|
| 418 |
+
bool isgreaterequal(double x, double y);
|
| 419 |
+
bool isgreaterequal(long double x, long double y);
|
| 420 |
|
| 421 |
+
bool isless(float x, float y);
|
| 422 |
+
bool isless(double x, double y);
|
| 423 |
+
bool isless(long double x, long double y);
|
| 424 |
|
| 425 |
+
bool islessequal(float x, float y);
|
| 426 |
+
bool islessequal(double x, double y);
|
| 427 |
+
bool islessequal(long double x, long double y);
|
| 428 |
|
| 429 |
+
bool islessgreater(float x, float y);
|
| 430 |
+
bool islessgreater(double x, double y);
|
| 431 |
+
bool islessgreater(long double x, long double y);
|
| 432 |
|
| 433 |
+
bool isunordered(float x, float y);
|
| 434 |
+
bool isunordered(double x, double y);
|
| 435 |
+
bool isunordered(long double x, long double y);
|
| 436 |
|
| 437 |
// [sf.cmath], mathematical special functions
|
| 438 |
|
| 439 |
+
// [sf.cmath.assoc.laguerre], associated Laguerre polynomials
|
| 440 |
double assoc_laguerre(unsigned n, unsigned m, double x);
|
| 441 |
float assoc_laguerref(unsigned n, unsigned m, float x);
|
| 442 |
long double assoc_laguerrel(unsigned n, unsigned m, long double x);
|
| 443 |
|
| 444 |
+
// [sf.cmath.assoc.legendre], associated Legendre functions
|
| 445 |
double assoc_legendre(unsigned l, unsigned m, double x);
|
| 446 |
float assoc_legendref(unsigned l, unsigned m, float x);
|
| 447 |
long double assoc_legendrel(unsigned l, unsigned m, long double x);
|
| 448 |
|
| 449 |
// [sf.cmath.beta], beta function
|
| 450 |
double beta(double x, double y);
|
| 451 |
float betaf(float x, float y);
|
| 452 |
long double betal(long double x, long double y);
|
| 453 |
|
| 454 |
+
// [sf.cmath.comp.ellint.1], complete elliptic integral of the first kind
|
| 455 |
double comp_ellint_1(double k);
|
| 456 |
float comp_ellint_1f(float k);
|
| 457 |
long double comp_ellint_1l(long double k);
|
| 458 |
|
| 459 |
+
// [sf.cmath.comp.ellint.2], complete elliptic integral of the second kind
|
| 460 |
double comp_ellint_2(double k);
|
| 461 |
float comp_ellint_2f(float k);
|
| 462 |
long double comp_ellint_2l(long double k);
|
| 463 |
|
| 464 |
+
// [sf.cmath.comp.ellint.3], complete elliptic integral of the third kind
|
| 465 |
double comp_ellint_3(double k, double nu);
|
| 466 |
float comp_ellint_3f(float k, float nu);
|
| 467 |
long double comp_ellint_3l(long double k, long double nu);
|
| 468 |
|
| 469 |
+
// [sf.cmath.cyl.bessel.i], regular modified cylindrical Bessel functions
|
| 470 |
double cyl_bessel_i(double nu, double x);
|
| 471 |
float cyl_bessel_if(float nu, float x);
|
| 472 |
long double cyl_bessel_il(long double nu, long double x);
|
| 473 |
|
| 474 |
+
// [sf.cmath.cyl.bessel.j], cylindrical Bessel functions of the first kind
|
| 475 |
double cyl_bessel_j(double nu, double x);
|
| 476 |
float cyl_bessel_jf(float nu, float x);
|
| 477 |
long double cyl_bessel_jl(long double nu, long double x);
|
| 478 |
|
| 479 |
+
// [sf.cmath.cyl.bessel.k], irregular modified cylindrical Bessel functions
|
| 480 |
double cyl_bessel_k(double nu, double x);
|
| 481 |
float cyl_bessel_kf(float nu, float x);
|
| 482 |
long double cyl_bessel_kl(long double nu, long double x);
|
| 483 |
|
| 484 |
+
// [sf.cmath.cyl.neumann], cylindrical Neumann functions;
|
| 485 |
// cylindrical Bessel functions of the second kind
|
| 486 |
double cyl_neumann(double nu, double x);
|
| 487 |
float cyl_neumannf(float nu, float x);
|
| 488 |
long double cyl_neumannl(long double nu, long double x);
|
| 489 |
|
| 490 |
+
// [sf.cmath.ellint.1], incomplete elliptic integral of the first kind
|
| 491 |
double ellint_1(double k, double phi);
|
| 492 |
float ellint_1f(float k, float phi);
|
| 493 |
long double ellint_1l(long double k, long double phi);
|
| 494 |
|
| 495 |
+
// [sf.cmath.ellint.2], incomplete elliptic integral of the second kind
|
| 496 |
double ellint_2(double k, double phi);
|
| 497 |
float ellint_2f(float k, float phi);
|
| 498 |
long double ellint_2l(long double k, long double phi);
|
| 499 |
|
| 500 |
+
// [sf.cmath.ellint.3], incomplete elliptic integral of the third kind
|
| 501 |
double ellint_3(double k, double nu, double phi);
|
| 502 |
float ellint_3f(float k, float nu, float phi);
|
| 503 |
long double ellint_3l(long double k, long double nu, long double phi);
|
| 504 |
|
| 505 |
// [sf.cmath.expint], exponential integral
|
|
|
|
| 520 |
// [sf.cmath.legendre], Legendre polynomials
|
| 521 |
double legendre(unsigned l, double x);
|
| 522 |
float legendref(unsigned l, float x);
|
| 523 |
long double legendrel(unsigned l, long double x);
|
| 524 |
|
| 525 |
+
// [sf.cmath.riemann.zeta], Riemann zeta function
|
| 526 |
double riemann_zeta(double x);
|
| 527 |
float riemann_zetaf(float x);
|
| 528 |
long double riemann_zetal(long double x);
|
| 529 |
|
| 530 |
+
// [sf.cmath.sph.bessel], spherical Bessel functions of the first kind
|
| 531 |
double sph_bessel(unsigned n, double x);
|
| 532 |
float sph_besself(unsigned n, float x);
|
| 533 |
long double sph_bessell(unsigned n, long double x);
|
| 534 |
|
| 535 |
+
// [sf.cmath.sph.legendre], spherical associated Legendre functions
|
| 536 |
double sph_legendre(unsigned l, unsigned m, double theta);
|
| 537 |
float sph_legendref(unsigned l, unsigned m, float theta);
|
| 538 |
long double sph_legendrel(unsigned l, unsigned m, long double theta);
|
| 539 |
|
| 540 |
+
// [sf.cmath.sph.neumann], spherical Neumann functions;
|
| 541 |
+
// spherical Bessel functions of the second kind
|
| 542 |
double sph_neumann(unsigned n, double x);
|
| 543 |
float sph_neumannf(unsigned n, float x);
|
| 544 |
long double sph_neumannl(unsigned n, long double x);
|
| 545 |
}
|
| 546 |
```
|
|
|
|
| 549 |
standard library header `<math.h>`, with the addition of a
|
| 550 |
three-dimensional hypotenuse function ([[c.math.hypot3]]) and the
|
| 551 |
mathematical special functions described in [[sf.cmath]].
|
| 552 |
|
| 553 |
[*Note 1*: Several functions have additional overloads in this
|
| 554 |
+
document, but they have the same behavior as in the C standard library
|
| 555 |
+
[[library.c]]. — *end note*]
|
| 556 |
|
| 557 |
For each set of overloaded functions within `<cmath>`, with the
|
| 558 |
exception of `abs`, there shall be additional overloads sufficient to
|
| 559 |
ensure:
|
| 560 |
|
| 561 |
+
- If any argument of arithmetic type corresponding to a `double`
|
| 562 |
parameter has type `long double`, then all arguments of arithmetic
|
| 563 |
+
type [[basic.fundamental]] corresponding to `double` parameters are
|
| 564 |
+
effectively cast to `long double`.
|
| 565 |
+
- Otherwise, if any argument of arithmetic type corresponding to a
|
| 566 |
`double` parameter has type `double` or an integer type, then all
|
| 567 |
+
arguments of arithmetic type corresponding to `double` parameters are
|
| 568 |
+
effectively cast to `double`.
|
| 569 |
+
- \[*Note 2*: Otherwise, all arguments of arithmetic type corresponding
|
| 570 |
+
to `double` parameters have type `float`. — *end note*]
|
| 571 |
|
| 572 |
+
[*Note 3*: `abs` is exempted from these rules in order to stay
|
| 573 |
compatible with C. — *end note*]
|
| 574 |
|
| 575 |
ISO C 7.12
|
| 576 |
|