Commit Graph

196 Commits

Author SHA1 Message Date
Trevor Spiteri a0ea3f2c60 loosen Rhs constraint on MulAssign 2020-09-22 19:09:41 +02:00
Trevor Spiteri 0aa8af089f add mul_add to Wrapping and Unwrapped 2020-09-22 17:20:13 +02:00
Trevor Spiteri a3d947776d add mul_add methods 2020-09-22 15:47:13 +02:00
Trevor Spiteri 7a03bd6364 add unwrapped experimental feature 2020-09-17 16:58:26 +02:00
Trevor Spiteri 1b5a5b39ae version 1.2.0 2020-09-02 13:50:04 +02:00
Trevor Spiteri d112d55e21 Revert "require rustc 1.46"
This reverts commit 5a4d1a6732.
2020-09-02 13:03:23 +02:00
Trevor Spiteri 5a4d1a6732 require rustc 1.46 2020-09-02 10:14:04 +02:00
Trevor Spiteri f95c76651a add const_fixed_from_int! macro 2020-08-28 18:27:23 +02:00
Trevor Spiteri 5b911fc62c version 1.1.0 2020-07-21 08:42:56 +02:00
Trevor Spiteri 2351e9a4c8 document num-traits experimental feature in release notes 2020-07-16 12:37:46 +02:00
Trevor Spiteri fcdd018240 version 1.0.0 2020-06-04 18:59:55 +02:00
Trevor Spiteri ef36b4f767 make {from,to}_{be,le,ne}_bytes const functions 2020-06-04 18:18:01 +02:00
Trevor Spiteri cd8ee00eac Merge branch 'v0.5' 2020-05-11 20:20:02 +02:00
Trevor Spiteri 2bfc804c4d version 0.5.7 2020-05-11 20:13:11 +02:00
Trevor Spiteri 1eca782f60 add wrapping_next_power_of_two 2020-05-11 19:57:42 +02:00
Trevor Spiteri 8227ae5dd7 add leading_ones and trailing_ones 2020-05-11 19:55:35 +02:00
Trevor Spiteri 694ae24d77 add LosslessTry{From,Into} and immplement them for Fixed <-> Fixed 2020-05-11 19:52:59 +02:00
Trevor Spiteri 5cb690a076 fix typos in tests and release notes 2020-05-11 19:49:12 +02:00
Trevor Spiteri b22a08b66f add golden ratio and its conjugate to constants 2020-05-11 19:42:47 +02:00
Trevor Spiteri c13ab2e324 add wrapping_next_power_of_two 2020-05-10 01:13:24 +02:00
Trevor Spiteri dfb59cefc0 add leading_ones and trailing_ones 2020-05-10 01:09:41 +02:00
Trevor Spiteri bc5e01120f add LosslessTry{From,Into} and immplement them for Fixed <-> Fixed 2020-05-08 12:41:35 +02:00
Trevor Spiteri eebb76e7b0 fix typos in tests and release notes 2020-05-08 00:37:14 +02:00
Trevor Spiteri 37167fddd0 add golden ratio and its conjugate to constants 2020-05-07 23:36:35 +02:00
Trevor Spiteri ff0874a1f4 require rustc 1.43.0
Will probably bump requirement to 1.44.0 before releasing 1.0.0 so
that {from,to}_{le,be,ne}_bytes can be const fn.
2020-05-03 16:08:11 +02:00
Trevor Spiteri 879861b875 remove deprecated items 2020-05-01 18:28:17 +02:00
Trevor Spiteri 079a13ca1b version 0.5.6 2020-05-01 18:15:40 +02:00
Trevor Spiteri 86b542e7f3 add Lossy{From,Into} to prelude 2020-05-01 17:40:53 +02:00
Trevor Spiteri 0adbf4435e at least one more release before 1.0.0 to deprecate items 2020-04-18 19:28:05 +02:00
Trevor Spiteri 74f0e4f575 add checked versions of signum 2020-04-18 18:15:22 +02:00
Trevor Spiteri f67aed0078 remove deprecated items 2020-04-18 02:21:17 +02:00
Trevor Spiteri 97d4e1a326 version 0.5.5 2020-04-16 23:29:50 +02:00
Trevor Spiteri 289f4b1697 add constants in consts module as associated constants 2020-04-16 23:08:29 +02:00
Trevor Spiteri 5db3b17284 fix comparison of e.g. I0F16 with +0.5 2020-04-16 21:19:30 +02:00
Trevor Spiteri 4c25f002a1 update copyright date 2020-04-13 20:11:39 +02:00
Trevor Spiteri a32b56ab43 add int_log10 and checked_int_log10 2020-04-13 03:17:21 +02:00
Trevor Spiteri 919519fea1 doc nits 2020-04-13 00:27:42 +02:00
Trevor Spiteri 47287ab98f replace {int,frac}_nbits() by {INT,FRAC}_NBITS 2020-04-11 18:50:26 +02:00
Trevor Spiteri e1febebb31 replace {min,max}_value() by {MIN,MAX} 2020-04-11 18:34:52 +02:00
Trevor Spiteri 91bd73bca4 add int_log2 and checked_int_log2 2020-04-11 17:44:09 +02:00
Trevor Spiteri 524fc0c28f version 0.5.4 2020-02-21 16:34:27 +01:00
Trevor Spiteri e0f3eb77b8 fix incorrect overflow handling for rem_euclid_int 2020-02-21 15:39:02 +01:00
Trevor Spiteri 5ed4979048 version 0.5.3 2020-02-13 13:48:03 +01:00
Trevor Spiteri 913ea21d4d typo 2020-02-13 00:07:53 +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 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 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 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 ab0aa534c7 version 0.5.1 2019-12-23 18:15:31 +01:00
Trevor Spiteri 950f9051f7 version 0.5.0 2019-12-06 11:46:41 +01:00
Trevor Spiteri 1daef22823 list new methods in release notes 2019-11-24 20:20:46 +01:00
Trevor Spiteri e46bf604f3 remove deprecated methods and modules 2019-11-24 18:53:07 +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 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 cfe198f087 document and test az option 2019-10-10 17:13:36 +02:00
Trevor Spiteri 3248e354ba version 0.4.5 2019-08-30 22:32:17 +02:00
Trevor Spiteri a4c3fdeeed add methods to Wrapping 2019-08-30 12:48:31 +02:00
Trevor Spiteri f314735cc9 bug fix: decimal display panics or includes leading zero 2019-08-29 11:50:18 +02:00
Trevor Spiteri de6ecb5782 add Wrapping::round_ties_to_even 2019-08-29 10:12:17 +02:00
Trevor Spiteri 50ca556686 version 0.4.4 2019-08-24 13:15:28 +02:00
Trevor Spiteri 348463d204 state aims at top of documentation 2019-08-23 10:03:59 +02:00
Trevor Spiteri 3292a2da26 some minor doc improvements 2019-08-22 14:26:08 +02:00
Trevor Spiteri 9e333d99c2 add round_to_zero 2019-08-22 13:39:51 +02:00
Trevor Spiteri 0eade78071 add round_ties_to_even and checked variants 2019-08-22 13:01:28 +02:00
Trevor Spiteri b3796a46f0 make is_power_of_two a const fn 2019-08-21 22:15:36 +02:00
Trevor Spiteri 381af22e96 make {,wrapping_,overflowing_}abs const 2019-08-21 15:46:24 +02:00
Trevor Spiteri ba594f24e1 document bug fix in release notes 2019-08-21 13:30:49 +02:00
Trevor Spiteri 8176a36a95 version 0.4.3 2019-08-20 19:40:53 +02:00
Trevor Spiteri daa600bb71 properly handle precision in Display 2019-08-19 23:53:43 +02:00
Trevor Spiteri 02255757b4 Wrapping::from_str was moved to impl FromStr 2019-08-19 01:16:53 +02:00
Trevor Spiteri a2249ea232 add {saturating,wrapping_overflowing}_from_str{,_binary,_octal,_hex} 2019-08-19 00:30:02 +02:00
Trevor Spiteri cba3907e37 from_str now rounds ties to even 2019-08-17 23:57:39 +02:00
Trevor Spiteri 28885e09ab make INT_NBITS and FRAC_NBITS constants public 2019-08-17 17:55:50 +02:00
Trevor Spiteri 1a859f2033 20 more const functions 2019-08-17 17:10:55 +02:00
Trevor Spiteri 0e96ea1243 depend on rustc 1.34.0 (for some const functions) 2019-08-17 16:52:08 +02:00
Trevor Spiteri 2518b6b147 make const functions: min_value, max_value, from_bits, to_bits 2019-08-17 16:45:09 +02:00
Trevor Spiteri 9e671fced6 version 0.4.2 2019-08-16 23:25:19 +02:00
Trevor Spiteri 9eab1c5be9 add {from,to}_num, deprecate sealed::{Int,Float,Fixed}
* new methods from_num, to_num, and their checked versions
  * deprecate all other from_* and to_*, except for the FromFixed and
    ToFixed traits
  * deprecate sealed::{Fixed,Int,Float}
  * removed SealedFixed, replace Sealed{Int,Float} with
    {Int,Float}Helper
2019-08-16 15:45:26 +02:00
Trevor Spiteri aac10de995 add from* methods to Wrapping 2019-08-15 14:38:27 +02:00
Trevor Spiteri e740a88547 very long decimal fraction strings are now parsed correctly 2019-08-13 19:01:01 +02:00
Trevor Spiteri ea84e11808 version 0.4.1 2019-08-12 14:25:51 +02:00
Trevor Spiteri af02209c48 add from_str_{binary,octal,hex} to traits::Fixed 2019-08-10 19:14:15 +02:00
Trevor Spiteri 1a9816486c add FromStr supertrait to traits::Fixed 2019-08-09 22:38:09 +02:00
Trevor Spiteri c64a2fce0a version 0.4.0 2019-08-08 23:25:05 +02:00
Trevor Spiteri a4b243ce7e remove deprecated methods 2019-08-08 22:47:49 +02:00
Trevor Spiteri 0ebf6a87a0 add consts module 2019-08-06 18:53:41 +02:00
Trevor Spiteri 1d13dfa7a1 implement almost all methods in Fixed{,Signed,Unsigned} traits
Conversions that can be handled using FromFixed and toFixed are not
included.
2019-08-06 16:43:39 +02:00
Trevor Spiteri 3f7822b7e5 add saturating_neg and saturating_abs 2019-08-06 16:35:58 +02:00
Trevor Spiteri 5fa0b53ddc clean up sealed traits and split off new traits::Fixed 2019-08-06 14:40:58 +02:00
Trevor Spiteri 91a4ba3de7 mention new rustc requirement in release notes 2019-08-03 01:26:32 +02:00
Trevor Spiteri a028cb07a9 next version will be 0.4.0 because of incompatible change 2019-08-02 19:01:46 +02:00
Trevor Spiteri 225a0e8307 update release notes to mention new traits 2019-08-02 15:40:22 +02:00