I have to write Sine and Cos Math functions but without using the standard library functions from math.h file.

Because, I dont want to write these functions with integer data type. But library functions support floating point.

I tried to do some research, but most of the algorithms are based on floating point itself (using Taylor series, horner method).

Can any one please provide sample code for Sin, Cos algorithms based on Integers.

I'm using Codewarrior compiler v2.7 for MPC5604P.

Taylor series are infinite!. Dropping the most and leaving just few nonzero coefficients (in general) gives very poor accuracy. There are methods to optimize series order by slightly tuning series coefficients and greatly improving resulting accuracy. Google for Minimax Polynomial etc.

Now about your code.

1) ss16_tmp_Angle_In_Rad = 32767*(((s16_tmp_Angle_In_Deg) * pi)/180);

Is pi floating point number here? So why not to just use FP sin()? If indeed integer, then you should first do all multiplies, and divide after all mulls are done. As you may know integer divide drops remainder. Dividing at the end should give you more procise result.

2) 90degs is pi/2, which is above 1. pi/2 won't fit signed /32768 integer fraction! You need to use long integers.

3) I'm not sure if you know it, but to multiply two /32768 integer fructions you should multiply them first (producing long integer), and then divide the product by 32768. All those 32bit calculations can take compareable time to what you may have using standard sin().

See attached two excel files, isin.xls for /32768 fractions and isin8.xls for /256 fractions. To emulate integer math, I was using excell INT() function. Series coefficient are optimized to produce smaller error. BTW /256 sine still is good enough with just two series members, s7=0. So go ahead implementing it all.