Adafruit_LSM303 tilt compensated compass
The sin() and cos() functions expect their arguments to be in
radians. If you feed them with anything else, be it degrees, percent
slope, or whatever, expect the result to be just crap.



Edit: The OP changed the question, invalidating my answer. So here
comes a new answer...

You have mistaken eventA.acceleration.y for cos(tilt),
eventA.acceleration.x for sin(tilt), and so on. They are not the
same. You may think they are the same up to some multiplicative factor,
and that's right. However, the factor doesn't cancel out as soon as you
do computations like sin(roll)*sin(tilt). Don't rush your math: if you
want to transform known-good formulas to more practical ones, check every
step of the transformation carefully.