dc2cab13bd
ia64. It appears that if I get rid of the fmod expression, and use integer math I get the right values. Hopefully this isn't a problem for anybody.