We present the automatic formal verification of a state-of-the-art algorithm from the GMP library that computes the square root of a 64-bit integer. Although it uses only integer operations, the best way to understand the program is to view it as a fixed-point arithmetic algorithm that implements Newton's method. The C code is short but intricate, involving magic constants and intentional arithmetic overflows. We have verified the algorithm using the Why3 tool and automated solvers such as Gappa.
In 2019, Melquiond et al. presented a paper about the formal verification of the GMP library's algorithm for calculating the square root of a 64-bit integer using Why3 REF .
Formal Verification of a State-of-the-Art Integer Square Root
2019 IEEE 26th Symposium on Computer Arithmetic (ARITH)
2019 IEEE 26th Symposium on Computer Arithmetic (ARITH)
Computer Science