My Math Forum Double-Precision in C++

 Computer Science Computer Science Forum

 November 3rd, 2007, 11:48 AM #1 Senior Member   Joined: Apr 2007 Posts: 2,140 Thanks: 0 Double-Precision in C++ The following source code includes the term "double". I need to know the exact defintion of "double". I kinda know what it means, but I still need to know what is the term "double" is for. Code: #include int main() { double radius; double area; // Step 1: Read in radius radius = 20 // Step 2: Compute the area area = radius * radius * 3.14159 // Step 3: Display the area std::cout << "The area is " << area << std::endl; return 0; }
November 3rd, 2007, 02:11 PM   #2
Global Moderator

Joined: Nov 2006
From: UTC -5

Posts: 16,046
Thanks: 938

Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms
Re: Double-Precision in C++

Quote:
 Originally Posted by johnny The following source code includes the term "double". I need to know the exact defintion of "double". I kinda know what it means, but I still need to know what is the term "double" is for.
Without knowing why you want to know, I risk giving too much or too little information.

"double" is like "float", except it typically uses twice as many bits. Double is usually 64 bits, holding values up to about 10^308. It has all the special characteristics of float: infinities, NaN, signed zeros, and subnormal numbers.

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post minimalmiser Algebra 6 December 29th, 2010 05:38 AM povilasb Pre-Calculus 8 December 25th, 2010 10:49 AM jimmyfo Algebra 1 November 28th, 2009 07:39 AM adanedhel728 Applied Math 0 November 9th, 2009 11:15 PM CRGreathouse Applied Math 2 December 13th, 2006 08:12 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top