Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:50:38

0001 #include "DataFormats/Math/interface/SIMDVec.h"
0002 
0003 #include <cmath>
0004 #include <iostream>
0005 #include <iomanip>
0006 #include <typeinfo>
0007 template <typename T>
0008 
0009 void print(T a, T b) {
0010   using namespace mathSSE;
0011   std::cout << typeid(T).name() << " " << a << " " << b << (samesign(a, b) ? " " : " not ") << "same sign" << std::endl;
0012 }
0013 
0014 int main() {
0015   using namespace mathSSE;
0016   // int mn = -0;
0017   // std::cout << mn << std::endl;
0018   // std::cout << std::hex << mn << std::endl;
0019   print(123, -902030);
0020   print(123LL, -902030LL);
0021   print(-123.f, 123.e-4f);
0022   print(-123., 123.e-4);
0023 
0024   print(123, 902030);
0025   print(123LL, 902030LL);
0026   print(123.f, 123.e-4f);
0027   print(123., 123.e-4);
0028 
0029   print(-123, -902030);
0030   print(-123LL, -902030LL);
0031   print(-123.f, -123.e-4f);
0032   print(-123., -123.e-4);
0033 
0034   //  int const mask= 0x80000000;
0035   // std::cout << mask << std::endl;
0036   // std::cout << std::hex << mask << std::endl;
0037 
0038   return 0;
0039 }