Beispiel #1
0
int main ()
{
  int v = 42;


  return (fff (v) != 420);
}
int main(int argc, char* argvp[] ){
    char* buffer = NULL;

    buffer = (char*)malloc(sizeof(char)*10);
    fff(buffer);
    free(buffer);
    return 0;
}
Beispiel #3
0
int main()
{
	double x = 5;
	while( ff(x) > 0.000001 )
	{
		x = x - ff(x)/fff(x);
	}
	printf("%lf\n",x);
}
int main(int argc, char *argv[])
{
  Pooma::initialize(argc,argv);
  Pooma::Tester tester(argc,argv);

  tester.out() << "Starting IndirectionList test." << std::endl << std::endl;

  Interval<1> foo(0,6);

  Array<1,int,Brick> klist(foo);

  klist = 1;
  Pooma::blockAndEvaluate();

  for(int i=1;i<7;i++)
    klist(i) = klist(i-1)+i;
  klist(2)=3;
  klist(5)=12;
  klist(6)=20;
  
  tester.out() << klist << std::endl;

  Interval<1> fff(0,20);

  DynamicArray<double,Dynamic> goo(fff),roo(fff);
  for(int i=0;i<=goo.domain().last();i++)
    goo(i)=roo(i)=i;

  IndirectionList<int> iklist(klist);

  tester.out()  << " iklist.first() = " << iklist.first() << std::endl;
  tester.out()  << " iklist.last() = " << iklist.last() << std::endl;
  tester.out()  << " iklist.size() = " << iklist.size() << std::endl;
  
  tester.out() << "DynamicArray to be altered" << goo << std::endl;

  Range<1> sss(0,3);
	
  goo.destroy(iklist,ShiftUp());

  tester.out() << "after destroy with ShiftUp" << std::endl;
  tester.out() << goo << std::endl;


  roo.destroy(iklist,BackFill());
  tester.out() << "after destroy with BackFill" << std::endl;
  tester.out() << roo << std::endl;

  tester.out() << "Finished IndirectionList test." << std::endl << std::endl;

  int res = tester.results("indirectionlist_test1");
  Pooma::finalize();
  return res;
}
Beispiel #5
0
long F2(int *node)
{
 long call_result = 0;

 if (call_result = fff(node))
  goto error_free_node;

 T(node);
 return 0;

error_free_node:
 T(node);
 return call_result;
}
Beispiel #6
0
double dpsyn(double theta, void * params ){

	double nu = 1.4;	//Ghz

	double psyn0 = 1.46323e-25 ; // Gev/s/Hz
	double x0 = 62.1881 ;			// dimensionless constant
	double nu_em = ( 1 + c.z )* nu; // (observing freq)*(1+z)

	std::vector<double> psynParams = *(std::vector<double> *)params;

	double x = x0 *nu_em / ( c.bfield_model( psynParams[1] ) * pow( psynParams[0] , 2)	 );
	//std::cout << "x = " << x  << " B = " << c.bfield_model(psynParams[1]) << std::endl;
	double dpsyn = psyn0 * c.bfield_model(psynParams[1]) * 0.5 * pow(  sin(theta) , 2)* fff( x  /sin(theta) ); 
	
	

	return dpsyn;

}
Beispiel #7
0
double dpsyn(double theta, void * params ){

	double nu = 1.4;	//Ghz

	double psyn0 = 1.46323e-25 ; // Gev/s/Hz
	double x0 = 62.1881 ;			// dimensionless constant
	double nu_em = ( 1 + c.z )* nu; // (observing freq)*(1+z)

	std::vector<double> beta = *(std::vector<double> *)params;

	double x = x0 *nu_em / ( bfield_model( beta[1] ) * pow( beta[0] , 2) );
	
	double dpsyn = psyn0 * bfield_model(beta[1]) * 0.5 * pow(  sin(theta) , 2)* fff( x  /sin(theta) ); 
	
	// fff(x) doesnt like negative arguments, sin(pi) ~ -2e-13, take abs for now(requires cmath) 4-22-16 removed abs by using less precisepi value	
	
	return dpsyn;

}
Beispiel #8
0
fourth()
{
 n4(xnxt,ynxt,h,w4);
 fs(xnxt,ynxt);
xnxt+=s/2;
 ggg(xnxt,ynxt,h,wg);
 aaa(xnxt,ynxt,h,wa);
 mmm(xnxt,ynxt,h,wm);
 eee(xnxt,ynxt,h,we);
xnxt+=s/2;
 ooo(xnxt,ynxt,h,wo);
 vvv(xnxt,ynxt,h,wv);
 eee(xnxt,ynxt,h,we);
 rrr(xnxt,ynxt,h,wr);
xnxt+=s/2;
 iii(xnxt,ynxt,h,wi);
 fff(xnxt,ynxt,h,wf);
xnxt+=s/2;
 yyy(xnxt,ynxt,h,wy);
 ooo(xnxt,ynxt,h,wo);
 uuu(xnxt,ynxt,h,wu);
xnxt+=s/2;
 mmm(xnxt,ynxt,h,wm);
 iii(xnxt,ynxt,h,wi);
 sss(xnxt,ynxt,h,ws);
 sss(xnxt,ynxt,h,ws);
xnxt+=s/2;
 n5(xnxt,ynxt,h,w5);
xnxt+=s/2;
 bbb(xnxt,ynxt,h,wb);
 aaa(xnxt,ynxt,h,wa);
 lll(xnxt,ynxt,h,wl);
 lll(xnxt,ynxt,h,wl);
 ooo(xnxt,ynxt,h,wo);
 ooo(xnxt,ynxt,h,wo);
 nnn(xnxt,ynxt,h,wn);
 sss(xnxt,ynxt,h,ws);
  
}
Beispiel #9
0
int main(void)
{
	fff();
	ggg();
	return 1;
}
Beispiel #10
0
int
main ()
{
  foo<long> fff (5);
  return fff.pub (3);
}