Computer Science ›› 2026, Vol. 53 ›› Issue (10): 367-375.doi: 10.11896/jsjkx.250700073

• Computer Software • Previous Articles     Next Articles

Floating-point Expression Error Detection Based on Hierarchical Search and Interval Partitioning Analysis

NIU Mengjin, WANG Lei, ZHANG Xulin, LIANG Junda   

  1. School of Cyberspace Security,Zhongyuan University of Technology,Zhengzhou 450007, China
  • Received:2025-07-14 Revised:2025-09-29 Published:2026-10-13
  • About author:NIU Mengjin,born in 1999,postgraduate.Her main research interests include high performance computing and code security.
    WANG Lei,born in 1977,professor,is a member of CCF(No.12516M).His main research interests include high performance computing and domestic independent and controllable basic software.
  • Supported by:
    Research and Development of Basic Mathematical Library Software Based on High-Performance Computing(22001742).

Abstract: Computers represent real numbers using finite-precision binary formats,where inherent rounding errors may accumulate during computation and,in certain scenarios,lead to severe or even catastrophic failures.Floating-point error detection is cri-tical for ensuring the correctness of program outputs.Theoretically,the most accurate method for detecting floating-point errors is exhaustive search over all possible floating-point inputs.However,due to the enormous search space,this approach is practically infeasible.Given the sparsity of floating-point errors-where only a limited number of input values trigger significant errors-efficiently detecting these inputs and selecting appropriate search techniques poses a substantial challenge for maximum floating-point error detection.To address this challenge,a tool called HSIBA for error detection in floating-point expressions has been designed and implemented,based on hierarchical search and interval partitioning analysis.HSIBA employs hierarchical search by manipulating the mantissa of double-precision floating-point numbers to simulate varying precisions,combined with interval partitioning analysis.This approach detects potential maxima of floating-point errors and their corresponding inputs,which are then reported.Evaluation uses 28 expressions from the FPBench standard benchmark suite as test cases,and HSIBA is compared with the advanceddetection tools PSOED and ATOMU.Experimental results demonstrate that HSIBA outperforms PSOED on 16 test cases and ATOMU on 20 test cases.Furthermore,PSOED requires 3.15 times longer on average than HSIBA,while HSIBA exhibits inferior performance compared to ATOMU.

Key words: Floating-point operations, Rounding errors, Error detection, Hierarchical search, Interval partitioning analysis

CLC Number: 

  • TP311
[1] QI H,XU J,GUO S.Detection of the maximum error of mathematical functions[J].The Journal of Supercomputing,2018,74(11):6275-6290.
[2] XIAO A X,ZHANG S X,TANG E Y,et al.An empirical libra-ry-guided floating-point program optimization acceleration strategy[J].Chinese Journal of Computers,2022,45(9):2014-2028.
[3] HAO J W,YANG H R,XIA Y Y,et al.A floating-point expression precision optimization method based on multiple types of computation rewriting[J].Computer Science,2024,51(4):86-94.
[4] ZOU D M,ZENG M H,XIONG Y F,et al.Detecting floating-point errors via atomic conditions[C]//Proceedings of the ACM on Programming Languages.2019:1-27.
[5] CHIANG W F,GOPALAKRISHNAN G,RAKAMARIC Z,et al.Efficient search for inputs causing high floating-point errors[C]//Proceedings of the 19th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming.2014:43-52.
[6] YI X,CHEN L,MAO X,et al.Efficient automated repair ofhigh floating-point errors in numerical libraries[C]//Procee-dings of the ACM on Programming Languages(POPL).2019.
[7] WANG Z,YI X,YU H,et al.Detecting High Floating-Point Errors via Ranking Analysis[C]//2022 29th Asia-Pacific Software Engineering Conference(APSEC).2022:397-406.
[8] YAND H,XU J,HAO J,et al.Detecting Floating-Point Ex-pression Errors Based Improved PSO Algorithm[J].IET Software,2023,2023(1):6681267.
[9] POLI R,KENNEDY J,BLACKWELL T.Particle swarm optimization:An overview[J].Swarm Intelligence,2007,1:33-57.
[10] MULLER J M,BRUNIE N,DE DINECHIN F,et al.Handbook of floating-point arithmetic[M].Basel,Switzerland:Birkhäuser,2018.
[11] IEEE Computer Society.IEEE Standard for Floating Point Arithmetic:IEEE Std 754-2008[S].Piscataway,NJ:IEEE,2008:1-70.
[12] MULLER J M.On the definition of ulp(x)[R].Montbonnot,Saint Martin,France:Laboratoire de l’Informatique du Parallélisme,2005.
[13] GOLDBERG D.What every computer scientist should know about floating-point arithmetic[J].ACM Computing Surveys,1991,23(1):5-48.
[14] BAO T,ZHANG X.On-the-fly detection of instability problems in floating-point program execution[C]//Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages &Applications(OOPSLA).2013:817-832.
[15] DAMOUCHE N,MARTEL M,PANCHEKHA P,et al.To-ward a Standard Benchmark Format and Suite for Floating-Point Analysis[C]//International Workshop on Numerical Software Verification.Cham:Springer International Publishing,2016:63-77.
[16] ZOU D,WANG R,XIONG Y,et al.A genetic algorithm for detecting significant floating-pointinaccuracies[C]//2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.IEEE,2015:529-539.
[17] BENZ F,HILDEBRANDT A,HACK S.A dynamic program analysis to find floating-point accuracy problems[J].ACM SIGPLAN Notices,2012,47(6):453-462.
[18] PANCHEKHA P,SANCHEZ-STERN A,WILCOX J R,et al.Automatically improving accuracy for floating point expressions[J].ACM SIGPLAN Notices,2015,50(6):1-11.
[19] GUO H,RUBIO-GONZÁLEZ C.Efficient generation of error-inducing floating-point inputs via symbolic execution[C]//Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering.2020:1261-1272.
[20] COUSOTP,COUSOT R.Abstract interpretation:past,present and future[C]//Proceedings of the Joint Meeting of the Twenty-Third EACSL Annual Conference on Computer Science Logic(CSL) and the Twenty-Ninth Annual ACM/IEEE Symposium on Logic in Computer Science(LICS)(CSLLICS’14).Association for Computing Machinery,2004:1-10.
[21] HICKEY T,JU Q,VAN EMDEN M H.Interval arithmetic:From principles to implementation[J].Journal of the ACM,2001,48(5):1038-1068.
[22] BALDONI R,COPPA E,D’ELIAD C,et al.A Survey of Symbolic Execution Techniques[C]//ACM Computing Surveys.2018.
[23] DARULOVA E,IZYCHEVA A,NASIR F,et al.Daisy-frame-work for analysis and optimization of numerical programs(Tool Paper)[C]//Tools and Algorithms for the Construction and Analysis of Systems:24th International Conference(TACAS 2018),Held as Part of the European Joint Conferences on Theory and Practice of Software(ETAPS 2018).Springer International Publishing,2018:270-287.
[24] SOLOVYEV A,BARANOWSKI M S,BRIGGS I,et al.RigorousEstimation of Floating-Point Round-Off Errors with Symbolic Taylor Expansions[J].ACM Transactions on Programming Languages and Systems(TOPLAS),2018,41(1):1-39.
[25] DARULOVA E,KUNCAK V.Towards a compiler for reals[J].ACM Transactions on Programming Languages and Systems(TOPLAS),2017,39(2):1-28.
[1] DUAN Mengyao, XU Jinchen, YANG Hongru, ZHANG Jianing, ZHANG Tao, LI Fei, ZHOU Bei. Characterizing Floating-point Errors [J]. Computer Science, 2026, 53(6): 408-415.
[2] JI Liguang, ZHOU Bei, YANG Hongru, ZHOU Yuchang, CUI Mengqi, XU Jinchen. Parallel Detection Method of Maximum Floating-point Error Based on Gridding Particle SwarmOptimization Algorithm [J]. Computer Science, 2026, 53(2): 124-132.
[3] JI Liguang, YANG Hongru, ZHOU Yuchang, CUI Mengqi, HE Haotian, XU Jinchen. Maximum Error Parallel Detection Method Based on Locality Principle [J]. Computer Science, 2025, 52(9): 152-159.
[4] WANG Panlong, WANG Lei, YING Jinrui, LIU Bowen, GAO Zhiyong. CNFED:An Error Detection Tool for Floating-point Expressions Based on Condition Number [J]. Computer Science, 2025, 52(6A): 240800070-8.
[5] ZHANG Zhou, ZHU Jun-guo, YU Zheng-tao. Incorporating Part of Speech and Tonal Features for Vietnamese Grammatical Error Detection [J]. Computer Science, 2022, 49(11): 221-227.
[6] ZHANG Guang-mei and LI Jing-xia. Data-flow Analysis for Software Error Detection [J]. Computer Science, 2016, 43(Z6): 497-501.
[7] LI Shu-Hai WANG Yu-Min (State Key Lab. of Integrated Service Networks, Xidian Univ. , Xi'an 710071). [J]. Computer Science, 2008, 35(1): 75-76.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!