Re: Microsoft's so called programmers (ROTFL! :-)
On Jun 19, 3:08 pm, Vyacheslav Kononenko
<vyacheslav.konone...@gmail.com> wrote:
On Jun 19, 5:09 pm, Mirco Wahab <wahab-m...@gmx.de> wrote:
Adem24 wrote:
Microsoft's so called programmers write braindamaged programs
and confusing buggy examples and help pages like that below.
It is even from the online "help" (ROTFL! :-) of their "compiler" (RO=
TFL! :-):
<CITATION_FROM_THE_MSDN_LIBRARY>
/* FMOD.C: This program displays a
* floating-point remainder.
*/
#include <math.h>
#include <stdio.h>
void main( void )
{
double w = -10.0, x = 3.0, y = 0.0, z;
z = fmod( x, y );
printf( "The remainder of %.2f / %.2f is %f\n", w, x, z );
printf( "The remainder of %.2f / %.2f is %f\n", x, y, z );
}
Output
The remainder of -10.00 / 3.00 is -1.000000
</CITATION_FROM_THE_MSDN_LIBRARY>
http://msdn.microsoft.com/en-us/library/20dckbeh(VS.71).aspx
They fixed it in .NET !!!
... which means that the problem cited in the Visual Studio 7.1
documentation was fixed at least four years ago (for Visual C++ .NET)
and in fact remains correct in the documentation for their current C++
compiler (Visual C++ 2008):
// crt_fmod.c
// This program displays a floating-point remainder.
#include <math.h>
#include <stdio.h>
int main( void )
{
double w = -10.0, x = 3.0, z;
z = fmod( w, x );
printf( "The remainder of %.2f / %.2f is %f\n", w, x, z );
}
Output:
The remainder of -10.00 / 3.00 is -1.000000
Greg