Post Reply 
Base converter with fractions?
01-26-2017, 05:18 PM (This post was last modified: 01-26-2017 05:18 PM by Joe Horn.)
Post: #5
RE: Base converter with fractions?
(01-26-2017 12:38 PM)Jan_D Wrote:  When I would like to express 3.142 in base 7, I would do the following.

Multiplication with 7^4 gives: 7543.942
Rounded this is: 7544
...
... and thus gives: 3.142=3.0665_base7

Unfortunately that amount of initial roundoff introduces a great amount of error. 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), whereas "3.0665" (base 7) converts to 3.1420241566 (decimal), which is not what we started with.

Multiplying by a greater power of 7 at the beginning helps achieve greater accuracy, but even using 7^13 (which turns 3.142 into an integer in a 12-digit machine) doesn't yield a result as accurate as BASECALC's. I guess it's time to explore Smith's method.

It might be objected that the input only had four significant digits, so the output should be rounded off accordingly. But that's not necessarily true; a user might intend that input to mean "exactly 3.142", as if they had input 3.14200000000 with the trailing zeros being significant digits. HP's philosophy has never been to round outputs to the number of significant digits of the input, because only the user knows the input's number of significant digits. HP's philosophy has always been, "Assume that the user's input is exactly what they want it to be, and let them adjust the accuracy of the result if they want to." IMHO all HP calculator software should follow that philosophy.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


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? - 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? - 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? - Han - 02-03-2017, 02:31 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)