IEEE 754
Стандард IEEE 754 прописује начине записа и интерпретацију реалних бројева у покретним зарезу на рачунарима. Данас је најшире коришћен стандард интегрисан у многе процесоре (енгл. CPU, Central processing unit) и јединице за обраду бројева у покретном зарезу (енгл. FPU, Floating point unit). Стандард дефинише формате разних величина и специјалне вредности (попут бесконачности и немогућег броја). Такође одређује и четири мода заокруживања бројева и пет изузетака (специјалних случајева).
Мотив за развој стандарда су били бројни начини записа и интерпретације који су се користили у прошлости узроковавши непреносивост софтвера између два рачунара чији процесори не користе исти стандард. Софтвер пренет између два оваква рачунара обично је радио парцијално или уопште не, а добијени резултати су било практично неупотребљиви.
Пун назив сатандарда је IEEE Standard for Binary Floating-Point Arithmetic, што значи IEEE-ов (од енгл. Institute of Electrical and Electronics Engineers) стандард за бинарну аритметику у покретном зарезу.
Формати
Следећа табела даје кратак преглед дефинисаних формата:
Формат Величина 1+r+p Фракција p Фракција при нормализованости Експонент r Вредности експонента при нормализованости Увећање експонента B једноструки 32 бита 23 бита 24 бита 8 бита 1 ≤ E ≤ 254 127 двоструки 64 бита 52 бита 53 бита 11 бита 1 ≤ E ≤ 2046 1023 једноструки проширени > 42 бита > 30 бита > 31 бит > 10 бита ≥ 1023 двоструки проширени > 78 бита > 62 бита > 63 бита > 14 бита ≥ 16383 једноструки проширени, минимум 43 бита 31 бит 32 бита 11 бита 1 ≤ E ≤ 2046 1023 двоструки проширени, минимум 79 бита 63 бита 64 бита 15 бита 1 ≤ E ≤ 32766 16383 четвороструки 128 бита 112 бита 113 бита 15 бита 1 ≤ E ≤ 32766 16383
Интерпретација
Интерпретација броја умногоме зависи од вредности експонента, а следећа табела описује њен процес за све горенаведене моделе:
Експонент Е Фракција М Интерпретација Ознака Опис E = 0 M = 0 (−1)S × 0 ±0 нула E = 0 M > 0 (−1)S × M / 2p × 21−B ±0,M × 21−B денормализоваан број 0 < E < 2r−1 (−1)S × (1+M / 2p) × 2E−B ±1,M × 2E−B нормализован број E = 2r−1 M = 0 (−1)S × ∞ ±∞ бесконачност E = 2r−1 M > 0 NaN (NaNs или NaNq) not a number немогућ број
Где су:
- r - број битова експонента
- p - број битова фракције
- S - бројевна вредност бита знака
- E - бројевна вредност експонента
- M - бројевна вредност фракције
Литература
- Goldberg, David (mart 1991). „What Every Computer Scientist Should Know About Floating-Point Arithmetic”. ACM Computing Surveys. 23 (1): 5—48. doi:10.1145/103162.103163. Архивирано из оригинала 09. 03. 2019. г. Приступљено 8. 3. 2019.
- Hecker, Chris (februar 1996). „Let's Get To The (Floating) Point” (PDF). Game Developer Magazine: 19—24. ISSN 1073-922X.
- Severance, Charles (mart 1998). „IEEE 754: An Interview with William Kahan” (PDF). IEEE Computer. 31 (3): 114—115. doi:10.1109/MC.1998.660194. Архивирано из оригинала (PDF) 28. 12. 2018. г. Приступљено 8. 3. 2019.
- Cowlishaw, Mike (jun 2003). Decimal Floating-Point: Algorism for Computers (PDF). Proceedings 16th IEEE Symposium on Computer Arithmetic. Los Alamitos, Calif.: IEEE Computer Society. стр. 104—111. ISBN 978-0-7695-1894-7. Архивирано из оригинала (PDF) 14. 12. 2014. г. Приступљено 14. 11. 2014.. (Note: Algorism is not a misspelling of the title; see also algorism.)
- Monniaux, David (maj 2008). „The pitfalls of verifying floating-point computations”. ACM Transactions on Programming Languages and Systems. 30 (3): 1—41. ISSN 0164-0925. arXiv:cs/0701192
. doi:10.1145/1353445.1353446.: A compendium of non-intuitive behaviours of floating-point on popular architectures, with implications for program verification and testing. - Muller, Jean-Michel; Brunie, Nicolas; de Dinechin, Florent; Jeannerod, Claude-Pierre; Joldes, Mioara; Lefèvre, Vincent; Melquiond, Guillaume; Revol, Nathalie; Torres, Serge (2018) [2010]. Handbook of Floating-Point Arithmetic (2 изд.). Birkhäuser. ISBN 978-3-319-76525-9. doi:10.1007/978-3-319-76526-6.
- Overton, Michael L. (2001). Написано на Courant Institute of Mathematical Sciences, New York University, New York, USA. Numerical Computing with IEEE Floating Point Arithmetic (1 изд.). Philadelphia, USA: SIAM. ISBN 978-0-89871-482-1. doi:10.1137/1.9780898718072. 978-0-89871-571-2, 0-89871-571-7.
- Cleve Moler on Floating Point numbers
- Beebe, Nelson H. F. (22. 8. 2017). The Mathematical-Function Computation Handbook - Programming Using the MathCW Portable Software Library (1 изд.). Salt Lake City, UT, USA: Springer International Publishing AG. ISBN 978-3-319-64109-6. LCCN 2017947446. doi:10.1007/978-3-319-64110-2.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.