![]() The header defines a type-generic macro for each mathematical function defined in and. Implementations are provided by open-source projects that are not part of the standard library.Ĭomputes the complex error function ( C99)Ĭomputes the complex complementary error function ( C99) As with the real-valued functions, an f or l suffix denotes the float complex or long double complex variant of the function.Ĭomputes argument of a complex number ( C99)Ĭomputes imaginary part of a complex number ( C99)Ĭomputes real part of a complex number ( C99)Ĭomputes complex projection into the Riemann sphere ( C99)Ĭomputes complex hyperbolic cosine ( C99)Ĭomputes complex hyperbolic tangent ( C99)Ĭomputes complex hyperbolic arc sine ( C99)Ĭomputes complex hyperbolic arc cosine ( C99)Ĭomputes complex hyperbolic arc tangent ( C99)Ī few more complex functions are "reserved for future use in C99". Note that C99 and C++ do not implement complex numbers in a code-compatible way – the latter instead provides the class std :: complex.Īll operations on complex numbers are defined in header. Any floating-point type can be modified with complex, and is then defined as a pair of floating-point numbers. Restores floating-point environment, but keeps current exceptions ( C99)Ĭ99 adds a new _Complex keyword (and complex convenience macro) that provides support for complex numbers. ![]() Tests whether certain exceptions have been raised ( C99) Sets current floating-point environment ( C99) Saves current floating-point environment and clears all exceptions ( C99) Retrieves current rounding direction ( C99) Stores current floating-point environment ( C99) The floating-point environment functions and types are defined in header ( in C++). These functions can be used to control a variety of settings that affect floating-point computations, for example, the rounding mode, on what conditions exceptions occur, when numbers are flushed to zero, etc. Returns next representable floating-point value towards the given valueĬopies the sign of a floating-point valueĬategorizes the given floating-point valueĬhecks if the sign of the argument is negativeĬ99 adds several functions and types for fine-grained control of floating-point environment. Multiplies a number by FLT_RADIX raised to a power Multiplies a number by 2 raised to a powerĭecomposes a number into integer and fractional parts Returns the nearest integer using current rounding mode with exception if the result differsĭecomposes a number into significand and a power of 2 Returns the nearest integer using current rounding mode Returns the nearest integer, rounding away from zero in halfway cases Returns the nearest integer not greater in magnitude than the given value Returns the nearest integer not greater than the given value Returns the nearest integer not less than the given value Returns e raised to the given power, minus oneĬomputes natural logarithm (to base e) of 1 plus the given numberĬomputes square root of the sum of the squares of two given numbersĬomputes arc tangent, using signs to determine quadrantsĬomputes natural logarithm of the absolute value of the gamma function Positive difference of two floating-point values ![]() Signed remainder as well as the three last bits of the division operation Signed remainder of the division operation Remainder of the floating-point division operation Ĭomputes absolute value of an integer valueĬomputes absolute value of a floating-point valueĬomputes the quotient and remainder of integer division Those functions are identified by f and l suffixes respectively. In C99, this shortcoming was fixed by introducing new sets of functions that work on float and long double arguments. ![]() For those that are, the functions accept only type double for the floating-point arguments, leading to expensive type conversions in code that otherwise used single-precision float values. Not all of these functions are available in the C89 version of the standard. The functions that operate on integers, such as abs, labs, div, and ldiv, are instead defined in the header ( header in C++).Īny functions that operate on angles use radians as the unit of angle. ![]() Most of the mathematical functions are defined in ( header in C++). Most of these functions are also available in the C++ standard library, though in different headers (the C headers are included as well, but only as a deprecated compatibility feature). Different C standards provide different, albeit backwards-compatible, sets of functions. All functions use floating-point numbers in one manner or another. C mathematical operations are a group of functions in the standard library of the C programming language implementing basic mathematical functions. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |