summaryrefslogtreecommitdiff
path: root/671/CH14/EX14.13/14_13.sce
diff options
context:
space:
mode:
Diffstat (limited to '671/CH14/EX14.13/14_13.sce')
-rwxr-xr-x671/CH14/EX14.13/14_13.sce11
1 files changed, 11 insertions, 0 deletions
diff --git a/671/CH14/EX14.13/14_13.sce b/671/CH14/EX14.13/14_13.sce
new file mode 100755
index 000000000..5565fb275
--- /dev/null
+++ b/671/CH14/EX14.13/14_13.sce
@@ -0,0 +1,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