IEEE(Institude of Electrical and Electronics Engineers)에 의해 제정된 IEEE Standard 754는 부동 소수점 숫자에 대한 두 가지 기본 형식을 제공한다. single precision(32비트), double precision(64비트)


숫자들은 과학적 표기법(지수 표기법) 형태로 저장되며, 각각의 숫자는 세가지 요소(a sign, an exponent, a fraction)으로 구성되어 있다. 

exponent를 위해 예약된(reserved) 비트 수에 의해 숫자가 얼마나 클(작을) 수 있는지 결정된다.

fraction을 위해 예약된 비트의 수는 정확도를 결정한다.


single-precision에서는 exponent의 길이가 8비트이고, fraction은 23비트이다. 그 결과 single-precision number의 최대값은 대략 3.40 X 10^38이며, 정확도는 십진수로 약 6개의 숫자이다(with a precision of about 6 decimal digits).


IEEE 표준에는 두 가지 다른 포맷도 있는데, single extended precision과 double extended precision이다. 표준에서는 각 포맷의 비트 수를 명시하고 있지는 않으나, single extended 타입의 경우 최소 43비트를, double extended type의 경우 최소 79비트를 차지해야 한다.


더 자세한 사항은, What Every Computer Scientist Should Know About Floating-Point Arithmetic, by David Goldberg, published in the March, 1991 issue of Computing Surveys


+ Recent posts