Commit Graph

6 Commits

Author SHA1 Message Date
Daniel Mendler
ca6924b7e6
add error code MP_OVF for integer overflow (too many digits) 2019-12-23 11:12:42 +01:00
Daniel Mendler
08d281c462
introduce MP_MAX_DIGIT_COUNT to prevent overflow 2019-12-05 10:52:41 +01:00
Daniel Mendler
3a744dc46d
s_mp_radix_size_overestimate: remove overflow check 2019-12-05 00:40:04 +01:00
Daniel Mendler
795cd2013f
simplifications: add s_mp_zero_(digs|buf) and s_mp_copy_digs
Originally I made those as macros. However we have many
other small functions like mp_clamp, mp_exch which are also not implemented
as macros right now.

If we would use c99, I would implement them as private static inline
functions. And mp_exch would be a public static inline function.

But since we are bound to c89, we simply use normal functions.
To achieve optimal performance one should either use link time
optimization or amalgamation.
2019-11-04 15:41:32 +01:00
Daniel Mendler
3cdcec43e6
first batch of simplifications 2019-10-29 19:30:23 +01:00
Steffen Jaeckel
7a68f12873 Execute move.sh - Rename files from bn_* to match the function names.
* git blame <renamed-file> is not affected
* git log --follow <renamed-file> can be used to show log across renames
2019-10-19 16:24:39 +02:00