Maybe I can offer a course of actions...
I find odd that you cahnge the measuring units as it does not appear to be affecting anything afterwards.
In fact I would much rather expected to see:
set horizontal measure to points
set vertical measure to points
BEFORE the
set pagewidth to page width as real
That would ensure that the value of pagewidth is in fact in points since you will add the offset value to it later.
Also, your final print size will need to include the registration marks offset TWICE since you will have marks on both the left and right side of your pages.
Third: You need to also include the length of your regitration marks (TWICE as well) into you final page width.
Lastly, you should ALWAYS round UP values in these situation. Now I know that round .9 will return 1 but you may come upon a .3 value which you aslo want to return 1. So your line should read:
set paper width to round ((pagewidth + 6 + RegMark_Length) * 2 ) rounding up
HTH