Everything is looking good; I have inventory, and things appear to be running smoothly. Thanks for the help amraist!
Looking over erde's BSD patches, I see I did almost exactly what erde did, except instead of switching up to an equivalent abs function, I opted to simply flip the sign of the integers, given they're all known to be below 0 and there's no even-root calls.