1- - Start Date: 2023-08-07
1+ - Start Date: 2024-01-08
22- RFC PR: [ amaranth-lang/rfcs #17 ] ( https://github.com/amaranth-lang/rfcs/pull/17 )
3- - Amaranth Issue: None
3+ - Amaranth Issue: [ amaranth-lang/amaranth # 1025 ] ( https://github.com/amaranth-lang/amaranth/issues/1025 )
44
55# Remove ` log2_int `
66
@@ -40,7 +40,7 @@ In practice, `log2_int` differs from `math.log2` in the following ways:
4040
4141Amaranth provides two log2 functions for integer arithmetic:
4242
43- * ` ceil_log2(n) ` , where ` n ` is assumed to be any positive integer
43+ * ` ceil_log2(n) ` , where ` n ` is assumed to be any non-negative integer
4444* ` exact_log2(n) ` , where ` n ` is assumed to be an integer power-of-2
4545
4646For example:
@@ -64,7 +64,7 @@ A `ceil_log2(n)` function is added, that:
6464
6565* returns the integer log2 of the smallest power-of-2 greater than or equal to ` n ` ;
6666* raises a ` TypeError ` if ` n ` is not an integer;
67- * raises a ` ValueError ` if ` n ` is lesser than or equal to 0.
67+ * raises a ` ValueError ` if ` n ` is lesser than 0.
6868
6969An ` exact_log2(n) ` function is added, that:
7070
@@ -114,6 +114,6 @@ None.
114114
115115## Acknowledgements
116116
117- [ @mwkmwkmwk ] provided valuable feedback while this RFC was being drafted.
117+ [ @wanda-phi ] provided valuable feedback while this RFC was being drafted.
118118
119- [ @mwkmwkmwk ] : https://github.com/mwkmwkmwk
119+ [ @wanda-phi ] : https://github.com/wanda-phi
0 commit comments