检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:郝江伟 杨鸿儒 夏媛媛 刘毅 许瑾晨[1,2] 庞建民 HAO Jiangwei;YANG Hongru;XIA Yuanyuan;LIU Yi;XU Jinchen;PANG Jianmin(School of Cyberspace Security,Information Engineering University,Zhengzhou 450001,China;State Key Laboratory of Mathematical Engineering and Advanced Computing,Wuxi,Jiangsu 214125,China;Institute of Software,Chinese Academy of Sciences,Beijing 100190,China)
机构地区:[1]信息工程大学网络空间安全学院,郑州450001 [2]数学工程与先进计算国家重点实验室,江苏无锡214125 [3]中国科学院软件研究所天基综合信息系统重点实验室,北京100190
出 处:《计算机科学》2024年第4期86-94,共9页Computer Science
基 金:数学工程与先进计算国家重点实验室开放基金(2023B02)。
摘 要:表达式重写是精度优化领域的新兴方法,其核心思想是在不改变表达式精度类型的前提下,将其变换为语义上等价的表达式以尝试提升精度。然而,面对庞大的变换规则和变换空间,如何选取合适的变换策略成为了重写方法的问题所在。针对上述问题,提出了一个基于多类型计算重写的浮点表达式精度优化方法,支持包括函数计算、四则运算的表达式,并实现了表达式重写工具exprAuto。区别于其他精度优化工具侧重于对子表达式的替换,exprAuto更注重对表达式运算顺序的变换。exprAuto在对表达式化简和数学变换后,通过多项式变换获取不同的计算顺序,并尝试减少运算次数以提升精度,最终生成一个包含不同计算顺序的等价表达式集合,通过排序筛选和误差检测从中选出最终的精度优化结果。文中选取41个FPBench标准集中的表达式和18个常见数学函数的近似多项式作为测试用例,在经exprAuto优化后,所提方法相比原式最大误差降低了45.92%,平均误差降低了34.98%;针对其中的18个近似多项式,相比原式最大误差降低了58.35%,平均误差降低了43.73%。实验结果表明,exprAuto可以有效提升表达式尤其是多项式的精度。Expression rewriting is an emerging method in the field of precision optimization.Its core idea is to transform an expression into a semantically equivalent expression without changing its precision representation to improve precision.However,given the large number of transformation rules and the huge transformation space,the problem of the rewriting method is how to choose an appropriate transformation strategy.In response to the above problems,this paper proposes a precision optimization method for floating-point expressions based on multi-type calculation rewriting,which supports expressions including mathematical function calculations and four arithmetic calculations,and implements an expression rewriting tool exprAuto.Unlike other precision optimization tools that focus on replacing sub-expressions,exprAuto pays more attention to transform the order of expression operations.After the expression is simplified and mathematically transformed,exprAuto obtains different calculation orders through polynomial transformation,and tries to improve the precision by reducing the number of operations.Finally,exprAuto generates an equivalent set of expressions with different calculation orders and selects the final precision optimization result through sorting screening and error detection.In this paper,41 expressions from the FPBench standard set and 18 approximate polynomials of common mathematical functions are selected as test cases.After exprAuto optimization,the maximum error is reduced by 45.92%and the average error is reduced by 34.98%compared to the original expression.For 18 approximate polynomials,the maximum error is reduced by 58.35%,and the average error is reduced by 43.73%.Experimental results show that exprAuto can effectively improve the precision of expressions,especially polynomials.
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.30