
void invblk4(scicos_block *block,int flag)
{
  int i;
  double ww;
  if (flag == 6){
    for(i=0;i< block->nin;i++){
      ww=block->inptr[i][0];
      if (ww != 0.0)
	block->outptr[i][0]=1.0/ww;
    }
  }
  if (flag == 1){
    for(i=0;i< block->nin;i++){
      ww=block->inptr[i][0];
      if (ww != 0.0)
	block->outptr[i][0]=1.0/ww;
      else{
	printf("\n\r Error, singularity has been detected");	
	return;
      }
    }
  } 
}
