diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index 6c640eebd..fcd49ee0e 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -37,6 +37,7 @@ #include "psft.h" +#include #include #include @@ -2276,9 +2277,8 @@ arg = cf2_stack_popFixed( opStack ); if ( arg > 0 ) { - /* use a start value that doesn't make */ - /* the algorithm's addition overflow */ - FT_Fixed root = arg < 10 ? arg : arg >> 1; + /* initial guess based on the most significant bit */ + FT_Fixed root = 1 << ( ( 17 + FT_MSB( arg ) ) >> 1 ); FT_Fixed new_root;