Attention is currently required from: neels, laforge. dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/30933 )
Change subject: uitils: add floored and euclidian modulo functions ......................................................................
Patch Set 5:
(4 comments)
File include/osmocom/core/utils.h:
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/66c32e20_43167974 PS4, Line 185: .
would be very helpful to include a brief explanation, sort of like "A modulo where the result always […]
As far as I can see this is not the only property of this modulo function. I don't think that this is helpful. Users are either aware of the mathematical properties and know whats going on here or they don't, then its better for them to look it up in the referenced paper. (I also can't claim for me to fully understand whats going on here, the more I am happy that the paper contains mathematical proofs and test vectors)
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/d2c46ba3_8fdccf39 PS4, Line 189: x
you neet to put braces around every single occurence of these parameters like […]
Done
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/4576e02c_7c864596 PS4, Line 191: )
"A modulo where the result is always positive" or something
(see above)
https://gerrit.osmocom.org/c/libosmocore/+/30933/comment/03c9e82c_dde1255b PS4, Line 195: y > 0 ? x % y + y : x % y - y
please put braces around this section. […]
Done