首页 | 官方网站   微博 | 高级检索  
     

一种报表数据舍入误差调整算法
引用本文:贾银山,郑雅萍,贾传荧,秦固,王娜.一种报表数据舍入误差调整算法[J].辽宁石油化工大学学报,2001,21(3):58-60.
作者姓名:贾银山  郑雅萍  贾传荧  秦固  王娜
作者单位:1. 抚顺石油学院计算机科学与技术系;沈阳东大阿尔派,
2. 大连海事大学航海技术研究所,
摘    要:当报表的数据精度降低时 ,由传统四舍五入方法产生的某些行、列或整个报表的累计舍入误差可能超过可接受的范围。介绍了一种用于调整由报表数据的精度降低所产生的误差的算法。算法的基本原理是从报表的左上角数据项开始 ,按逐行或逐列的方式对报表中每一数据项经四舍五入后的舍入误差按 1∶1的比例分别传递给其右方和下方的数据项 ;对于只有右方或下方数据项的数据项 ,则将舍入误差全部传递给右方或下方数据项 ;对于没有右方和下方数据项的数据项 ,则丢弃舍入误差。并对该算法与传统的四舍五入方法产生的单个数据项误差以及整行、整列和整个报表的最大累计误差进行了比较 ,结果表明该算法可以降低累计误差。最后用C语言给出了算法的详细描述。

关 键 词:报表  矩阵  舍入误差  数据精度  算法
文章编号:1005-3883(2001)03-0058-03
修稿时间:2001年12月4日

An Algorithm for Adjusting Rounding Errors of Data in Reports
JIA Yin-shan ,ZHENG Ya-ping ,JIA Chuan-ying ,QIN Gu ,WANG Na.An Algorithm for Adjusting Rounding Errors of Data in Reports[J].Journal of Liaoning University of Petroleum & Chemical Technology,2001,21(3):58-60.
Authors:JIA Yin-shan    ZHENG Ya-ping  JIA Chuan-ying  QIN Gu  WANG Na
Affiliation:JIA Yin-shan 1,3,ZHENG Ya-ping 2,JIA Chuan-ying 3,QIN Gu 3,WANG Na 3
Abstract:When the data precision is decreased, the maximum accumulative error of certain row, certain column or the whole report may go beyond limit. In this paper, an algorithm used to adjust errors resulted from the change of data precision in reports is introduced. The basic principle of the algorithm is to transfer half of the round error of each item to its' right-following item and bottom-following item respectively, from the top-left data item to the bottom-right item. If a item only has right-following item or bottom-following item,then to transfer the round error to right-following item or bottom-following item. The error of a data item and the maximum accumulated errors in a row ,a column or whole report produced by traditional method are compared with that produced by new algorithm in theory.The result indicated that the new algorithm can reduce the maximum accumulated errorsin a row ,a column, and whole report. Finally, the program is presented in C language.
Keywords:Reports  Matrix  Rounding error  Data precision  Algorithm  
本文献已被 CNKI 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号