[numbers] Fixed point vs Floating point number

A fixed point number has a specific number of bits (or digits) reserved for the integer part (the part to the left of the decimal point) and a specific number of bits reserved for the fractional part (the part to the right of the decimal point). No matter how large or small your number is, it will always use the same number of bits for each portion. For example, if your fixed point format was in decimal IIIII.FFFFF then the largest number you could represent would be 99999.99999 and the smallest non-zero number would be 00000.00001. Every bit of code that processes such numbers has to have built-in knowledge of where the decimal point is.

A floating point number does not reserve a specific number of bits for the integer part or the fractional part. Instead it reserves a certain number of bits for the number (called the mantissa or significand) and a certain number of bits to say where within that number the decimal place sits (called the exponent). So a floating point number that took up 10 digits with 2 digits reserved for the exponent might represent a largest value of 9.9999999e+50 and a smallest non-zero value of 0.0000001e-49.

Examples related to numbers

• how to display a javascript var in html body • How to label scatterplot points by name? • Allow 2 decimal places in <input type="number"> • Why does the html input with type "number" allow the letter 'e' to be entered in the field? • Explanation on Integer.MAX_VALUE and Integer.MIN_VALUE to find min and max value in an array • Input type "number" won't resize • C++ - how to find the length of an integer • How to Generate a random number of fixed length using JavaScript? • How do you check in python whether a string contains only numbers? • Turn a single number into single digits Python

Examples related to computer-science

• HTML5 Canvas background image • What exactly does big ? notation represent? • Fixed point vs Floating point number • What are the differences between a program and an application? • What do we mean by Byte array? • How to determine the longest increasing subsequence using dynamic programming? • What is "entropy and information gain"? • What are the differences between NP, NP-Complete and NP-Hard? • What is the difference between statically typed and dynamically typed languages? • What is “2's Complement”?

Examples related to representation

• Malformed String ValueError ast.literal_eval() with String representation of Tuple • Fixed point vs Floating point number • How to print (using cout) a number in binary form? • Display the binary representation of a number in C?