Movatterモバイル変換


[0]ホーム

URL:


cppreference.com
Namespaces
Variants
    Actions

      Numerics

      From cppreference.com
      <c
       
       
       

      The C numerics library includes common mathematical functions and types, as well as support for random number generation.

      Contents

      [edit]Common mathematical functions

      The header<math.h> providesstandard C library mathematical functions such asfabs,sqrt, andsin.

      [edit]Floating-point environment

      The header<fenv.h> definesflags and functions related to exceptional floating-point state, such as overflow and division by zero.

      [edit]Pseudo-random number generation

      The header<stdlib.h> also includes C-style random number generation viasrand andrand.

      [edit]Complex number arithmetic

      The header<complex.h> provides types and functions to work withcomplex numbers.

      [edit]Type-generic math

      The header<tgmath.h> provides some macros for a function which names XXX:

      • real function:
      • float variantXXXf
      • double variantXXX
      • longdouble variantXXXl
      • complex function:
      • float variantcXXXf
      • double variantcXXX
      • longdouble variantcXXXl

      [edit]Bit manipulation(since C23)

      The header<stdbit.h> provides macros and functions to work with thebyte ordering andbyte and bit representation of C objects.

      [edit]Checked integer arithmetic(since C23)

      Provides sometype-generic macros for checked integer arithmetic:

      Defined in header<stdckdint.h>
      (C23)
      checked addition operation on two integers
      (type-generic function macro)[edit]
      (C23)
      checked subtraction operation on two integers
      (type-generic function macro)[edit]
      (C23)
      checked multiplication operation on two integers
      (type-generic function macro)[edit]

      [edit]See also

      C++ documentation forNumerics library
      Retrieved from "https://en.cppreference.com/mwiki/index.php?title=c/numeric&oldid=180191"

      [8]ページ先頭

      ©2009-2025 Movatter.jp