Base converter with fractions?

01282017, 03:15 PM
(This post was last modified: 01282017 03:27 PM by Dieter.)
Post: #12




RE: Base converter with fractions?
(01262017 05:18 PM)Joe Horn Wrote: Unfortunately that amount of initial roundoff introduces a great amount of error. Sure. The example rounds to four decimal places, so the result of course is not correct in all 12 digits, let alone the exact answer. (01262017 05:18 PM)Joe Horn Wrote: Smith's BASECALC converts 3.142 (decimal) to "3.06646410512335" (base 7), which it converts cleanly back to what we started with, namely 3.142 (decimal), FTR: this still is not the exact result, it's just the first 15 digits. The exact base7 representation of 3,142 is periodic, it's \(3,\overline{06646410512335362252}\). Since we're in a museum here: one of my first books on RPN and calculators included an HP67/97 program for base conversions, both for integer and fractional numbers. The method has been posted here: simply multiply the fractional part by the base, then the integer part of this is the next digit. I just noticed that this book is available on Google books (Helmut Alt, Anwendung programmierbarer Taschenrechner Band 1). If you read German: it's page 140ff. Dieter 

« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)