Floating Point Problems
From: Bruno Christensen (bc_at_neplan.ch)
Date: 06/30/04
- Next message: Corey Murtagh: "Re: assembly"
- Previous message: Bruno Christensen: "Problems with floating point numbers"
- Next in thread: Peter Ammon: "Re: Floating Point Problems"
- Reply: Peter Ammon: "Re: Floating Point Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jun 2004 02:24:59 -0700
Hi
I have problems with floating point numbers. After the following
statement
double x = 0.75 * 0.1;
double z = 7.5 * 0.01;
x and z have the following values:
0.075000000000000011
0.074999999999999997
My compiler: Microsoft Visual C++ .Net. If I use the old Visual Studio
6.0 everything is ok and x and z have correct values:
0.075000000000000
0.075000000000000
Can anybody help?
Regards
Bruno
- Next message: Corey Murtagh: "Re: assembly"
- Previous message: Bruno Christensen: "Problems with floating point numbers"
- Next in thread: Peter Ammon: "Re: Floating Point Problems"
- Reply: Peter Ammon: "Re: Floating Point Problems"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|