answersLogoWhite

0


Best Answer

#include<iostream>

#include<iomanip>

#include<limits>

#include<cmath>

using namespace std;

int main()

{

double pi = 4 * atan(1.0);

cout << pi << endl;

cout << fixed << pi << endl;

cout << scientific << pi << endl;

pi /= 1000000.0;

cout << setprecision (numeric_limits<double>::digits10 + 1) << fixed << pi << endl;

cout << setprecision (numeric_limits<double>::digits10 + 1) << scientific << pi << endl;

}

User Avatar

Wiki User

9y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you represent sign and magnitude of a floating point number in c plus plus?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How are floating point numbers handled as binary numbers?

Floating point numbers are typically stored as numbers in scientific notation, but in base 2. A certain number of bits represent the mantissa, other bits represent the exponent. - This is a highly simplified explanation; there are several complications in the IEEE floating point format (or other similar formats).Floating point numbers are typically stored as numbers in scientific notation, but in base 2. A certain number of bits represent the mantissa, other bits represent the exponent. - This is a highly simplified explanation; there are several complications in the IEEE floating point format (or other similar formats).Floating point numbers are typically stored as numbers in scientific notation, but in base 2. A certain number of bits represent the mantissa, other bits represent the exponent. - This is a highly simplified explanation; there are several complications in the IEEE floating point format (or other similar formats).Floating point numbers are typically stored as numbers in scientific notation, but in base 2. A certain number of bits represent the mantissa, other bits represent the exponent. - This is a highly simplified explanation; there are several complications in the IEEE floating point format (or other similar formats).


How does a computer represent floating point numbers?

In Computing, Floating Point refers to a method of representing an estimate of a real number in a way which has the ability to support a large range of values.


What does the acronym FPU represent?

Floating Point Unit


Does the length of a vector arrow represent its magnitude and the point its direction?

True


Why is the size of a decimal number not necessarily determined by the number of decimal places notated?

Digits after (to the right of) the decimal point contribute to the accuracy of the number, not its magnitude (or size). So only the digits to the left of the decimal point contribute to the magnitude. Digits after (to the right of) the decimal point contribute to the accuracy of the number, not its magnitude (or size). So only the digits to the left of the decimal point contribute to the magnitude. Digits after (to the right of) the decimal point contribute to the accuracy of the number, not its magnitude (or size). So only the digits to the left of the decimal point contribute to the magnitude. Digits after (to the right of) the decimal point contribute to the accuracy of the number, not its magnitude (or size). So only the digits to the left of the decimal point contribute to the magnitude.


What are the 3 parts of a floating part number?

If you mean floating point number, they are significand, base and exponent.


In your C plus plus program when you enter a decimal for the wholesale price 7.99 for example your program just keeps repeating the next cout line indefinately how do you make it stop?

If your program is looping based on a floating point value, you need to consider that floating point values do not exactly represent the intended decimal value. Any program that makes decisions based on the value of a floating point number must consider truncation error.For instance, 0.110 is 0.00011001100110011...2. Since a floating point register cannot represent an infinite number of bits, this might actually be something else, such as 0.09999999999710, depending on your particular resolution.


What of a real number is the point on a number line that corresponds to a real number?

magnitude


Represent (178.1875)10 in single and double precision floating point format?

balls


Is floating point is exponentional number?

Yes.Yes.Yes.Yes.


What is the floating point unit used for on the processor system?

"Floating Point" refers to the decimal point. Since there can be any number of digits before and after the decimal, the point "floats". The floating point unit performs arithmetic operations on decimal numbers.


If you are given the magnitude of a vector but no directionhow can you represent this vector graphically?

You cannot, unless it is a null vector. As a point.