Trevor Spiteri
5ed4979048
version 0.5.3
2020-02-13 13:48:03 +01:00
Trevor Spiteri
26da6f43bf
ci: sort list of cargo cached packages
2020-02-13 13:47:11 +01:00
Trevor Spiteri
4b889cbb1f
reorganize {,checked} {,Euclidean} remainders {,by integers}
...
Now the main logic is in the checked functions, which fail only if rhs
is zero, and the other functions all .expect("division by zero").
checked_rem now uses % instead of core checked_rem.
checked_rem_euclid now uses core rem_euclid.
checked_rem_int uses checked_rem for the most common case.
checked_rem_euclid_int uses checked_rem_euclid for the most common
case.
2020-02-13 12:04:49 +01:00
Trevor Spiteri
68f72f8b56
some fixes and tests
...
* rem_euclid no longer uses rhs.abs() which could overflow.
* Rem<Inner> and rem_euclid_int now allow for the signed case where
rhs is equal to the absolute value of the minimum fixed value.
* checked_rem_int, checked_rem_euclid and checked_rem_euclid_int now
check for zero then defer to Rem<Inner>, rem_euclid and
rem_euclid_int.
2020-02-13 01:39:02 +01:00
Trevor Spiteri
913ea21d4d
typo
2020-02-13 00:07:53 +01:00
Trevor Spiteri
be49c12e93
typo
2020-02-12 23:58:44 +01:00
Trevor Spiteri
137d8989e6
mention fixed-sqrt in top-level doc
2020-02-12 23:56:26 +01:00
Trevor Spiteri
e3e17341f2
add {div,rem}_euclid_int to Wrapping
2020-02-12 23:51:31 +01:00
Trevor Spiteri
873bdfa128
fix bug in round_to_zero
2020-02-12 23:45:58 +01:00
Trevor Spiteri
ddf69cdca0
some doc tweaks
2020-02-12 23:18:24 +01:00
Trevor Spiteri
3ee5811556
fix remaining checked {div,rem}_euclid_int methods
...
Closes https://gitlab.com/tspiteri/fixed/issues/13
2020-02-12 18:40:04 +01:00
Trevor Spiteri
97128d2b9f
fix checked_rem_int and fix+deprecate {wrapping,overflowing}_rem_int
...
https://gitlab.com/tspiteri/fixed/issues/13
2020-02-12 17:32:34 +01:00
Trevor Spiteri
677ee97f6f
add more arithmetic tests
2020-02-12 16:59:10 +01:00
Trevor Spiteri
f8d2004c8f
fix Rem<Inner> for Fixed
...
https://gitlab.com/tspiteri/fixed/issues/13
2020-02-12 16:58:21 +01:00
Trevor Spiteri
f070f5e75a
more of remove Frac constraints for trait impls that do not need it
2020-02-12 16:44:26 +01:00
Trevor Spiteri
f6f4b9d174
add {div,rem}_euclid to Wrapping
2020-02-12 15:07:15 +01:00
Trevor Spiteri
bf7c2024e1
add {saturating,wrapping,overflowing}_div_euclid
2020-02-12 14:48:10 +01:00
Trevor Spiteri
43926daa62
add checked_{div,rem}_euclid
2020-02-12 14:16:19 +01:00
Trevor Spiteri
96e922d287
remove Frac constraints for trait impls that do not need it
2020-02-12 13:57:20 +01:00
Trevor Spiteri
6e93affa0d
add div_euclid and rem_euclid
2020-02-12 13:48:35 +01:00
Trevor Spiteri
c2fa7448c2
implement Rem and RemAssign, and add checked_rem
...
Closes https://gitlab.com/tspiteri/fixed/issues/12
2020-02-12 13:15:23 +01:00
Trevor Spiteri
2f2b05e33f
version 0.5.2
2020-02-02 21:02:14 +01:00
Trevor Spiteri
fc045ae224
Merge branch 'serdeize-wrapping' into 'master'
...
add serde impls for Wrapping types
See merge request tspiteri/fixed!5
2020-02-01 11:52:33 +00:00
Shane Pearman
b0e3828e79
re-use inner serde impls for Wrapping types
2020-02-01 03:01:11 -08:00
Shane Pearman
7aa5b0844f
add serde impls for Wrapping types
2020-02-01 01:26:35 -08:00
Trevor Spiteri
2ec4c749be
appveyor can't handle %
2019-12-31 18:08:29 +01:00
Trevor Spiteri
f5c92ec15b
ci: appveyor typo
2019-12-31 17:32:43 +01:00
Trevor Spiteri
513a27c343
ci: remove unused .crate files before caching
2019-12-31 17:30:28 +01:00
Trevor Spiteri
c6e9ecbfb1
ci: rustup toolchain install --profile minimal
2019-12-31 17:24:36 +01:00
Trevor Spiteri
ab0aa534c7
version 0.5.1
2019-12-23 18:15:31 +01:00
Trevor Spiteri
823916346f
add std feature
2019-12-23 17:39:41 +01:00
Trevor Spiteri
59bc0bfd26
link to core libs instead of std libs where possible
2019-12-23 17:22:21 +01:00
Trevor Spiteri
be35c826da
simplify overflow checks for multiplication and division
2019-12-07 22:40:09 +01:00
Trevor Spiteri
950f9051f7
version 0.5.0
2019-12-06 11:46:41 +01:00
Trevor Spiteri
ae0b037bc5
fmt
2019-11-24 21:17:19 +01:00
Trevor Spiteri
1daef22823
list new methods in release notes
2019-11-24 20:20:46 +01:00
Trevor Spiteri
68b2190a86
add conversions to/from {be,le,ne}_bytes
2019-11-24 20:13:26 +01:00
Trevor Spiteri
aac0353bb1
cleaner is_power_of_two
2019-11-24 18:53:45 +01:00
Trevor Spiteri
e46bf604f3
remove deprecated methods and modules
2019-11-24 18:53:07 +01:00
Trevor Spiteri
25510f1525
use std abs, wrapping_abs, overflowing_abs
2019-11-24 18:52:57 +01:00
Trevor Spiteri
221e7d22eb
use std euclid operations
2019-11-24 18:47:39 +01:00
Trevor Spiteri
7b74e7333b
require rustc 1.39.0
2019-11-24 18:47:06 +01:00
Trevor Spiteri
27380f19ca
add Euclidean division/remainder by an integer to Fixed trait
2019-10-17 15:28:41 +02:00
Trevor Spiteri
9880f75c42
add Euclidean division/remainder by an integer
2019-10-17 15:00:37 +02:00
Trevor Spiteri
4ef5f192ed
version 0.4.6
2019-10-16 12:08:30 +02:00
Trevor Spiteri
a674c77051
add bf16 support
2019-10-16 11:32:53 +02:00
Trevor Spiteri
5e7473b7f5
make saturating ops const fn
2019-10-11 14:59:38 +02:00
Trevor Spiteri
0207311b6c
fmt
2019-10-10 23:31:05 +02:00
Trevor Spiteri
f3dc9cdb04
implement az casts from bool to fixed-point
2019-10-10 19:57:44 +02:00
Trevor Spiteri
a99655c809
implement az casts with both source and destination as fixed-point
2019-10-10 19:28:42 +02:00