Much agreed with Dora; lookup tables are the way to go. Generally, accelerometer vendors will supply an app note that talks about how to set them up, or even supply the table values, and possibly an equation that does a rough curve-fit for your particular device.
At all costs, avoid doing complex math functions on your microcontroller... it'll take FOREVER, and simply induce long delays between samples (slowing down your sampling rate, and reducing your bandwidth... very bad if using this in a feedback control loop).