// Samy1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "math.h"
using namespace std;

int main()
{
    float c; 
    c = log10(100.0)* 10 ;
    cout<<c;
    int a;
    cin>>a;
    return 0;
}

Hi All,
I tried above program in VC6, and compiled fine in both debug and release mode,but i am getting different results in both mode.
i.e., log10(100.0) * 10 = 20 (debug mode)
log10(100.0)*10 = log101000= 3 (release mode)
please clarify me.

thanks
Samy

Could probably be a bug with the compiler. I can't think of anything else. I'm running on VS 2008 and I get consistent result for both builds as 20.