Towards platform-independent verification of the standard mathematical functions: the square root function
Abstract
The paper presents (human-oriented) specification and (pen-and-paper) verification of the square root function. The function implements Newton method and uses a look-up table for initial approximations. Specification is done in terms of total correctness assertions with use of precise arithmetic and the mathematical square root $\sqrt{\dots}$, algorithms are presented in pseudo-code with explicit distinction between precise and machine arithmetic, verification is done in Floyd-Hoare style and adjustment (matching) of runs of algorithms with precise arithmetic and with machine arithmetic. The primary purpose of the paper is to make explicit properties of the machine arithmetic that are sufficient to make verification presented in the paper. Computer-aided implementation and validation of the proofs (using some proof-assistant) is the topic for further studies.
- Publication:
-
arXiv e-prints
- Pub Date:
- January 2018
- DOI:
- 10.48550/arXiv.1801.00969
- arXiv:
- arXiv:1801.00969
- Bibcode:
- 2018arXiv180100969S
- Keywords:
-
- Computer Science - Logic in Computer Science;
- F.3.1
- E-Print:
- 25 pages, 7 figures, full version with complete proofs