Your guess is as good as mine. Math was never my strong point. I guess one inefficient way would be to create several arrays of char, having each element represent one digit. You could use a fixed offset for the decimal point. Example for representing pi:

Code:

char a[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, 9, 7, 9, 3, 2, 3, 8, 4, 6 };

If you were feeling brave, you could do all the math in binary, then convert it to decimal for the output.

Anyway, once you have such arrays, you just need functions for addition and multiplication of them. One way would be to implement the code just like how people used to add and multiply numbers before they gave all the kids calculators.

I'm sure there are other better ways.