摘要
"万能的计算机是不会出现计算错误的"。但实际上,依然存在程序运行后无法得到正确数值的情况。其中,小数运算就是一个典型的例子。本文论述计算机进行小数处理的机制,并了解计算机在运算时为什么会出错,以及应该如何避免出错。
"A universal computer will not make mistakes in calculation.".But in fact,there are still cases when the program cannot get the correct value after running.Among them,decimal operation is a typical example.This paper discusses the mechanism of decimal processing by computer,and understands why computers make mistakes in operation and how to avoid them.
作者
张纯
徐晓海
ZHANG Chun;XU Xiaohai(Xuancheng Municipal School of Information Engineering in Anhui Province,Xuancheng 242000)
出处
《办公自动化》
2020年第19期35-38,共4页
Office Informatization
关键词
运算
程序
数制
浮点数
Operation
Program
Numerical system
Floating number