Acos In Dev C++

< c‎ | numeric‎ | math
  1. Dev C++ For Windows 10
  2. Dev C++ 5.11
  3. Acos In Dev C 2018

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

Download C
Language
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
Numerics
Common mathematical functions
Floating-point environment(C99)
Complex number arithmetics(C99)
Random number generation
Type-generic math(C99)
Common mathematical functions
Functions
Basic operations
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)(C99)(C99)
Exponential functions
(C99)
(C99)
Power functions
(C99)
Trigonometric and hyperbolic functions
(C99)
(C99)
(C99)
Error and gamma functions
(C99)
(C99)
Nearest integer floating point operations
(C99)
(C99)
(C99)(C99)(C99)
Floating point manipulation functions
(C99)(C99)
(C99)
Classification
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
(C99)
Types
(C99)(C99)
Macro constants
(C99)(C99)
(C99)(C99)(C99)
(C99)(C99)(C99)
(C99)
(C99)
(C99)(C99)
(C99)(C99)(C99)(C99)(C99)
float acosf(float arg );
(1) (since C99)
(2)
longdouble acosl(longdouble arg );
(3) (since C99)
#define acos( arg )
(4) (since C99)
1-3) Computes the principal value of the arc cosine of arg.
4) Type-generic macro: If the argument has type longdouble, 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]
Retrieved from 'https://en.cppreference.com/mwiki/index.php?title=c/numeric/math/acos&oldid=78875'
-->

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.

InputSEH ExceptionMatherr Exception
± ∞INVALID_DOMAIN
± QNAN,INDnone_DOMAIN
|x|>1INVALID_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

RoutineRequired headerOptional 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