gdevpsft.c: limit range of doubles before converting to integers.