Digital computation is central to almost all scientific endeavors and has become integral to university physics education. Students collect experimental data using digital devices, process data using spreadsheets and graphical software, and develop scientific programming skills for modeling, simulation, and computational work. Issues associated with the floating-point representation of numbers are rarely explored. In this article, problems of floating point are divided into three categories: significant-figure limits, propagation of floating-point representation error, and rounding. For each category, examples are presented of unexpected ways, in which the digital representation of floating-point numbers can impact the veracity of scientific results. These examples cover aspects of classical dynamics, numerical integration, cellular automata, statistical analysis, and digital timing. Suggestions are made for curriculum enhancement and project-style investigations that reinforce the issues covered at a level suitable for physics undergraduate students.

Supplementary Material

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.