Accuracy of Mathematical Functions in Julia
Mantas Mikaitis, Mosè Giordano, Tejaswa Rizyal
Source abstract
Basic computer arithmetic operations are correctly rounded, whilst mathematical functions such as , , or in general are not, meaning that implementations may provide different results when presented with the same input, differing in accuracy. We present a methodology and a software tool suited for exhaustive and non-exhaustive testing of mathematical functions in the Julia programming language. The software (a test bench) is designed to be easy to set up for running the accuracy tests in automatic regression testing. Users only need to supply a list of formats, choose the rounding modes, and specify the input space search strategies based on how long they can afford the testing to run. We have utilized the test bench to determine the errors of a subset of mathematical functions in Julia 1.12.7, for binary16, binary32, and binary64 IEEE 754 floating-point formats, and found maximum errors of to ULPs in binary16, and to ULPs in binary32 and to ULPs in binary64. The functions that are correctly rounded (error below ULP) in binary16 and binary32 are sqrt and cbrt, and only sqrt in binary64. The following functions are correctly rounded only for binary16: asin, atanh, cospi, log2, sinh, sinpi, tanh.
Evidence graph
No public relationships recorded yet.
Integrity note: This page is a factual metadata record created by deterministic ingestion. It is not a claim that the work moves a mathematical frontier or has been independently verified.