Where have I gone wrong with my int maths?

Thank you ea123. Gyro_z * duration may well sometimes be less than 1,000,000 also

in this case is it correct that the resuls is added to an integer value (gyroang_z) that can only increment 1 by 1? Maybe you should consider to convert gyroang_z as well to float.