Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0613· OpenAIAi2 WildChat-4.8M (AI2)

I need list of 200 math.h functions (C/C++) that you know with short description for each

  1. User

    I need list of 200 math.h functions (C/C++) that you know with short description for each

  2. Assistant

    Here is a list of 200 Math.h functions commonly used in C/C++ along with a short description for each:

    1. abs(): Returns the absolute value of an integer value.
    2. fabs(): Returns the absolute value of a floating-point value.
    3. sqrt(): Returns the square root of a value.
    4. cbrt(): Returns the cube root of a value.
    5. pow(): Returns a value raised to a given power.
    6. exp(): Returns the exponential value of a number.
    7. log(): Returns the natural logarithm (base-e logarithm) of a number.
    8. log10(): Returns the base-10 logarithm of a number.
    9. sin(): Returns the sine of an angle in radians.
    10. cos(): Returns the cosine of an angle in radians.
    11. tan(): Returns the tangent of an angle in radians.
    12. asin(): Returns the arcsine of a value in the range of -1 to 1.
    13. acos(): Returns the arccosine of a value in the range of -1 to 1.
    14. atan(): Returns the arctangent of a value.
    15. atan2(): Returns the arctangent of the quotient of two given numbers.
    16. sinh(): Returns the hyperbolic sine of a value.
    17. cosh(): Returns the hyperbolic cosine of a value.
    18. tanh(): Returns the hyperbolic tangent of a value.
    19. ceil(): Returns the smallest integer value greater than or equal to a given value.
    20. floor(): Returns the largest integer value less than or equal to a given value.
    21. round(): Returns the value rounded to the nearest integer.
    22. trunc(): Returns the integer part of a given value, discarding the fractional part.
    23. fmod(): Returns the remainder of a division operation.
    24. remainder(): Returns the remainder of a division operation with the same sign as the dividend.
    25. fmax(): Returns the maximum value between two given values.
    26. fmin(): Returns the minimum value between two given values.
    27. fma(): Returns the result of multiplying the first input by the second input and then adding the third input.
    28. isnan(): Checks if a given value is "Not a Number" (NaN).
    29. isinf(): Checks if a given value is infinite.
    30. isfinite(): Checks if a given value is finite.
    31. finite(): Returns the given value if it is finite; otherwise, it returns a positive or negative infinity.
    32. fdim(): Returns the positive difference between two values.
    33. exp2(): Returns 2 raised to the power of a value.
    34. expm1(): Returns e raised to the power of a value minus 1.
    35. ilogb(): Returns the binary exponent of a given value.
    36. log1p(): Returns the natural logarithm of 1 plus a value.
    37. log2(): Returns the base-2 logarithm of a number.
    38. logb(): Returns the binary exponent of a given value.
    39. nearbyint(): Rounds a value to the nearest integer using the current rounding mode.
    40. nextafter(): Returns the next representable value after a given value in the specified direction.
    41. nexttoward(): Returns the next representable value after a given value in the specified direction, using the long double type.
    42. remainder(): Returns the floating-point remainder of dividing two given values.
    43. remquo(): Returns the integer quotient and remainder of dividing two given values.
    44. scalbln(): Scales a floating-point value by an integral power of the radix.
    45. scalbn(): Scales a floating-point value by an integral power of two.
    46. copysign(): Returns a value with the magnitude of the first input and the sign of the second input.
    47. hypot(): Returns the length of the hypotenuse of a right-angled triangle.
    48. acosh(): Returns the inverse hyperbolic cosine of a value.
    49. asinh(): Returns the inverse hyperbolic sine of a value.
    50. atanh(): Returns the inverse hyperbolic tangent of a value.
    51. erf(): Returns the error function of a value.
    52. erfc(): Returns the complementary error function of a value.
    53. lgamma(): Computes the logarithm of the absolute value of the Gamma function of a value.
    54. tgamma(): Returns the Gamma function of a value.
    55. j0(): Returns the Bessel function of the first kind of order zero.
    56. j1(): Returns the Bessel function of the first kind of order one.
    57. jn(): Returns the Bessel function of the first kind of integer order.
    58. y0(): Returns the Bessel function of the second kind of order zero.
    59. y1(): Returns the Bessel function of the second kind of order one.
    60. yn(): Returns the Bessel function of the second kind of integer order.
    61. nearbyintf(): Rounds a value to the nearest integer using the current rounding mode (for float input).
    62. rint(): Rounds a value to the nearest integer value, using the current rounding mode.
    63. fabsf(): Returns the absolute value of a float value.
    64. powf(): Returns a value raised to a given power (for float input).
    65. sqrtf(): Returns the square root of a float value.
    66. cbrtf(): Returns the cube root of a float value.
    67. expm1f(): Returns e raised to the power of a float value minus 1.
    68. expf(): Returns the exponential value of a float value.
    69. logf(): Returns the natural logarithm of a float value.
    70. log2f(): Returns the base-2 logarithm of a float value.
    71. log10f(): Returns the base-10 logarithm of a float value.
    72. sinhf(): Returns the hyperbolic sine of a float value.
    73. coshf(): Returns the hyperbolic cosine of a float value.
    74. tanhf(): Returns the hyperbolic tangent of a float value.
    75. asinhf(): Returns the inverse hyperbolic sine of a float value.
    76. acoshf(): Returns the inverse hyperbolic cosine of a float value.
    77. atanhf(): Returns the inverse hyperbolic tangent of a float value.
    78. atan2f(): Returns the arctangent of the quotient of two float values.
    79. sinf(): Returns the sine of an angle in radians (for float input).
    80. cosf(): Returns the cosine of an angle in radians (for float input).
    81. tanf(): Returns the tangent of an angle in radians (for float input).
    82. asinf(): Returns the arcsine of a float value in the range of -1 to 1.
    83. acosf(): Returns the arccosine of a float value in the range of -1 to 1.
    84. atanf(): Returns the arctangent of a float value.
    85. logbf(): Returns the binary exponent of a float value.
    86. exp2f(): Returns 2 raised to the power of a float value.
    87. ilogbf(): Returns the binary exponent of a float value as an integer.
    88. remainderf(): Returns the remainder of dividing two float values.
    89. fmodf(): Returns the remainder of a division operation with the same sign as the dividend (for float input).
    90. hypotf(): Returns the length of the hypotenuse of a right-angled triangle (for float input).
    91. copysignf(): Returns a value with the magnitude of the first input and the sign of the second input (for float input).
    92. fmaxf(): Returns the maximum value between two float values.
    93. fminf(): Returns the minimum value between two float values.
    94. fdimf(): Returns the positive difference between two float values.
    95. truncf(): Returns the integer part of a float value, discarding the fractional part.
    96. ceilf(): Returns the smallest integer value greater than or equal to a float value.
    97. floorf(): Returns the largest integer value less than or equal to a float value.
    98. roundf(): Returns the value rounded to the nearest integer (for float input).
    99. pow10(): Returns 10 raised to the power of a value.
    100. hypotl(): Returns the length of the hypotenuse of a right-angled triangle (for long double input).
    101. sinl(): Returns the sine of an angle in radians (for long double input).
    102. cosl(): Returns the cosine of an angle in radians (for long double input).
    103. tanl(): Returns the tangent of an angle in radians (for long double input).
    104. asinl(): Returns the arcsine of a long double value in the range of -1 to 1.
    105. acosl(): Returns the arccosine of a long double value in the range of -1 to 1.
    106. atanl(): Returns the arctangent of a long double value.
    107. atan2l(): Returns the arctangent of the quotient of two long double values.
    108. sinhl(): Returns the hyperbolic sine of a long double value.
    109. coshl(): Returns the hyperbolic cosine of a long double value.
    110. tanhl(): Returns the hyperbolic tangent of a long double value.
    111. atanhl(): Returns the inverse hyperbolic tangent of a long double value.
    112. asinhl(): Returns the inverse hyperbolic sine of a long double value.
    113. acoshl(): Returns the inverse hyperbolic cosine of a long double value.
    114. expm1l(): Returns e raised to the power of a long double value minus 1.
    115. exp2l(): Returns 2 raised to the power of a long double value.
    116. logl(): Returns the natural logarithm of a long double value.
    117. log2l(): Returns the base-2 logarithm of a long double value.
    118. log10l(): Returns the base-10 logarithm of a long double value.
    119. cbrtl(): Returns the cube root of a long double value.
    120. fabsl(): Returns the absolute value of a long double value.
    121. sqrtl(): Returns the square root of a long double value.
    122. powl(): Returns a value raised to a given power (for long double input).
    123. fmodl(): Returns the remainder of a division operation with the same sign as the dividend (for long double input).
    124. remainderl(): Returns the remainder of dividing two long double values.
    125. fmaxl(): Returns the maximum value between two long double values.
    126. fminl(): Returns the minimum value between two long double values.
    127. fdiml(): Returns the positive difference between two long double values.
    128. fmal(): Returns the result of multiplying the first input by the second input and then adding the third input (for long double input).
    129. sqrtl(): Returns the square root of a long double value.
    130. ceill(): Returns the smallest integer value greater than or equal to a long double value.
    131. floorl(): Returns the largest integer value less than or equal to a long double value.
    132. roundl(): Returns the value rounded to the nearest integer (for long double input).
    133. truncl(): Returns the integer part of a long double value, discarding the fractional part.
    134. scalblnf(): Scales a floating-point value by an integral power of the radix (for float input).
    135. scalbnf(): Scales a floating-point value by an integral power of two (for float input).
    136. scalblnl(): Scales a long double value by an integral power of the radix.
    137. scalbnl(): Scales a long double value by an integral power of two.
    138. copysignl(): Returns a value with the magnitude of the first input and the sign of the second input (for long double input).
    139. nextafterl(): Returns the next representable value after a given value in the specified direction (for long double input).
    140. nexttowardl(): Returns the next representable value after a given value in the specified direction, using the long double type.
    141. erf(): Returns the error function of a double value.
    142. erff(): Returns the error function of a float value.
    143. erfl(): Returns the error function of a long double value.
    144. erfc(): Returns the complementary error function of a double value.
    145. erfcf(): Returns the complementary error function of a float value.
    146. erfcl(): Returns the complementary error function of a long double value.
    147. lgamma(): Computes the logarithm of the absolute value of the Gamma function of a double value.
    148. lgammaf(): Computes the logarithm of the absolute value of the Gamma function of a float value.
    149. lgammal(): Computes the logarithm of the absolute value of the Gamma function of a long double value.
    150. tgamma(): Returns the Gamma function of a double value.
    151. tgammaf(): Returns the Gamma function of a float value.
    152. tgammal(): Returns the Gamma function of a long double value.
    153. j0(): Returns the Bessel function of the first kind of order zero (for double input).
    154. j1(): Returns the Bessel function of the first kind of order one (for double input).
    155. jn(): Returns the Bessel function of the first kind of integer order (for double input).
    156. j0f(): Returns the Bessel function of the first kind of order zero (for float input).
    157. j1f(): Returns the Bessel function of the first kind of order one (for float input).
    158. jnf(): Returns the Bessel function of the first kind of integer order (for float input).
    159. y0(): Returns the Bessel function of the second kind of order zero (for double input).
    160. y1(): Returns the Bessel function of the second kind of order one (for double input).
    161. yn(): Returns the Bessel function of the second kind of integer order (for double input).
    162. y0f(): Returns the Bessel function of the second kind of order zero (for float input).
    163. y1f(): Returns the Bessel function of the second kind of order one (for float input).
    164. ynf(): Returns the Bessel function of the second kind of integer order (for float input).
    165. nearbyint(): Rounds a value to the nearest integer using the current rounding mode (for double input).
    166. nearbyintf(): Rounds a value to the nearest integer using the current rounding mode (for float input).
    167. nearbyintl(): Rounds a value to the nearest integer using the current rounding mode (for long double input).
    168. rint(): Rounds a value to the nearest integer value, using the current rounding mode (for double input).
    169. rintf(): Rounds a value to the nearest integer value, using the current rounding mode (for float input).
    170. rintl(): Rounds a value to the nearest integer value, using the current rounding mode (for long double input).
    171. isnan(): Checks if a given value is "Not a Number" (NaN) (for double input).
    172. isnanf(): Checks if a given value is "Not a Number" (NaN) (for float input).
    173. isnanl(): Checks if a given value is "Not a Number" (NaN) (for long double input).
    174. isinf(): Checks if a given value is infinite (for double input).
    175. isinf() : checks if a given value is infinite (for float input).
    176. isinf(): checks if a given value is infinite (for long double input).
    177. isfinite(): Checks if a given value is finite (for double input).
    178. isfinitef(): Checks if a given value is finite (for float input).
    179. isfinitel(): Checks if a given value is finite (for long double input).
    180. finite(): Returns the given value if it is finite; otherwise, it returns a positive or negative infinity (for double input).
    181. finitef(): Returns the given value if it is finite; otherwise, it returns a positive or negative infinity (for float input).
    182. finitel(): Returns the given value if it is finite; otherwise, it returns a positive or negative infinity (for long double input).
    183. math_errhandling(): Returns the current error-handling mode for math functions.
    184. fpclassify(): Returns the classification of a given value according to the IEEE 754 standard.
    185. acosh(): Returns the inverse hyperbolic cosine of a double value.
    186. acoshl(): Returns the inverse hyperbolic cosine of a long double value.
    187. acoshf(): Returns the inverse hyperbolic cosine of a float value.
    188. acoshf(): Returns the inverse hyperbolic cosine of a float value.
    189. acoshf(): Returns the inverse hyperbolic cosine of a float value.
    190. cfpclassify(): Returns the classification of a given value according to the IEEE 754 standard (for complex float input).
    191. clog(): Returns the natural logarithm of a complex double value.
    192. clogf(): Returns the natural logarithm of a complex float value.
    193. cexpl(): Returns the exponential value of a complex long double value.
    194. cexpf(): Returns the exponential value of a complex float value.
    195. cos(): Returns the cosine component of a complex double number.
    196. cosf(): Returns the cosine component of a complex float number.