Skip to content

Commit f483c15

Browse files
author
Colin Robertson
authored
Merge pull request #2468 from MicrosoftDocs/master637357903491835127
Repo sync for protected CLA branch
2 parents e3f2db1 + e4ebc67 commit f483c15

File tree

8 files changed

+18
-14
lines changed

8 files changed

+18
-14
lines changed

docs/c-runtime-library/complex-math-support.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "C complex math support"
3+
description: "Describes C-language complex math support in the Microsoft C runtime library (CRT)"
34
ms.date: "05/14/2019"
45
f1_keywords: ["c.complex"]
56
helpviewer_keywords: ["complex numbers, math routines", "math routines", "complex numbers"]
@@ -89,4 +90,5 @@ Because complex numbers are not a native type in the Microsoft compiler, the sta
8990

9091
## See also
9192

92-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
93+
[Type-generic math](tgmath.md)\
94+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)

docs/c-runtime-library/floating-point-support.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Math and floating-point support"
3-
ms.date: "01/31/2019"
3+
description: "Describes floating-point support in the Microsoft Universal C Runtime library (UCRT)"
4+
ms.date: "9/14/2020"
45
f1_keywords: ["c.math"]
56
helpviewer_keywords: ["floating-point numbers, math routines", "math routines", "floating-point numbers"]
67
ms.assetid: e4fcaf69-5c8e-4854-a9bb-1f412042131e
@@ -9,6 +10,8 @@ ms.assetid: e4fcaf69-5c8e-4854-a9bb-1f412042131e
910

1011
The Universal C Runtime library (UCRT) provides many integral and floating-point math library functions, including all of those required by ISO C99. The floating-point functions are implemented to balance performance with correctness. Because producing the correctly rounded result may be prohibitively expensive, these functions are designed to efficiently produce a close approximation to the correctly rounded result. In most cases, the result produced is within +/-1 ulp of the correctly rounded result, though there may be cases where there is greater inaccuracy.
1112

13+
For ISO C Standard 11 (C11) and later, the \<tgmath.h> header, in addition to including \<math.h> and \<complex.h>, provides macros that invoke a corresponding math function based on the types of the parameters. See [Type-generic math](tgmath.md) for details.
14+
1215
Many of the floating point math library functions have different implementations for different CPU architectures. For example, the 32-bit x86 CRT may have a different implementation than the 64-bit x64 CRT. In addition, some of the functions may have multiple implementations for a given CPU architecture. The most efficient implementation is selected dynamically at run-time depending on the instruction sets supported by the CPU. For example, in the 32-bit x86 CRT, some functions have both an x87 implementation and an SSE2 implementation. When running on a CPU that supports SSE2, the faster SSE2 implementation is used. When running on a CPU that does not support SSE2, the slower x87 implementation is used. Because different implementations of the math library functions may use different CPU instructions and different algorithms to produce their results, the functions may produce different results across CPUs. In most cases, the results are within +/-1 ulp of the correctly rounded result, but the actual results may vary across CPUs.
1316

1417
Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported the **`long double`** type as an 80-bit precision floating-point data type. In later versions of Visual C++, the **`long double`** data type is a 64-bit precision floating-point data type identical to the **`double`** type. The compiler treats **`long double`** and **`double`** as distinct types, but the **`long double`** functions are identical to their **`double`** counterparts. The CRT provides **`long double`** versions of the math functions for ISO C99 source code compatibility, but note that the binary representation may differ from other compilers.
@@ -127,5 +130,5 @@ Previous 16-bit versions of Microsoft C/C++ and Microsoft Visual C++ supported t
127130

128131
## See also
129132

130-
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)<br/>
131-
[Floating-point primitives](../c-runtime-library/reference/floating-point-primitives.md)<br/>
133+
[Universal C runtime routines by category](../c-runtime-library/run-time-routines-by-category.md)\
134+
[Floating-point primitives](../c-runtime-library/reference/floating-point-primitives.md)

docs/c-runtime-library/recommendations-for-choosing-between-functions-and-macros.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: "Recommendations for Choosing Between Functions and Macros"
3+
description: "Explains the differences between using macros vs functions in the Microsoft C runtime library (CRT)"
34
ms.date: "11/04/2016"
45
f1_keywords: ["c.functions"]
56
helpviewer_keywords: ["functions [CRT], vs. macros", "macros, vs. functions"]
@@ -35,4 +36,5 @@ If you need to choose between a function and a macro implementation of a library
3536

3637
## See also
3738

38-
[CRT Library Features](../c-runtime-library/crt-library-features.md)
39+
[Type-generic math](tgmath.md)\
40+
[CRT Library Features](../c-runtime-library/crt-library-features.md)

docs/code-quality/c33001.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dev_langs: ["C++"]
1414

1515
> Warning C33001: VARIANT 'var' was cleared when it was uninitialized (expression 'expr')
1616
17-
This warning is triggered when an uninitialized VARIANT is passed into an API such as VariantClear
17+
This warning is triggered when an uninitialized VARIANT is passed to an API such as VariantClear
1818
that expects an initialized VARIANT.
1919

2020
## Example

docs/code-quality/c33004.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ dev_langs: ["C++"]
1414

1515
> Warning C33004: VARIANT 'var', which is marked as _Out_ was cleared before being initialized (expression 'expr')
1616
17-
This warning is triggered when a VARIANT parameter with \_Out\_ SAL annotation, which may not be
18-
to be initialized on input, is passed to an API such as VariantClear that expects an initialized VARIANT.
17+
This warning is triggered when a VARIANT parameter with \_Out\_ SAL annotation, which may haven't been
18+
initialized on input, is passed to an API such as VariantClear that expects an initialized VARIANT.
1919

2020
## Example
2121

docs/code-quality/c33005.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dev_langs: ["C++"]
1414

1515
> Warning C33005: VARIANT 'var' was provided as an input or input/output parameter but was not initialized (expression 'expr')
1616
17-
This warning is triggered when an uninitialized VARIANT is passed to a function as input only or input/output
17+
This warning is triggered when an uninitialized VARIANT is passed to a function as input-only or input/output
1818
parameter - for example, a pass-by-refrence parameter without an \_Out\_ SAL annotation.
1919

2020
## Example

docs/code-quality/c33011.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ dev_langs: ["C++"]
1414

1515
> Warning C33011: Unchecked upper bound for enum 'enum' used as index.
1616
17-
This warning is triggered when the lower bound of the enum used as index into an array is checked,
18-
but the upper bound is not checked.
19-
2017
This warning is triggered for an enum that is used as an index into an array,
2118
if the lower bound is checked for its value, but not the upper bound.
2219

docs/code-quality/c33022.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ dev_langs: ["C++"]
1414

1515
> Warning C33022: Potentially incorrect HRESULT usage detected (low confidence)
1616
17-
It is a low-confidence warning for functions that return HRESULT, if there is "FALSE" or "false"
18-
somewhere along the line that eventually returns it or assigns to a variable that is returned.
17+
This is low-confidence warning for a function that returns HRESULT, if there is "FALSE" or "false"
18+
somewhere along the line that eventually returns it or assigns it to a variable that is returned.
1919

2020
## Example
2121

0 commit comments

Comments
 (0)