I received minuses three times due to external hyper references. So I preferer to no point to any extra resource of infomation like (http://homepages.math.uic.edu/~jan/mcs471/Lec3/ieee754.pdf, https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF)
Source Link

A lot of good answers have been posted, but I'd like to append one more.

Not all numbers can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even though you can type 0.2 easily, FLT_RADIX and DBL_RADIX is 2; not 10 for a computer with FPU which uses "IEEE Standard for Binary Floating-Point Arithmetic "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)"(ISO/IEEE Std 754-1985)".

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers have been posted, but I'd like to append one more.

Not all numbers can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even though you can type 0.2 easily, FLT_RADIX and DBL_RADIX is 2; not 10 for a computer with FPU which uses "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)".

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers have been posted, but I'd like to append one more.

Not all numbers can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even though you can type 0.2 easily, FLT_RADIX and DBL_RADIX is 2; not 10 for a computer with FPU which uses "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)".

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

reference added, grammatical improvements made
Source Link

A lot of good answers washave been posted, but I'd like to append one more.

Not all numbernumbers can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even though you can type 0.2 easily, but FLT_RADIX and DBL_RADIX is 22; not 10 for a computer with FPU which used "IEEE Standard for Binary Floating-Point Arithmeticuses (ISO/IEEE Std 754-1985)""IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)".

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers was been posted, but I'd like to append one more.

Not all number can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even you can type 0.2 easily, but FLT_RADIX and DBL_RADIX is 2 not 10 for computer with FPU which used "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)"

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers have been posted, but I'd like to append one more.

Not all numbers can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even though you can type 0.2 easily, FLT_RADIX and DBL_RADIX is 2; not 10 for a computer with FPU which uses "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)".

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

edited body
Source Link
Scott Stensland
  • 24.5k
  • 12
  • 86
  • 96

A lot of good answers was been posted, but I'd like to append one more.

Not all number can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standartstandard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even you can type 0.2 easily, but FLT_RADIX and DBL_RADIX is 2 not 10 for computer with FPU which used "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)"

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers was been posted, but I'd like to append one more.

Not all number can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standart.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even you can type 0.2 easily, but FLT_RADIX and DBL_RADIX is 2 not 10 for computer with FPU which used "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)"

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

A lot of good answers was been posted, but I'd like to append one more.

Not all number can be represented via floats/doubles For example, the number "0.2" will be represented as "0.200000003" in single precision in IEEE754 float point standard.

Model for store real numbers under the hood represent float numbers as

enter image description here

Even you can type 0.2 easily, but FLT_RADIX and DBL_RADIX is 2 not 10 for computer with FPU which used "IEEE Standard for Binary Floating-Point Arithmetic (ISO/IEEE Std 754-1985)"

So it is a bit hard to represent such numbers exactly. Even if you specify this variable explicitly without any intermediate calculation.

append picture and more description
Source Link
Loading
Source Link
Loading