#include <reg51.h>  
#include <math.h>
						
float fx(float x, float e)
{
	// член ряда
	float an;

	// общий результат
	float res;

	an = 1;
	res = 0;
		/*
	while (fabs(an)>e)
	{
		res+=an;
		an*=-x;
	}  */

	return 1/(1+x);
}
									  
void main() 
{
	float x = 0;
	int i;

	char xdata y[128];

	P1=0;

	i=0;								 
	while(1) for (x=0; x<0.999999; x+=0.0078125) // 0,0078125 = 1/128
	{
		y[i]=255*fx(x, 0.05);
		P1 = y[i];
		i++;
	}

	

	for(;;);
}
Соседние файлы в папке C51
  • #
    09.05.20142.24 Кб12Lab1.plg
  • #
    09.05.201456.77 Кб12Lab3.uvopt
  • #
    09.05.201413.27 Кб12Lab3.uvproj
  • #
    09.05.201456.75 Кб12Lab3_uvopt.bak
  • #
    09.05.201413.27 Кб12Lab3_uvproj.bak
  • #
    09.05.2014498 б13Main.c
  • #
    09.05.20148.27 Кб12Main.LST
  • #
    09.05.20143.15 Кб12Main.OBJ