There are two changes you need to make in order to get this to work. One involves the fact that the value for 'x' is not evenly divisible by 60, and any remainder is being ignored. Change 'y' from a quad to a double, and the calculation will be correct. The second part has to see with using Str() on a quad value, as it is meant for a long. Use StrQ() instead.
The result of the division is truncated because y is an integral (whole number) data type. So effectively, the remainder is being discarded. Hence, the value of z could be out by as much as 59 (when dividing by 60)
e.g. if a=5, then b=a/2 will assign b the value of 2 since the remainder of 1 will have been discarded.
I may look like a mule, but I'm not a complete ass.