IDEAS home Printed from https://ideas.repec.org/a/tsj/stataj/v8y2008i2p255-268.html
   My bibliography  Save this article

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

Author

Listed:
  • Jean Marie Linhart

    () (StataCorp)

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.

Suggested Citation

  • Jean Marie Linhart, 2008. "Mata Matters: Overflow, underflow and the IEEE floating-point format," Stata Journal, StataCorp LP, vol. 8(2), pages 255-268, June.
  • Handle: RePEc:tsj:stataj:v:8:y:2008:i:2:p:255-268
    as

    Download full text from publisher

    File URL: http://www.stata-journal.com/article.html?article=pr0038
    Download Restriction: no

    References listed on IDEAS

    as
    1. repec:ags:stataj:119244 is not listed on IDEAS
    2. William Gould, 2006. "Mata Matters: Precision," Stata Journal, StataCorp LP, vol. 6(4), pages 550-560, December.
    3. Nicholas J. Cox, 2006. "Stata tip 33: Sweet sixteen: Hexadecimal formats and precision problems," Stata Journal, StataCorp LP, vol. 6(2), pages 282-283, June.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. repec:ags:stataj:271683 is not listed on IDEAS
    2. repec:ags:stataj:152291 is not listed on IDEAS

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:tsj:stataj:v:8:y:2008:i:2:p:255-268. See general information about how to correct material in RePEc.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: (Christopher F. Baum) or (Lisa Gilmore). General contact details of provider: http://www.stata-journal.com/ .

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service hosted by the Research Division of the Federal Reserve Bank of St. Louis . RePEc uses bibliographic data supplied by the respective publishers.