summaryrefslogtreecommitdiff
path: root/671/CH14/EX14.13/14_13.sce
blob: 5565fb2759abdad36061daebcd371fb000d203d6 (plain)
1
2
3
4
5
6
7
8
9
10
11

V=3.217
bits=4
base=5
a=0

for i=1:bits
    a=floor(V/base*(2^i))
    disp(a);
    V=V-a*base/(2^i)
end