18. If a sentence to pay a fine or, failing payment, to serve a determined sentence has been imposed and the person serving the sentence decides to pay the fine after serving part of the sentence, the amount of the fine owing is calculated by(1) dividing the total fine imposed by the total number of days of sentence;
(2) subtracting the number of days of sentence served and the number of days earned as remission from the total number of days of sentence;
(3) multiplying the number obtained under subparagraph 1 by the number obtained under subparagraph 2; and
(4) adding the total of the costs established in the warrant of committal to the number obtained pursuant to subparagraph 3.
Release is granted at the time the person serving a sentence pays the fine and the total of the costs.