Mathematically how do I get the cents from a dollar value (ex: $21.99$)?
As a programmer, I would simply convert to a string and grab everything after the decimal... but I would think this would be doable with pure math, or maybe I have too much faith in the black magic
EDITED
I wasn't clear.
Is it possible with pure math (no computer API.. just old school paper and pencil) to find the fractional part of any given decimal with any given precision?
Is there a formula?
Given xx.yyyy is there a formula that would return yy?
This can't be done in general with only (finite) arithmetic, but what you're looking for is the fractional part function.
Now, if you're just interested in dollar values, and you avoid fractions of a cent, then this is less complicated, but still not reachable through basic arithmetic only. Note that $\$21.99$ is simply an alternative notation for the dollar amount $$21+\frac{99}{100}.$$ Multiplication by $100$ yields the integer $2199,$ whose remainder when divided by $100$ is $99$, which upon multiplication by $.01$ yields the fractional part.
In general, given a dollar amount $d$ with no fractions of a cent, $$.01*\text{mod}(100*d,100)$$ will be your fractional part, where $\text{mod}(m,n)$ represents the remainder when a positive integer $m$ is divided by a positive integer $n$.