module omat.rin; //RIN.D (where the function is): //like sin float rin(float x) { float xx; if(x>10){ do{ x=x-10; } while(x>10); } if(x<-10){ do{ x=x+10; } while(x<-10); } if( x < 0 ) { xx = ( x + 10 ); } if( x > 0 ) { xx = (-1*x+10 );} if( x == 0 ){ xx = 10;} if( x == -10 || x == 10 ){ xx = -10; } xx = xx * 0.1; return xx; }