Build Your Own Arcade Controls Forum

Main => Everything Else => Topic started by: protokatie on March 08, 2010, 06:15:59 am

Title: Prob: Dealing with 1's place in non-integer bases
Post by: protokatie on March 08, 2010, 06:15:59 am
Ok, This is for those who know their maths:

I get different base systems (Binary, ternary, octal, decimal, hex, etc) and I can deal with bases like Base(n) and base(pi). But I can only deal with these bases (pi, n, etc) when dealing in the second place. I am hoping that someone can help me understand how a "ones place" can cooexist with base pi.

EG, 20 in base Pi = pi^2. How do I deal with the ones place?

If I am not being clear enough, let me know.

EDIT: I screwed up a bit on what "20" is, but it is late. Still I would like to know how to deal with the "one's place" on non integer bases systems. (And if Tigger replies, I might even get a good laugh)
Title: Re: Prob: Dealing with 1's place in non-integer bases
Post by: HaRuMaN on March 08, 2010, 09:03:25 am
Have you tried hitting it?
Title: Re: Prob: Dealing with 1's place in non-integer bases
Post by: Cakemeister on March 08, 2010, 10:16:10 am
Just like you use 10 to the various powers in a decimal number, you would use pi to the various powers in a base pi number.

10^2=100
10^1=10
10^0=1
10^-1=0.1
10^-2=0.01

pi^2 approx = 9.8696
pi^1 approx = 3.1416
pi^0 = 1
pi^-1 approx = 0.3183
pi^-2 approx = 0.1013

Let's convert 20.1 from base pi to decimal. That gives you 2 times 9.8696 plus 1 times 0.3183 or 20.0575.

Let's convert 11.1 from decimal to base pi, it's a little harder. You have to find the number of each power that will fit. So pi^2 will fit in 11.1. Subtracting 9.8696 from 11 gives 1.1304. The zero power of pi fits in that, so subtract 1 from that, which gives 0.1304. Pi to negative 1 power doesn't fit, but pi to negative 2 power does. Subtract that and you get .0291. You can keep going until you get the precision you want. The answer for this one would be 11.01.

Hope this is right. :)