I found another transcription error.

http://sourceforge.net/p/ta-lib/code/HEAD/tree/trunk/ta-lib/c/src/ta_func/ta_HT_TRENDMODE.c#l446
Code:
else if( tempReal <= 0.01 )
      {
         if( realPart < 0.0 )
            DCPhase -= 90.0;
         else if( realPart > 0.0 )
            DCPhase += 90.0;
      }



That is supposed to say
Code:
else if( tempReal <= 0.01 )
      {
         if( imagPart < 0.0 )
            DCPhase -= 90.0;
         else if( imagPart > 0.0 )
            DCPhase += 90.0;
      }


Since the EasyLanguage code on p102 says
Code:
If AbsValue(RealPart) <= 0.001 then DCPhase = 90 * Sign(ImagPart);


(not realPart).
Sloppy!