Talk:Rice coding: Difference between revisions

no edit summary
No edit summary
Line 5:
 
:The technique is useful if you are transmitting bits in a continuous stream. If you simply use binary representation the each number has to take a fixed number of bits, say 32 or 64. This coding allows you to use a variable number of bits for each number while still knowing where each number starts and stops. The number of bits used depends on the value of m chosen. As you note the original post came with no examples, so different submissions have used different values with different results. F# uses m=16, probably better if all solutions used the same m or ms.--[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 14:05, 21 September 2023 (UTC)
 
:Using the Wikipedia instructions (as I read them at least ) with an M that is a exact exponent of 2 results in padding the remainder with one extra zero. I have changed this in the Julia example, which decreases the bit length of results by one. Numbers well over the M used are still going to use more bits than the ordinary bit representation, since each multiple of M contained in the number adds another bit to the front of the bits used.--[[User:Wherrera|Wherrera]] ([[User talk:Wherrera|talk]]) 17:54, 21 September 2023 (UTC)
4,105

edits