CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/DataFormats/Math/src/FastMath.cc

Go to the documentation of this file.
00001 #include "DataFormats/Math/interface/FastMath.h"
00002 namespace fastmath_details {
00003   float atanbuf_[257 * 2];
00004   double datanbuf_[513 * 2];
00005 
00006   namespace {
00007     // ====================================================================
00008     // arctan initialization
00009     // =====================================================================
00010     struct Initatan {
00011       Initatan() {
00012         unsigned int ind;
00013         for (ind = 0; ind <= 256; ind++) {
00014           double v = ind / 256.0;
00015           double asinv = ::asin(v);
00016           atanbuf_[ind * 2    ] = ::cos(asinv);
00017           atanbuf_[ind * 2 + 1] = asinv;
00018         }
00019         for (ind = 0; ind <= 512; ind++) {
00020           double v = ind / 512.0;
00021           double asinv = ::asin(v);
00022           datanbuf_[ind * 2    ] = ::cos(asinv);
00023           datanbuf_[ind * 2 + 1] = asinv;
00024         }
00025       }
00026     };
00027     static Initatan initAtan;
00028   }
00029 }