set float1 to ( ( short1 - short2 ) / short1 )
For testing purposes, I added a message box to the following line that displays the values of the relevant variables (both shorts are behaving as expected, so I know that's not the problem). When short2 is 0, float1 is set to 1, as it should be. However, when short2 is any value than 0 (but still less than short1) float1 is set to 0.
I'm not sure whether there's something causing the float not to save decimal values, or whether the division isn't working as it should, or if I am just missing something really obvious because I have been working on this script for so long. At any rate, I would appreciate any insight that anyone might have. And to address the two most obvious oversights; I am completely sure that I did define it as a float at the beginning of the script, and the message box displays float1 in it's entirety (0.00000...), so I know it's not just rounding for the display.