Base converter with fractions?
01-28-2017, 03:15 PM (This post was last modified: 01-28-2017 03:27 PM by Dieter.)
Post: #12
 Dieter Senior Member Posts: 2,397 Joined: Dec 2013
RE: Base converter with fractions?
(01-26-2017 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.

(01-26-2017 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 base-7 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 »

 Messages In This Thread Base converter with fractions? - Joe Horn - 01-15-2017, 05:53 AM RE: Base converter with fractions? - Jan_D - 01-22-2017, 03:13 PM RE: Base converter with fractions? - Joe Horn - 01-22-2017, 11:22 PM RE: Base converter with fractions? - Jan_D - 01-26-2017, 12:38 PM RE: Base converter with fractions? - Joe Horn - 01-26-2017, 05:18 PM RE: Base converter with fractions? - Han - 01-27-2017, 05:00 AM RE: Base converter with fractions? - Joe Horn - 01-28-2017, 03:25 AM RE: Base converter with fractions? - Dieter - 01-28-2017 03:15 PM RE: Base converter with fractions? - Han - 01-26-2017, 06:57 PM RE: Base converter with fractions? - Jan_D - 01-28-2017, 01:42 PM RE: Base converter with fractions? - Han - 01-27-2017, 04:37 AM RE: Base converter with fractions? - Jan_D - 02-02-2017, 05:26 PM RE: Base converter with fractions? - Jan_D - 02-03-2017, 01:51 PM RE: Base converter with fractions? - Jan_D - 02-21-2017, 05:59 PM RE: Base converter with fractions? - Han - 02-21-2017, 07:30 PM RE: Base converter with fractions? - Jan_D - 02-22-2017, 06:03 PM RE: Base converter with fractions? - Gerald H - 01-28-2017, 02:58 PM RE: Base converter with fractions? - Han - 02-03-2017, 02:31 PM RE: Base converter with fractions? - toml_12953 - 02-13-2017, 02:36 PM RE: Base converter with fractions? - Jan_D - 02-03-2017, 05:52 PM RE: Base converter with fractions? - Jan_D - 02-13-2017, 01:14 PM RE: Base converter with fractions? - Han - 02-13-2017, 01:27 PM

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