Mikaitis, M. orcid.org/0000-0001-8706-1436, Giordano, M. orcid.org/0000-0002-7218-2873 and Rizyal, T. orcid.org/0009-0002-3907-1060 (2026) Accuracy of Mathematical Functions in Julia. ACM Transactions on Mathematical Software. ISSN: 0098-3500
Abstract
Basic computer arithmetic operations are correctly rounded, whilst mathematical functions such as ��, ln(�), or sin(�) ingeneral are not, meaning that implementations may provide different results when presented with the same input, differing inaccuracy. We present a methodology and a software tool suited for exhaustive and non-exhaustive testing of mathematicalfunctions in the Julia programming language. The software (a test bench) is designed to be easy to set up for running theaccuracy tests in automatic regression testing. Users only need to supply a list of formats, choose the rounding modes, andspecify the input space search strategies based on how long they can afford the testing to run. We have utilized the test benchto determine the errors of a subset of mathematical functions in Julia 1.12.7, for binary16, binary32, and binary64 IEEE 754floating-point formats, and found maximum errors of 0.4998 to 0.5002ULPs in binary16, and 0.49 to 2.41ULPs in binary32and 0.49 to 2.46ULPs in binary64. The functions that are correctly rounded (error below 0.5ULP) in binary16 and binary32 aresqrt and cbrt, and only sqrt in binary64. The following functions are correctly rounded only for binary16: asin, atanh, cospi,log2, sinh, sinpi, tanh.
Metadata
| Item Type: | Article |
|---|---|
| Authors/Creators: |
|
| Keywords: | floating point; elementary functions; mathematical software; correct rounding; exponential;logarithm; IEEE 754 standard |
| Dates: |
|
| Institution: | The University of Leeds |
| Academic Units: | The University of Leeds > Faculty of Engineering & Physical Sciences (Leeds) > School of Computing (Leeds) > Computation Science & Engineering |
| Funding Information: | Funder Grant number EPSRC Accounts Payable OPP136 |
| Date Deposited: | 04 Nov 2026 11:16 |
| Last Modified: | 06 Nov 2026 09:42 |
| Status: | Published online |
| Publisher: | Association for Computing Machinery (ACM) |
| Identification Number: | 10.1145/3860891 |
| Open Archives Initiative ID (OAI ID): | oai:eprints.whiterose.ac.uk:247357 |

CORE (COnnecting REpositories)
CORE (COnnecting REpositories)