I has been a while since I took a math class and I don't have any of my book anymore. I'm documenting a base number system for precise astronomical measurements on a computer for a game I'm writing, but I want to make sure I'm writing it properly. Here is what I'm thinking is the general equation for converting from base b to base 10 (decimal):
(Unfortunately, this %&*#!@ forum software doesn't preserve formatting):
NOTE: NX = N sub X (for indexing)
N sub X = (0 to b-1)
Where b is the base of the number system, so that in a base 10 system, b-1 = 9.
N0b^0 + N1b^1 + N2b^2 + N3b^3 +...+ N(n+1)b^(n+1) = base 10 num
I hope this comes across as sane.
One of the things I'm wondering is: Should the last term be n+1 or n-1?
I've seen n-1 quite a bit, but I just can't think if it applies here.
(Unfortunately, this %&*#!@ forum software doesn't preserve formatting):
NOTE: NX = N sub X (for indexing)
N sub X = (0 to b-1)
Where b is the base of the number system, so that in a base 10 system, b-1 = 9.
N0b^0 + N1b^1 + N2b^2 + N3b^3 +...+ N(n+1)b^(n+1) = base 10 num
I hope this comes across as sane.
One of the things I'm wondering is: Should the last term be n+1 or n-1?
I've seen n-1 quite a bit, but I just can't think if it applies here.
