View Single Post
Old 09-15-2004, 06:22 PM   #188
alexstapleton
Enthusiast
alexstapleton doesn't litteralexstapleton doesn't litter
 
Posts: 49
Karma: 123
Join Date: Jun 2004
could you not detect if the 32nd bit is 1 at $ch = ((($ch/7) << 2) | (($ch%13)&7)); and then set it to 0. and restore the CORRECT bit afterwards? you would need to calculate what that bit should be but it should work. i am of course assuming its generating the incorrect BINARY rather than incorect Decimal output at that point of course.

as long as the binary value remains correct it does not matter if it is unsigned or not.

$ch = (((((int)($ch/7)) << 2) | (($ch%13)&7));

(int) may be needed if float based weirdness happens.
alexstapleton is offline   Reply With Quote