Lucas M. Dutton, Christopher Kumar Anand, Robert Enenkel, Silvia Melitta Müller
{"title":"浮点倒数、除法和平方根的不精确性和修正","authors":"Lucas M. Dutton, Christopher Kumar Anand, Robert Enenkel, Silvia Melitta Müller","doi":"arxiv-2404.00387","DOIUrl":null,"url":null,"abstract":"Floating-point arithmetic performance determines the overall performance of\nimportant applications, from graphics to AI. Meeting the IEEE-754 specification\nfor floating-point requires that final results of addition, subtraction,\nmultiplication, division, and square root are correctly rounded based on the\nuser-selected rounding mode. A frustrating fact for implementers is that naive\nrounding methods will not produce correctly rounded results even when\nintermediate results with greater accuracy and precision are available. In\ncontrast, our novel algorithm can correct approximations of reciprocal,\ndivision and square root, even ones with slightly lower than target precision.\nIn this paper, we present a family of algorithms that can both increase the\naccuracy (and potentially the precision) of an estimate and correctly round it\naccording to all binary IEEE-754 rounding modes. We explain how it may be\nefficiently implemented in hardware, and for completeness, we present proofs\nthat it is not necessary to include equality tests associated with\nround-to-nearest-even mode for reciprocal, division and square root functions,\nbecause it is impossible for input(s) in a given precision to have exact\nanswers exactly midway between representable floating-point numbers in that\nprecision. In fact, our simpler proofs are sometimes stronger.","PeriodicalId":501256,"journal":{"name":"arXiv - CS - Mathematical Software","volume":"25 1","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2024-03-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Inexactness and Correction of Floating-Point Reciprocal, Division and Square Root\",\"authors\":\"Lucas M. Dutton, Christopher Kumar Anand, Robert Enenkel, Silvia Melitta Müller\",\"doi\":\"arxiv-2404.00387\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Floating-point arithmetic performance determines the overall performance of\\nimportant applications, from graphics to AI. Meeting the IEEE-754 specification\\nfor floating-point requires that final results of addition, subtraction,\\nmultiplication, division, and square root are correctly rounded based on the\\nuser-selected rounding mode. A frustrating fact for implementers is that naive\\nrounding methods will not produce correctly rounded results even when\\nintermediate results with greater accuracy and precision are available. In\\ncontrast, our novel algorithm can correct approximations of reciprocal,\\ndivision and square root, even ones with slightly lower than target precision.\\nIn this paper, we present a family of algorithms that can both increase the\\naccuracy (and potentially the precision) of an estimate and correctly round it\\naccording to all binary IEEE-754 rounding modes. We explain how it may be\\nefficiently implemented in hardware, and for completeness, we present proofs\\nthat it is not necessary to include equality tests associated with\\nround-to-nearest-even mode for reciprocal, division and square root functions,\\nbecause it is impossible for input(s) in a given precision to have exact\\nanswers exactly midway between representable floating-point numbers in that\\nprecision. In fact, our simpler proofs are sometimes stronger.\",\"PeriodicalId\":501256,\"journal\":{\"name\":\"arXiv - CS - Mathematical Software\",\"volume\":\"25 1\",\"pages\":\"\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-03-30\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Mathematical Software\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2404.00387\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Mathematical Software","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2404.00387","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Inexactness and Correction of Floating-Point Reciprocal, Division and Square Root
Floating-point arithmetic performance determines the overall performance of
important applications, from graphics to AI. Meeting the IEEE-754 specification
for floating-point requires that final results of addition, subtraction,
multiplication, division, and square root are correctly rounded based on the
user-selected rounding mode. A frustrating fact for implementers is that naive
rounding methods will not produce correctly rounded results even when
intermediate results with greater accuracy and precision are available. In
contrast, our novel algorithm can correct approximations of reciprocal,
division and square root, even ones with slightly lower than target precision.
In this paper, we present a family of algorithms that can both increase the
accuracy (and potentially the precision) of an estimate and correctly round it
according to all binary IEEE-754 rounding modes. We explain how it may be
efficiently implemented in hardware, and for completeness, we present proofs
that it is not necessary to include equality tests associated with
round-to-nearest-even mode for reciprocal, division and square root functions,
because it is impossible for input(s) in a given precision to have exact
answers exactly midway between representable floating-point numbers in that
precision. In fact, our simpler proofs are sometimes stronger.