Skip to content

Commit 1069743

Browse files
olivierovColin Robertson
authored andcommitted
Typo in lroundl example results (MicrosoftDocs#469)
* Typo in lroundl example results * Update lround-lroundf-lroundl-llround-llroundf-llroundl.md - Up the warning level to /W4 for docs standards - Add the long double suffix to the initializer for z
1 parent 3f4e922 commit 1069743

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/c-runtime-library/reference/lround-lroundf-lroundl-llround-llroundf-llroundl.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ For additional compatibility information, see [Compatibility](../../c-runtime-li
8383

8484
```C
8585
// crt_lround.c
86-
// Build with: cl /W3 /Tc crt_lround.c
86+
// Build with: cl /W4 /Tc crt_lround.c
8787
// This example displays the rounded results of
8888
// the floating-point values 2.499999, -2.499999,
8989
// 2.8, -2.8, 3.5 and -3.5.
@@ -95,7 +95,7 @@ int main( void )
9595
{
9696
double x = 2.499999;
9797
float y = 2.8f;
98-
long double z = 3.5;
98+
long double z = 3.5L;
9999

100100
printf("lround(%f) is %d\n", x, lround(x));
101101
printf("lround(%f) is %d\n", -x, lround(-x));
@@ -111,8 +111,8 @@ lround(2.499999) is 2
111111
lround(-2.499999) is -2
112112
lroundf(2.800000) is 3
113113
lroundf(-2.800000) is -3
114-
lroundl(2.500000) is 4
115-
lroundl(-2.500000) is -4
114+
lroundl(3.500000) is 4
115+
lroundl(-3.500000) is -4
116116
```
117117

118118
## See also

0 commit comments

Comments
 (0)