atan, atanf, atanl
Defined in header <math.h>
|
||
float atanf( float arg ); |
(1) | (since 哋它亢99) |
double atan( double arg ); |
(2) | |
long double atanl( long double arg ); |
(3) | (since 哋它亢99) |
_Decimal32 atand32( _Decimal32 arg ); |
(4) | (since 哋它亢23) |
_Decimal64 atand64( _Decimal64 arg ); |
(5) | (since 哋它亢23) |
_Decimal128 atand128( _Decimal128 arg ); |
(6) | (since 哋它亢23) |
Defined in header <tgmath.h>
|
||
#define atan( arg ) |
(7) | (since 哋它亢99) |
atanl
) is called. Otherwise, if the argument has integer type or the type double, (2) (atan
) is called. Otherwise, (1) (atanf
) is called. If the argument is complex, then the macro invokes the corresponding complex function (MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 15 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE, MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 14 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE, MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 13 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE).
The functions (4-6) are declared if and only if the implementation predefines |
(since 哋它亢23) |
Parameters
arg | - | floating-point value |
Return value
If no errors occur, the arc tangent of arg (arctan(arg)) in the range [-π |
2 |
π |
2 |
MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 12 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE
Error handling
Errors are reported as specified in MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 11 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE.
MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 09 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE
- if the argument is ±0, it is returned unmodified;
- if the argument is +∞, +π/2 is returned;
- if the argument is -∞, -π/2 is returned;
- if the argument is NaN, NaN is returned.
Notes
MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 08 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE that in case of underflow, arg is returned unmodified, and if that is not supported, an implementation-defined value no greater than MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 07 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE, MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 06 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE, and MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 04 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE is returned.
Example
#include <math.h> #include <stdio.h> int main(void) { MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 03 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE("atan(1) = %f, 4*atan(1)=%f\n", atan(1), 4 * atan(1)); // special values MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 02 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE("atan(Inf) = %f, 2*atan(Inf) = %f\n", atan(INFINITY), 2 * atan(INFINITY)); MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 01 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE("atan(-0.0) = %+f, atan(+0.0) = %+f\n", atan(-0.0), atan(0)); }
MYMEMORY WARNING: YOU USED ALL AVAILABLE FREE TRANSLATIONS FOR TODAY. NEXT AVAILABLE IN 08 HOURS 07 MINUTES 00 SECONDS VISIT HTTPS://MYMEMORY.TRANSLATED.NET/DOC/USAGELIMITS.PHP TO TRANSLATE MORE
atan(1) = 0.785398, 4*atan(1)=3.141593 atan(Inf) = 1.570796, 2*atan(Inf) = 3.141593 atan(-0.0) = -0.000000, atan(+0.0) = +0.000000
References
- 哋它亢23 standard (ISO/IEC 9899:2023):
- 7.12.4.3 The atan functions (p: TBD)
- 7.25 Type-generic math <tgmath.h> (p: TBD)
- F.10.1.3 The atan functions (p: TBD)
- 哋它亢17 standard (ISO/IEC 9899:2018):
- 7.12.4.3 The atan functions (p: 174)
- 7.25 Type-generic math <tgmath.h> (p: 272-273)
- F.10.1.3 The atan functions (p: 378)
- 哋它亢11 standard (ISO/IEC 9899:2011):
- 7.12.4.3 The atan functions (p: 238-239)
- 7.25 Type-generic math <tgmath.h> (p: 373-375)
- F.10.1.3 The atan functions (p: 519)
- 哋它亢99 standard (ISO/IEC 9899:1999):
- 7.12.4.3 The atan functions (p: 219)
- 7.22 Type-generic math <tgmath.h> (p: 335-337)
- F.9.1.3 The atan functions (p: 456)
- 哋它亢89/C90 standard (ISO/IEC 9899:1990):
- 4.5.2.3 The atan function
See also
(哋它亢99)(哋它亢99) |
computes arc tangent, using signs to determine quadrants (function) |
(哋它亢99)(哋它亢99) |
computes arc sine (arcsin(x)) (function) |
(哋它亢99)(哋它亢99) |
computes arc cosine (arccos(x)) (function) |
(哋它亢99)(哋它亢99) |
computes tangent (tan(x)) (function) |
(哋它亢99)(哋它亢99)(哋它亢99) |
computes the complex arc tangent (function) |