arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2108.06756cs.MS
收藏

RLIBM-ALL:一种新的多项式逼近方法,用于产生正确的多个表示和舍入模式的舍入结果

RLIBM-ALL: A Novel Polynomial Approximation Method to Produce Correctly Rounded Results for Multiple Representations and Rounding Modes

Jay P. Lim, Santosh Nagarakatte

摘要:

浮点(FP)的主流数学库不能为所有输入生成正确的舍入结果。相比之下,CR-LIBM和RLIBM为特定的FP表示提供了一种舍入模式的正确舍入实现。将此类库用于具有新舍入模式或具有不同精度的表示将由于双重舍入而导致错误结果。本文提出了一种新的方法来生成一个单一的多项式近似,产生正确的四舍五入的结果,为所有输入的多个舍入模式和多个精度配置。为了生成$n$ -位的正确舍入库,我们的关键思想是使用\emph{round-to-odd}模式为具有$n+2$ -位的表示生成这样的多项式近似。我们证明,由此产生的多项式近似将产生正确的舍入结果,所有五个舍入模式的标准和多个表示与$k$位,使$|E| +1 < k \leq n$,其中$|E|$是指数位的表示。基于我们在RLIBM项目中的先前工作,当我们使用舍入到奇数模式生成具有$n+2$位的库时,我们也近似正确舍入的结果。我们还通过将其构造为线性规划问题来生成多项式近似,但提出了对多项式生成的增强以处理舍入到奇数模式。我们的原型是第一个32位浮点库,它使用IEEE标准中的所有舍入模式,通过单个多项式近似为所有输入生成正确的舍入结果。它还为从10位到32位的任何FP配置生成正确的舍入结果,同时比主流库更快。

英文摘要:

Mainstream math libraries for floating point (FP) do not produce correctly rounded results for all inputs. In contrast, CR-LIBM and RLIBM provide correctly rounded implementations for a specific FP representation with one rounding mode. Using such libraries for a representation with a new rounding mode or with different precision will result in wrong results due to double rounding. This paper proposes a novel method to generate a single polynomial approximation that produces correctly rounded results for all inputs for multiple rounding modes and multiple precision configurations. To generate a correctly rounded library for $n$-bits, our key idea is to generate such a polynomial approximation for a representation with $n+2$-bits using the \emph{round-to-odd} mode. We prove that the resulting polynomial approximation will produce correctly rounded results for all five rounding modes in the standard and for multiple representations with $k$-bits such that $|E| +1 < k \leq n$, where $|E|$ is the number of exponent bits in the representation. Building on our prior work in the RLIBM project, we also approximate the correctly rounded result when we generate the library with $n+2$-bits using the round-to-odd mode. We also generate polynomial approximations by structuring it as a linear programming problem but propose enhancements to polynomial generation to handle the round-to-odd mode. Our prototype is the first 32-bit float library that produces correctly rounded results with all rounding modes in the IEEE standard for all inputs with a single polynomial approximation. It also produces correctly rounded results for any FP configuration ranging from 10-bits to 32-bits while also being faster than mainstream libraries.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑