diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c index 70173ccb7..40bf276cf 100644 --- a/src/psaux/cffdecode.c +++ b/src/psaux/cffdecode.c @@ -1753,22 +1753,9 @@ /* without upper limit the loop below might not finish */ if ( args[0] > 0x7FFFFFFFL ) - args[0] = 0xB504F3L; /* sqrt( 32768.0 ) */ + args[0] = 0xB504F4L; /* sqrt( 32768.0044 ) */ else if ( args[0] > 0 ) - { - FT_Fixed root = 1 << ( ( 17 + FT_MSB( args[0] ) ) >> 1 ); - FT_Fixed new_root; - - - for (;;) - { - new_root = ( root + FT_DivFix( args[0], root ) + 1 ) >> 1; - if ( new_root == root ) - break; - root = new_root; - } - args[0] = new_root; - } + args[0] = (FT_Fixed)FT_SqrtFixed( args[0] ); else args[0] = 0; args++; diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index fcd49ee0e..b9d5071ee 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -2276,22 +2276,7 @@ arg = cf2_stack_popFixed( opStack ); if ( arg > 0 ) - { - /* initial guess based on the most significant bit */ - FT_Fixed root = 1 << ( ( 17 + FT_MSB( arg ) ) >> 1 ); - FT_Fixed new_root; - - - /* Babylonian method */ - for (;;) - { - new_root = ( root + FT_DivFix( arg, root ) + 1 ) >> 1; - if ( new_root == root ) - break; - root = new_root; - } - arg = new_root; - } + arg = (CF2_F16Dot16)FT_SqrtFixed( arg ); else arg = 0;