Paul- > why does 8 mod 0.05 return 0.05 ? ...and from the docs... Note: Using non-integer number and divisor usually produces sensible results. However, mathematically, modulus is generally defined as a function over the integers, and the results using non-integers may not consistently be what you expect. -- Mark Wieder mwieder at ahsoftware.net