You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-runtime-library/crt-library-features.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
title: "CRT Library Features"
3
+
description: "This various .lib files that comprise the Microsoft C run-time libraries as well as their associated compiler options and preprocessor directives."
@@ -65,7 +66,7 @@ For more information on using the CRT with **/clr**, see [Mixed (Native and Mana
65
66
66
67
To build a debug version of your application, the [_DEBUG](../c-runtime-library/debug.md) flag must be defined and the application must be linked with a debug version of one of these libraries. For more information about using the debug versions of the library files, see [CRT Debugging Techniques](/visualstudio/debugger/crt-debugging-techniques).
67
68
68
-
This version of the CRT is not fully conformant with the C99 standard. In particular, the \<tgmath.h> header and the CX_LIMITED_RANGE/FP_CONTRACT pragma macros are not supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use /Zc compiler conformance options and specify linker options to control some aspects of library conformance,
69
+
This version of the CRT is not fully conformant with the C99 standard. In particular, the \<tgmath.h> header and the CX_LIMITED_RANGE/FP_CONTRACT pragma macros are not supported. Certain elements such as the meaning of parameter specifiers in standard IO functions use legacy interpretations by default. You can use /Zc compiler conformance options and specify linker options to control some aspects of library conformance.
@@ -32,18 +33,18 @@ float abs( float n ); // C++ only
32
33
33
34
### Parameters
34
35
35
-
*n*<br/>
36
+
*n*\
36
37
Numeric value.
37
38
38
39
## Return Value
39
40
40
-
The **abs**, **labs**, **llabs** and **_abs64** functions return the absolute value of the parameter *n*. There is no error return.
41
+
The **abs**, **labs**, **llabs**, and **_abs64** functions return the absolute value of the parameter *n*. There's no error return.
41
42
42
43
## Remarks
43
44
44
45
Because C++ allows overloading, you can call overloads of **abs** that take and return **`long`**, **`long long`**, **`float`**, **`double`**, and **`long double`** values. These overloads are defined in the \<cmath> header. In a C program, **abs** always takes and returns an **`int`**.
45
46
46
-
**Microsoft-specific**: Because the range of negative integers that can be represented by using any integral type is larger than the range of positive integers that can be represented by using that type, it's possible to supply an argument to these functions that can’t be converted. If the absolute value of the argument cannot be represented by the return type, the **abs** functions return the argument value unchanged. Specifically, `abs(INT_MIN)` returns `INT_MIN`, `labs(LONG_MIN)` returns `LONG_MIN`, `llabs(LLONG_MIN)` returns `LLONG_MIN`, and `_abs64(_I64_MIN)` returns `_I64_MIN`. This means that the **abs** functions cannot be used to guarantee a positive value.
47
+
**Microsoft-specific**: Because the range of negative integers that can be represented by using any integral type is larger than the range of positive integers that can be represented by using that type, it's possible to supply an argument to these functions that can't be converted. If the absolute value of the argument cannot be represented by the return type, the **abs** functions return the argument value unchanged. Specifically, `abs(INT_MIN)` returns `INT_MIN`, `labs(LONG_MIN)` returns `LONG_MIN`, `llabs(LLONG_MIN)` returns `LLONG_MIN`, and `_abs64(_I64_MIN)` returns `_I64_MIN`. This means that the **abs** functions cannot be used to guarantee a positive value.
Value between -1 and 1, for which to calculate the arccosine (the inverse cosine).
33
33
34
34
## Return Value
@@ -45,7 +45,9 @@ By default, if *x* is less than -1 or greater than 1, **acos** returns an indefi
45
45
46
46
## Remarks
47
47
48
-
Because C++ allows overloading, you can call overloads of **acos** that take and return **`float`** and **`long double`** types. In a C program, **acos** always takes and returns a **`double`**.
48
+
Because C++ allows overloading, you can call overloads of **acos** that take and return **`float`** and **`long double`** types. In a C program, unless you're using the \<tgmath.h> macro to call this function, **acos** always takes and returns a **`double`**.
49
+
50
+
If you use the \<tgmath.h> `acos()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
49
51
50
52
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
51
53
@@ -54,6 +56,7 @@ By default, this function's global state is scoped to the application. To change
@@ -19,16 +20,15 @@ Calculates the inverse hyperbolic cosine.
19
20
doubleacosh( double x );
20
21
float acoshf( float x );
21
22
long double acoshl( long double x );
22
-
```
23
+
#define acosh(X) // Requires C11 or higher
23
24
24
-
```cpp
25
25
float acosh( float x ); // C++ only
26
26
long double acosh( long double x ); // C++ only
27
27
```
28
28
29
29
### Parameters
30
30
31
-
*x*<br/>
31
+
*x*\
32
32
Floating-point value.
33
33
34
34
## Return Value
@@ -42,7 +42,9 @@ The **acosh** functions return the inverse hyberbolic cosine (arc hyperbolic cos
42
42
43
43
## Remarks
44
44
45
-
When you use C++, you can call overloads of **acosh** that take and return **`float`** or **`long double`** values. In a C program, **acosh** always takes and returns **`double`**.
45
+
When you use C++, you can call overloads of **acosh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **acosh** always takes and returns **`double`**.
46
+
47
+
If you use the \<tgmath.h> `acosh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
46
48
47
49
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
48
50
@@ -51,6 +53,7 @@ By default, this function's global state is scoped to the application. To change
@@ -45,7 +45,9 @@ By default, if *x* is less than -1 or greater than 1, **asin** returns an indefi
45
45
46
46
## Remarks
47
47
48
-
Because C++ allows overloading, you can call overloads of **asin** with **`float`** and **`long double`** values. In a C program, **asin** always takes and returns a **`double`**.
48
+
Because C++ allows overloading, you can call overloads of **asin** with **`float`** and **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **asin** always takes and returns a **`double`**.
49
+
50
+
If you use the \<tgmath.h> `asin()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
49
51
50
52
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
51
53
@@ -54,6 +56,7 @@ By default, this function's global state is scoped to the application. To change
@@ -19,9 +20,8 @@ Calculates the inverse hyperbolic sine.
19
20
doubleasinh( double x );
20
21
float asinhf( float x );
21
22
long double asinhl( long double x );
22
-
```
23
+
#define asinh(X) // Requires C11 or higher
23
24
24
-
```cpp
25
25
float asinh( float x ); // C++ only
26
26
long double asinh( long double x ); // C++ only
27
27
```
@@ -41,15 +41,19 @@ The **asinh** functions return the inverse hyberbolic sine (arc hyperbolic sine)
41
41
42
42
## Remarks
43
43
44
-
When you use C++, you can call overloads of **asinh** that take and return **`float`** or **`long double`** values. In a C program, **asinh** always takes and returns **`double`**.
44
+
When you use C++, you can call overloads of **asinh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **asinh** always takes and returns **`double`**.
45
+
46
+
If you use the \<tgmath.h> `asinh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
47
+
45
48
46
49
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
@@ -19,23 +20,23 @@ Calculates the arctangent of **x** (**atan**, **atanf**, and **atanl**) or the a
19
20
doubleatan( double x );
20
21
float atanf( float x );
21
22
long double atanl( long double x );
23
+
#define atan(X) // Requires C11 or higher
24
+
25
+
float atan( float x ); // C++ only
26
+
long double atan( long double x ); // C++ only
22
27
23
28
double atan2( double y, double x );
24
29
float atan2f( float y, float x );
25
30
long double atan2l( long double y, long double x );
26
-
```
27
-
28
-
```cpp
29
-
float atan( float x ); // C++ only
30
-
long double atan( long double x ); // C++ only
31
+
#define atan2(Y, X) // Requires C11 or higher
31
32
32
33
float atan2( float y, float x ); // C++ only
33
34
long double atan2( long double y, long double x ); // C++ only
34
35
```
35
36
36
37
### Parameters
37
38
38
-
*x*, *y*<br/>
39
+
*x*, *y*\
39
40
Any numbers.
40
41
41
42
## Return Value
@@ -52,9 +53,11 @@ Any numbers.
52
53
53
54
The **atan** function calculates the arctangent (the inverse tangent function) of *x*. **atan2** calculates the arctangent of *y*/*x* (if *x* equals 0, **atan2** returns π/2 if *y* is positive, -π/2 if *y* is negative, or 0 if *y* is 0.)
54
55
56
+
If you use the \<tgmath.h> `atan()` or `atan2()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
57
+
55
58
**atan** has an implementation that uses Streaming SIMD Extensions 2 (SSE2). For information and restrictions about using the SSE2 implementation, see [_set_SSE2_enable](set-sse2-enable.md).
56
59
57
-
Because C++ allows overloading, you can call overloads of **atan** and **atan2** that take **`float`** or **`long double`** arguments. In a C program, **atan** and **atan2** always take **`double`** arguments and return a **`double`**.
60
+
Because C++ allows overloading, you can call overloads of **atan** and **atan2** that take **`float`** or **`long double`** arguments. In a C program, unless you're using the \<tgmath.h> macro to call this function, **atan** and **atan2** always take **`double`** arguments and return a **`double`**.
58
61
59
62
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
60
63
@@ -63,6 +66,7 @@ By default, this function's global state is scoped to the application. To change
@@ -19,16 +20,15 @@ Calculates the inverse hyperbolic tangent.
19
20
doubleatanh( double x );
20
21
float atanhf( float x );
21
22
long double atanhl( long double x );
22
-
```
23
+
#define atanh(X) // Requires C11 or higher
23
24
24
-
```cpp
25
25
float atanh( float x ); // C++ only
26
26
long double atanh( long double x ); // C++ only
27
27
```
28
28
29
29
### Parameters
30
30
31
-
*x*<br/>
31
+
*x*\
32
32
Floating-point value.
33
33
34
34
## Return Value
@@ -42,7 +42,9 @@ The **atanh** functions return the inverse hyberbolic tangent (arc hyperbolic ta
42
42
43
43
## Remarks
44
44
45
-
Because C++ allows overloading, you can call overloads of **atanh** that take and return **`float`** or **`long double`** values. In a C program, **atanh** always takes and returns **`double`**.
45
+
Because C++ allows overloading, you can call overloads of **atanh** that take and return **`float`** or **`long double`** values. In a C program, unless you're using the \<tgmath.h> macro to call this function, **atanh** always takes and returns **`double`**.
46
+
47
+
If you use the \<tgmath.h> `atanh()` macro, the type of the argument determines which version of the function is selected. See [Type-generic math](../../c-runtime-library/tgmath.md) for details.
46
48
47
49
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
48
50
@@ -51,6 +53,7 @@ By default, this function's global state is scoped to the application. To change
0 commit comments