InDesign is extremely accurate with its dimensions. Inside, all of your measurement units are converted to points (1/72"), with up to 12 or 13 digits of accuracy. However,
1. Every manipulation of an object may increase or decrease the size of an object by a fractionally rounded value, due to this limited accurary of mathematic operators. Rest assured, this usually is in the range of 1E-10 points, or slightly below the wavelength of visible light. But Small Errors May Round Up. On the other hand ...
2. I'd go barking mad if InDesign showed every single measurement in the User Interface with all of the internal digits. To preserve my sanity, ID only shows two or three most significant decimals, attuned to the scale of the current measurement unit (inches have lots of decimals, millimeters not).
So your -.999999999999 is slightly rounded downwards, by a mere 0.000000001%, to facilitate easy reading and conserve valuable on-screen space.
[Edit] Hah, I forgot to address that you actually input "-1" bu get something else out (*). In what unit would that be? Since ID's internal measurement unit is in points, every other unit needs to be converted into that, including some inevitable rounding.
(*) Only by aforementioned 0.000000001%, but still, it is something else.
I input in inches. So I would probably best be served to figure out how many points exactly equal and inch and submit it that way...?
I will attempt in points and report back.
Converting the value up front is not necessary, ID does that on its own.
Strangely enough, a conversion from inches to points *is* exact -- one inch equals 72 points. Or at least it does if you use Adobe's definition (which I think InDesign is using internally).
I'd simply not bother about the 0.00000001% discrepancy. Even if your output is going to be scaled up, it would need to be miles (or kilometers ;) ) wide before anyone should notice it, and at such magnifications the process itself would be adding much more to any inaccuracies.
If you want to display the value to a user, use rounding:
valRounded = Math.round(value*1000)/1000;
will return your value with a modest three digits of accuracy.
Even though I place it at -72, it still references it as -71.9999999999995...
It must be because each page in the Indd file is a different size. Maybe somethign is "off".
I was going to use the placement of the textframes as an identifier for another script but will have to identify those frames some other way such as the stroke color or I could just round and be pretty sure that it is what I'm looking for. (Labels won't work for this)
Thanks for your help. If I discover why certain pages give me the odd mth even in points I'll update the post.