Re: Floating Point Precision guidance.
From: Val (valmont_programming_at_hotmail.com)
Date: 11/21/04
- Next message: beliavsky_at_aol.com: "MSVC or g++?"
- Previous message: Dan Chirillo: "Re: array question"
- In reply to: Chris \( Val \): "Re: Floating Point Precision guidance."
- Next in thread: Chris \( Val \): "Re: Floating Point Precision guidance."
- Reply: Chris \( Val \): "Re: Floating Point Precision guidance."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 21 Nov 2004 23:59:09 +0100
"Chris ( Val )" <chrisval@bigpond.com.au> wrote in message news:303ctfF2sqi7vU1@uni-berlin.de...
| You can also check the machine 'epsilon' as follows:
|
| std::cout << std::fixed << std::showpoint << std::setprecision( 20 );
| std::cout << std::numeric_limits<float>::epsilon() << std::endl;
| std::cout << std::numeric_limits<double>::epsilon() << std::endl;
|
| I know that the C++ standard does not guarantee 20 decimal
| places. IIRC, it's about 6 and 15 respectfully for float and
| double, but here is what I get, as an example at 20 DP's:
|
| // float == 0.00000011920928955078
| // double == 0.00000000000000022204
How does this help one in practical coding? What does this all mean?
- Next message: beliavsky_at_aol.com: "MSVC or g++?"
- Previous message: Dan Chirillo: "Re: array question"
- In reply to: Chris \( Val \): "Re: Floating Point Precision guidance."
- Next in thread: Chris \( Val \): "Re: Floating Point Precision guidance."
- Reply: Chris \( Val \): "Re: Floating Point Precision guidance."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|