File indexing completed on 2026-04-09 07:49:21
0001
0002
0003 #include <iostream>
0004 #include "ssincos.h"
0005 #include "SRng.hh"
0006
0007 #ifndef M_PIf
0008 #define M_PIf 3.14159265358979323846f
0009 #endif
0010
0011
0012 int main(int argc, char** argv)
0013 {
0014 unsigned seed = 0 ;
0015
0016 SRng<double> rng(seed);
0017
0018 double sinPhi, cosPhi, u ;
0019
0020 for(unsigned i=0 ; i < 10 ; i++)
0021 {
0022 u = rng();
0023
0024 double phi = 2.*M_PIf*u ;
0025
0026 ssincos(phi,sinPhi,cosPhi);
0027
0028 double dd = sinPhi*sinPhi + cosPhi*cosPhi ;
0029
0030 std::cout << u << " " << sinPhi << " " << cosPhi << " " << dd << std::endl ;
0031 }
0032 }
0033