Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Arithmetic coding
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Precision and renormalization== The above explanations of arithmetic coding contain some simplification. In particular, they are written as if the encoder first calculated the fractions representing the endpoints of the interval in full, using infinite [[precision (arithmetic)|precision]], and only converted the fraction to its final form at the end of encoding. Rather than try to simulate infinite precision, most arithmetic coders instead operate at a fixed limit of precision which they know the decoder will be able to match, and round the calculated fractions to their nearest equivalents at that precision. An example shows how this would work if the model called for the interval {{math|[0,1)}} to be divided into thirds, and this was approximated with 8 bit precision. Note that since now the precision is known, so are the binary ranges we'll be able to use. {| class="wikitable" ! rowspan="2" | Symbol !Probability ! colspan="2" | Interval reduced to eight-bit precision ! Range |- !(expressed as fraction) !(as fractions) !(in binary) !(in binary) |- align="center" |A |1/3 |{{math|[0, 85/256)}} |<span style="font-family:monospace">[0.00000000, 0.01010101)</span> |<span style="font-family:monospace">00000000 β 01010100</span> |- align="center" |B |1/3 |{{math|[85/256, 171/256)}} |<span style="font-family:monospace">[0.01010101, 0.10101011)</span> |<span style="font-family:monospace">01010101 β 10101010</span> |- align="center" |C |1/3 |{{math|[171/256, 1)}} |<span style="font-family:monospace">[0.10101011, 1.00000000)</span> |<span style="font-family:monospace">10101011 β 11111111</span> |} A process called ''renormalization'' keeps the finite precision from becoming a limit on the total number of symbols that can be encoded. Whenever the range is reduced to the point where all values in the range share certain beginning digits, those digits are sent to the output. For however many digits of precision the computer ''can'' handle, it is now handling fewer than that, so the existing digits are shifted left, and at the right, new digits are added to expand the range as widely as possible. Note that this result occurs in two of the three cases from our previous example. {| class="wikitable" !Symbol !Probability !Range !Digits that can be sent to output !Range after renormalization |- align="center" |A |1/3 |{{mono|'''0'''0000000 β '''0'''1010100}} |'''0''' |{{mono|0000000'''0''' β 1010100'''1'''}} |- align="center" |B |1/3 |{{mono|01010101 β 10101010}} |{{CNone|None}} |{{mono|01010101 β 10101010}} |- align="center" |C |1/3 |{{mono|'''1'''0101011 β '''1'''1111111}} |'''1''' |{{mono|0101011'''0''' β 1111111'''1'''}} |}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Arithmetic coding
(section)
Add topic