Elementary function operations such as sin and exp cannot in general be computed exactly on today's digital computers, and thus have to be approximated. The standard approximations in library functions typically provide only a limited set of precisions, and are too inefficient for many applications. Polynomial approximations that are customized to a limited input domain and output accuracy can provide superior performance. In fact, the Remez algorithm computes the best possible approximation for a given polynomial degree, but has so far not been formally verified. This paper presents Dandelion, an automated certificate checker for polynomial approximations of elementary functions computed with Remez-like algorithms that is fully verified in the HOL4 theorem prover. Dandelion checks whether the difference between a polynomial approximation and its target reference elementary function remains below a given error bound for all inputs in a given constraint. By extracting a verified binary with the CakeML compiler, Dandelion can validate certificates within a reasonable time, fully automating previous manually verified approximations.
翻译:基本功能,如罪和解析,一般不能完全在今天的数字计算机上计算,因此必须加以近似。图书馆函数的标准近似值通常只提供有限的精确度,而且对于许多应用程序来说效率太低。按有限的输入域定制的多元近近似值和产出精度可以提供优异的性能。事实上, Remez 算法计算出某一多元度的最佳近似值,但迄今尚未正式核实。本文展示了Dandelion, 这是一种自动证书检查器, 用来检查基本功能的多元近近似值。 该算法在 HOL4 理论验证中充分验证的 Remez 类算法。 Dandelion 检查多元近似值与其目标参考基本功能之间的差值是否仍然低于在给定的限制下所有输入的设定误差。 通过与 CakeML 编译程序提取经核实的二进制, Dandelion 可以在合理时间内验证证书, 完全自动化地校验前手动的近近度。