Home  >>  Archives  >>  Volume 8 Number 2  >>  pr0038

The Stata Journal
Volume 8 Number 2: pp. 255-268



Subscribe to the Stata Journal
cover

Mata Matters: Overflow, underflow and the IEEE floating-point format

Jean Marie Linhart
StataCorp
College Station, TX
[email protected]
Abstract.   Mata is Stata’s matrix language. The Mata Matters column shows how Mata can be used interactively to solve problems and as a programming language to add new features to Stata. In this quarter’s column, we investigate underflow and overflow and then delve into the details of how floating-point numbers are stored in the IEEE 754 floating-point standard. We show how to test for overflow and underflow. We demonstrate how to use the %21x format to see underflow and the %16H, %16L, %8H, and %8L formats for displaying the byte content of doubles and floats.
Terms of use     View this article (PDF)

View all articles by this author: Jean Marie Linhart

View all articles with these keywords: underflow, overflow, denormalized number, normalized number, subnormal number, double precision, missing values, IEEE 754, format, binary, hexadecimal

Download citation: BibTeX  RIS

Download citation and abstract: BibTeX  RIS