Article
Compiler support for floating-point computation
Article first published online: 30 OCT 2006
DOI: 10.1002/spe.4380180709
Copyright © 1988 John Wiley & Sons, Ltd
Additional Information
How to Cite
Farnum, C. (1988), Compiler support for floating-point computation. Software: Practice and Experience, 18: 701–709. doi: 10.1002/spe.4380180709
Publication History
- Issue published online: 30 OCT 2006
- Article first published online: 30 OCT 2006
- Manuscript Revised: 21 DEC 1987
- Manuscript Received: 24 MAR 1987
Funded by
- U.S. NSF Graduate Fellowship
- Defense Advanced Research Projects Agency (DoD). Grant Number: 4871
- Space and Naval Warfare Systems Command. Grant Number: N00039-84-C-0089
- Abstract
- References
- Cited By
Keywords:
- Compilers;
- Floating-point arithmetic;
- Optimization
Abstract
Predictability is a basic requirement for compilers of floating-point code—it must be possible to determine the exact floating-point operations that will be executed for a particular source-level construction. Experience shows that many compilers fail to provide predictability, either because of an inadequate understanding of its importance or from an attempt to produce locally better code. Predictability can be attained through careful attention to code generation and a knowledge of the common pitfalls. Most language standards do not completely define the precision of floating-point operations, and so a good compiler must also make a good choice in assigning precisions of subexpression computation. Choosing the widest precision that will be used in the expression usually gives the best trade-off between efficiency and accuracy. Finally, certain optimizations are particularly useful for floating-point and should be included in a compiler aimed at scientific computation. But predictability is more important than efficiency; obtaining incorrect answers fast helps no one.

1097-024X/asset/olbannerleft.jpg?v=1&s=2d7d001211f2c40f177a231141601e9f52afc1f3)
1097-024X/asset/olbannerright.jpg?v=1&s=3aec7891a8ba78b361ead9743adfc0b6eae6369a)
1097-024X/asset/cover.gif?v=1&s=5a70ecca2928358eca4ff75b9921d0552ffb6539)