Merge #689: Remove "except in benchmarks" exception for fp math
bde2a32286Convert bench.h to fixed-point math (Wladimir J. van der Laan) Pull request description: Convert `bench.h` to fixed-point math, removing all use of float math from the repository: - Use 64-bit integer microsecond timestamps - Use decimal fixed-point math for formatting numbers It turned out to be a little trickier than I expected because of formatting and rounding. But, output should be the same before and after. I used the following to test the number formatting: https://gist.github.com/laanwj/f971bfbe018e39c19677a21ff954d0c7 ACKs for top commit: real-or-random: ACKbde2a32286I've read the code in detail and I've tested it. I haven't explicitly tested the formatting function with known/hardcoded inputs. Tree-SHA512: 41ab6024b88c65a4b194272097c70d527bedb396dc7ab9d3d93165f1a19d31092798370f66399443a8d5393d0a6dcf5825679de5a325550865cfdef3586bf64c
This commit is contained in:
@@ -23,7 +23,7 @@ Implementation details
|
||||
* Extensive testing infrastructure.
|
||||
* Structured to facilitate review and analysis.
|
||||
* Intended to be portable to any system with a C89 compiler and uint64_t support.
|
||||
* No use of floating types, except in benchmarks.
|
||||
* No use of floating types.
|
||||
* Expose only higher level interfaces to minimize the API surface and improve application security. ("Be difficult to use insecurely.")
|
||||
* Field operations
|
||||
* Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
|
||||
|
||||
Reference in New Issue
Block a user