June 15, 2014
June 15, 2014
June 18, 2014
Computers in Education
24.627.1 - 24.627.19
FPAvisual: A Tool for Visualizing the Effects of Floating-Point Finite-Precision ArithmeticAbstract:Many students in science and engineering do not realize how program correctness may beimpacted when floating-point finite precision arithmetic is used. In this paper, we presentFPAvisual, a visualization tool that helps instructors teach the reasons for the inaccuracies causedby floating-point arithmetic (FPA), their impact and significance in programs, and the techniquesto prevent errors from propagating. FPAvisual contains four components, namely Associative Law,Pentagon, Roots, and the Sine Function. Associative Law demonstrates how algebraicallyequivalent formulas computed by changing the order of operations can yield different results.Pentagon demonstrates that accumulation of errors emanating from finite precision in geometriccomputations may result in large positional errors. Roots shows that the solution for a quadraticequation will be incorrect when two numbers that need to be subtracted are very close inmagnitude or when one is much larger than the other. The program presents possible solutions tothese subtraction problems. The Sine Function component shows that results vary when the sameinfinite series for sine is used but computed in different ways. These four components allow theusers set up parameters of the specific problem represented, trace the results step by step, seewhen differences in results start to occur, and visualize how errors accumulate. They help studentsunderstand the ubiquity of issues with FPA, realize the significance of FPA in a multitude ofcontexts, and compare the methods to minimize the negative effects of FPA. FPAvisual has beenclassroom tested and evaluated by computer science students. We report our findings in this paper.
Gu, Y., & Onder, N., & Shene, C., & Wang, C. (2014, June), FPAvisual: A Tool for Visualizing the Effects of Floating-Point Finite-Precision Arithmetic Paper presented at 2014 ASEE Annual Conference & Exposition, Indianapolis, Indiana. https://peer.asee.org/20518
ASEE holds the copyright on this document. It may be read by the public free of charge. Authors may archive their work on personal websites or in institutional repositories with the following citation: © 2014 American Society for Engineering Education. Other scholars may excerpt or quote from these materials with the same citation. When excerpting or quoting from Conference Proceedings, authors should, in addition to noting the ASEE copyright, list all the original authors and their institutions and name the host city of the conference. - Last updated April 1, 2015