Commit Graph

5 Commits

Author SHA1 Message Date
Joe Richey 0445b3e5c1
Use improved algorithm that only uses shifts
This new algorithm (taken from Wikipedia) only uses shifts, addditions,
and subtrations. On my x86_64 machine, the benchmarks are over twice as
fast.

This also takes num-traits as a dependancy, so that the implementation
can be a normal generic function, instread of a macro.

Signed-off-by: Joe Richey <joerichey@google.com>
2020-09-08 04:50:50 -07:00
Richard Dodd 9e6ffa6f81 Fix overflow in some edge cases. 2020-01-24 12:25:14 +00:00
Richard Dodd fab12a7a66 Bump version for release 2018-10-30 11:50:20 +00:00
Richard Dodd 5bbfb9187d Add no_std and fix tests 2018-03-02 21:37:51 +00:00
Richard Dodd 00aabcfe32 First commit 2017-10-23 13:29:42 +01:00