BUG: decode: conversion after multiplication distorts the results -> rewritten.