i think u should try the same code in microsoft VC++ compiler.
its complier problem u may be using 16 or 32 bit complier.
u may be trying this code in TC,thats y its not working
int is a 16 bit value. The value 100000 is 0x186a0, and when you assign a = 100000 the value is truncated to 16 bits, so the variable a equals to 0x86a0. The value 0x86a0 is equal to value -31072, so you get the value (-1.272554) instead of 4.0995.