The present invention aims to increase an encoding efficiency when the
occurrence probability of LPS (less probable symbol) is low. An encoding
apparatus has a interval size (A), a interval limit value (C), divides a
set interval which is set on a number line, selects a sub-interval
corresponding to an occurring symbol, updates the interval size (A) and
the interval limit value (C) with a limited precision based on the
selected sub-interval size, and encodes a coordinate within the interval.
Based on the probability (the occurrence probability of symbol) output
from a learning memory, the sub-interval size (LSZ, dLSZ) and the
sub-interval limit value are obtained. A correction value calculator
computes the correction value based on the dLSZ, reflects the computed
correction value (dA, dC) to the renormalized subinterval size (rA) and
the renormalized sub-interval limit value (rC), updates the interval size
(A7) to the sub-interval size, updates the interval limit value (C8) to
the sub-interval limit value, and outputs a code.