HerbGrind: A Tool to Find Floating Point Errors
HerbGrind: A Tool to Find Floating Point Errors
Written by Alex Armstrong   
Thursday, 01 June 2017

Floating point is the numerical format used for most calculations and we tend to trust it, but this trust is misplaced. Floating point calculations can be so wrong that they resemble noise. Now there is a way to automatically detect when things go wrong.

Researchers Alex Sanchez-Stern, Pavel Panchekha, Sorin Lerner, and Zachary Tatlock from UCSD and University of Washington have a new tool for you that can find problems with floating point calculations.

If you think that floating point error are minor then consider this:

Large fƒoating point applications play a central role in science, engineering, and f€nance by enabling engineers to approximately compute with real numbers. Ensuring that these applications provide accurate results (close to the ideal real number answer) has been a challenge for decades. Inaccuracy due to rounding errors has led to market distortions, retracted scienti€c articles and incorrect election results.

The proposed solution is Herbgrind:

a dynamic binary analysis that identi€es candidate root causes for numerical error in large ƒoating point applications. Herbgrind uses a variety of techniques to address the challenges of €finding root causes in large programs.

First, to identify silent ƒfoating-point error, Herbgrind follows past work by instrumenting a program to compute high-precision ƒfoating-point operations in parallel with regular IEEE-754 operations and then comparing high- and regular-precision results to identify errors.

Second, to avoid false positives due to non-compositional foating-point error, Herbgrind only reports certain candidate root causes, for example those that ƒflow to program outputs or cause changes to control ƒflow.

ThŒird, to describe a candidate root cause, Herbgrind tracks erroneous computations and abstracts them to simplfi€ed expressions whose improvement would reduce output error.

The paper has some examples of floating point problems that are detected by Herbgrind and then are easy to correct. for example the plot of a particular complex function before and after correcting a floating point problem:

floating1

The correct plot is on the right.

The good news is that Herbgrind is open source and you can get it from GitHub:

Herbgrind is free software (free as in freedom, but you also don't need to pay anything), and is publicly available on github. It's still a work in progress, and as such will not work on every machine or application. If you'd like to contribute, please get in touch or send a pull request!

Herbgrind currently primarily supports 64-bit Linux, but 32-bit might also work, and there is some work in progress to support OSX.

herbgrind

More Information

http://herbgrind.ucsd.edu/

https://github.com/uwplse/herbgrind

Finding Root Causes of Floating Point Error with Herbgrind

Related Articles

Better Than Floating - New Number Format Avoids Imprecision

Let HERBIE Make Your Floating Point Better

MathJS A Math Library For JavaScript

Free Sage Math Cloud - Python And Symbolic Math

Floating Point Numbers

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on, Twitter, FacebookGoogle+ or Linkedin.

 

Banner


The Shape Of Classification Space Is Mostly Flat
31/05/2017

All classification rules can be thought of as dividing up high dimensional spaces into areas that belong to different groups. Neural networks are no different, but until now we haven't had much insigh [ ... ]



MicroPython Demoed Running Bare Metal In Browser
13/06/2017

The developers of MicroPython have developed the ability to run MicroPython "bare metal" in a web browser. MicroPython is an implementation of Python optimised to run on microcontrollers and in constr [ ... ]


More News

 
 

 

blog comments powered by Disqus

Last Updated ( Thursday, 01 June 2017 )
 
 

   
Banner
Banner
RSS feed of news items only
I Programmer News
Copyright © 2017 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.