I have found a mistake in my previous program. It works fine except for certain specific floats that are between 256.5 and 512.0 that meet a particular criteria where bit 15 of the mantissa is set along with some other bits between 0 and 14 of the mantissa.
I have attached a corrected version which also includes another method, showing two different ways to truncate the float, and it also includes a subroutine that will round any large float to the nearest whole number.