Dev C++ For Windows 10
C -oexecutable filename.out sourcefilename.cc e.g. G -o Csampleinout.out Csampleinout.cc For the following commands you can find at the end of this summary sample programs. Each command in C is followed by “;”. Carriage return has no meaning in C. Comments Essential for the writing of clear programs are comments, which are. The acos function for complex number is defined in the complex header file. This function is the complex version of the acos function.This function is used to calculate the complex arc cosine of complex number z and returns the arc cosine of complex number z.
Dev C++ 5.11
CLanguage | ||||
Headers | ||||
Type support | ||||
Program utilities | ||||
Variadic function support | ||||
Error handling | ||||
Dynamic memory management | ||||
Date and time utilities | ||||
Strings library | ||||
Algorithms | ||||
Numerics | ||||
Input/output support | ||||
Localization support | ||||
Atomic operations(C11) | ||||
Thread support(C11) | ||||
Technical Specifications |
Common mathematical functions | ||||
Floating-point environment(C99) | ||||
Complex number arithmetics(C99) | ||||
Random number generation | ||||
Type-generic math(C99) |
Functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Basic operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Exponential functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Power functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Trigonometric and hyperbolic functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Error and gamma functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Nearest integer floating point operations | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Floating point manipulation functions | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Classification | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Types | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Macro constants | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
float acosf(float arg ); | (1) | (since C99) |
(2) | ||
longdouble acosl(longdouble arg ); | (3) | (since C99) |
#define acos( arg ) | (4) | (since C99) |
arg
.acosl
is called. Otherwise, if the argument has integer type or the type double, acos
is called. Otherwise, acosf
is called. If the argument is complex, then the macro invokes the corresponding complex function (cacosf, cacos, cacosl).[edit]Parameters
arg | - | floating point value |
[edit]Return value
If no errors occur, the arc cosine of arg
(arccos(arg)) in the range [0 ; π], is returned.
If a domain error occurs, an implementation-defined value is returned (NaN where supported).
If a range error occurs due to underflow, the correct result (after rounding) is returned.
[edit]Error handling
Errors are reported as specified in math_errhandling.
Domain error occurs if arg
is outside the range [-1.0; 1.0]
.
If the implementation supports IEEE floating-point arithmetic (IEC 60559),
- If the argument is +1, the value
+0
is returned. - If |arg| > 1, a domain error occurs and NaN is returned.
- if the argument is NaN, NaN is returned
[edit]Example
Possible output:
[edit]References
- C11 standard (ISO/IEC 9899:2011):
- 7.12.4.1 The acos functions (p: 238)
- 7.25 Type-generic math <tgmath.h> (p: 373-375)
- F.10.1.1 The acos functions (p: 518)
- C99 standard (ISO/IEC 9899:1999):
- 7.12.4.1 The acos functions (p: 218)
- 7.22 Type-generic math <tgmath.h> (p: 335-337)
- F.9.1.1 The acos functions (p: 455)
- C89/C90 standard (ISO/IEC 9899:1990):
- 4.5.2.1 The acos function
[edit]See also
(C99)(C99) | computes arc sine (arcsin(x)) (function)[edit] |
(C99)(C99) | computes arc tangent (arctan(x)) (function)[edit] |
(C99)(C99) | computes arc tangent, using signs to determine quadrants (function)[edit] |
(C99)(C99) | computes cosine (cos(x)) (function)[edit] |
(C99)(C99)(C99) | computes the complex arc cosine (function)[edit] |
Calculates the arccosine.
Syntax
Parameters
x
Value between -1 and 1, for which to calculate the arccosine (the inverse cosine).
Return Value
The acos function returns the arccosine of x in the range 0 to π radians.
By default, if x is less than -1 or greater than 1, acos returns an indefinite.
Input | SEH Exception | Matherr Exception |
---|---|---|
± ∞ | INVALID | _DOMAIN |
± QNAN,IND | none | _DOMAIN |
|x|>1 | INVALID | _DOMAIN |
Remarks
Because C++ allows overloading, you can call overloads of acos that take and return float and longdouble types. In a C program, acos always takes and returns a double.
By default, this function's global state is scoped to the application. To change this, see Global state in the CRT.
Requirements
Routine | Required header | Optional headers |
---|---|---|
acos, acosf, acosl | <math.h> | <errno.h> |
Example
This program prompts for a value in the range -1 to 1. Input values outside this range produce _DOMAIN
error messages. If a valid value is entered, the program prints the arcsine and the arccosine of that value.
See also
Acos In Dev C 2018
Floating-Point Support
asin, asinf, asinl
atan, atanf, atanl, atan2, atan2f, atan2l
cos, cosf, cosl
_matherr
sin, sinf, sinl
tan, tanf, tanl