I understand you exactly when you say two folded - I also had same experience - but luckily solved with help of that forum.
I originaly interfaced HMC5883L with plain C from beaglebone embbeded linux platform.
I was getting strange values if I turned device for around 90 degrees - values were like 65231, etc, but originaly when device was on desk they were like normall (around 0 to 10) - I am talking about raw data obtained by:
x=outputData << 8 | outputData; //Combine MSB and LSB of X Data output register
z=outputData << 8 | outputData; //Combine MSB and LSB of Z Data output register
y=outputData << 8 | outputData; //Combine MSB and LSB of Y Data output register
I resolved issue properly declaring x, y and z variables with:
maybe that's also true for rest of you that you have similar problems.
I am attaching working code in plain C.