src/corelib/kernel/qmath.cpp
changeset 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
-1:000000000000 0:1918ee327afb
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
       
     6 **
       
     7 ** This file is part of the QtCore module of the Qt Toolkit.
       
     8 **
       
     9 ** $QT_BEGIN_LICENSE:LGPL$
       
    10 ** No Commercial Usage
       
    11 ** This file contains pre-release code and may not be distributed.
       
    12 ** You may use this file in accordance with the terms and conditions
       
    13 ** contained in the Technology Preview License Agreement accompanying
       
    14 ** this package.
       
    15 **
       
    16 ** GNU Lesser General Public License Usage
       
    17 ** Alternatively, this file may be used under the terms of the GNU Lesser
       
    18 ** General Public License version 2.1 as published by the Free Software
       
    19 ** Foundation and appearing in the file LICENSE.LGPL included in the
       
    20 ** packaging of this file.  Please review the following information to
       
    21 ** ensure the GNU Lesser General Public License version 2.1 requirements
       
    22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    23 **
       
    24 ** In addition, as a special exception, Nokia gives you certain additional
       
    25 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    27 **
       
    28 ** If you have questions regarding the use of this file, please contact
       
    29 ** Nokia at qt-info@nokia.com.
       
    30 **
       
    31 **
       
    32 **
       
    33 **
       
    34 **
       
    35 **
       
    36 **
       
    37 **
       
    38 ** $QT_END_LICENSE$
       
    39 **
       
    40 ****************************************************************************/
       
    41 
       
    42 #include <QtCore/qmath.h>
       
    43 
       
    44 QT_BEGIN_NAMESPACE
       
    45 
       
    46 const qreal qt_sine_table[QT_SINE_TABLE_SIZE] = {
       
    47     0.0,
       
    48 	0.024541228522912288,
       
    49 	0.049067674327418015,
       
    50 	0.073564563599667426,
       
    51 	0.098017140329560604,
       
    52 	0.1224106751992162,
       
    53 	0.14673047445536175,
       
    54 	0.17096188876030122,
       
    55 	0.19509032201612825,
       
    56 	0.2191012401568698,
       
    57 	0.24298017990326387,
       
    58 	0.26671275747489837,
       
    59 	0.29028467725446233,
       
    60 	0.31368174039889152,
       
    61 	0.33688985339222005,
       
    62 	0.35989503653498811,
       
    63 	0.38268343236508978,
       
    64 	0.40524131400498986,
       
    65 	0.42755509343028208,
       
    66 	0.44961132965460654,
       
    67 	0.47139673682599764,
       
    68 	0.49289819222978404,
       
    69 	0.51410274419322166,
       
    70 	0.53499761988709715,
       
    71 	0.55557023301960218,
       
    72 	0.57580819141784534,
       
    73 	0.59569930449243336,
       
    74 	0.61523159058062682,
       
    75 	0.63439328416364549,
       
    76 	0.65317284295377676,
       
    77 	0.67155895484701833,
       
    78 	0.68954054473706683,
       
    79 	0.70710678118654746,
       
    80 	0.72424708295146689,
       
    81 	0.74095112535495911,
       
    82 	0.75720884650648446,
       
    83 	0.77301045336273699,
       
    84 	0.78834642762660623,
       
    85 	0.80320753148064483,
       
    86 	0.81758481315158371,
       
    87 	0.83146961230254524,
       
    88 	0.84485356524970701,
       
    89     0.85772861000027212,
       
    90 	0.87008699110871135,
       
    91 	0.88192126434835494,
       
    92 	0.89322430119551532,
       
    93 	0.90398929312344334,
       
    94 	0.91420975570353069,
       
    95 	0.92387953251128674,
       
    96 	0.93299279883473885,
       
    97 	0.94154406518302081,
       
    98 	0.94952818059303667,
       
    99 	0.95694033573220894,
       
   100 	0.96377606579543984,
       
   101 	0.97003125319454397,
       
   102 	0.97570213003852857,
       
   103 	0.98078528040323043,
       
   104 	0.98527764238894122,
       
   105 	0.98917650996478101,
       
   106 	0.99247953459870997,
       
   107 	0.99518472667219682,
       
   108 	0.99729045667869021,
       
   109 	0.99879545620517241,
       
   110 	0.99969881869620425,
       
   111 	1.0,
       
   112 	0.99969881869620425,
       
   113 	0.99879545620517241,
       
   114 	0.99729045667869021,
       
   115 	0.99518472667219693,
       
   116 	0.99247953459870997,
       
   117 	0.98917650996478101,
       
   118 	0.98527764238894122,
       
   119 	0.98078528040323043,
       
   120 	0.97570213003852857,
       
   121 	0.97003125319454397,
       
   122 	0.96377606579543984,
       
   123 	0.95694033573220894,
       
   124 	0.94952818059303667,
       
   125 	0.94154406518302081,
       
   126 	0.93299279883473885,
       
   127 	0.92387953251128674,
       
   128 	0.91420975570353069,
       
   129 	0.90398929312344345,
       
   130 	0.89322430119551521,
       
   131 	0.88192126434835505,
       
   132 	0.87008699110871146,
       
   133 	0.85772861000027212,
       
   134 	0.84485356524970723,
       
   135 	0.83146961230254546,
       
   136 	0.81758481315158371,
       
   137 	0.80320753148064494,
       
   138 	0.78834642762660634,
       
   139 	0.7730104533627371,
       
   140 	0.75720884650648468,
       
   141 	0.74095112535495899,
       
   142 	0.72424708295146689,
       
   143 	0.70710678118654757,
       
   144 	0.68954054473706705,
       
   145 	0.67155895484701855,
       
   146 	0.65317284295377664,
       
   147 	0.63439328416364549,
       
   148 	0.61523159058062693,
       
   149 	0.59569930449243347,
       
   150 	0.57580819141784545,
       
   151 	0.55557023301960218,
       
   152 	0.53499761988709715,
       
   153 	0.51410274419322177,
       
   154 	0.49289819222978415,
       
   155 	0.47139673682599786,
       
   156 	0.44961132965460687,
       
   157 	0.42755509343028203,
       
   158 	0.40524131400498992,
       
   159 	0.38268343236508989,
       
   160 	0.35989503653498833,
       
   161 	0.33688985339222033,
       
   162 	0.31368174039889141,
       
   163 	0.29028467725446239,
       
   164 	0.26671275747489848,
       
   165 	0.24298017990326407,
       
   166 	0.21910124015687005,
       
   167 	0.19509032201612861,
       
   168 	0.17096188876030122,
       
   169 	0.1467304744553618,
       
   170 	0.12241067519921635,
       
   171 	0.098017140329560826,
       
   172 	0.073564563599667732,
       
   173 	0.049067674327417966,
       
   174 	0.024541228522912326,
       
   175 	0.0,
       
   176 	-0.02454122852291208,
       
   177 	-0.049067674327417724,
       
   178 	-0.073564563599667496,
       
   179 	-0.09801714032956059,
       
   180 	-0.1224106751992161,
       
   181 	-0.14673047445536158,
       
   182 	-0.17096188876030097,
       
   183 	-0.19509032201612836,
       
   184 	-0.2191012401568698,
       
   185 	-0.24298017990326382,
       
   186 	-0.26671275747489825,
       
   187 	-0.29028467725446211,
       
   188 	-0.31368174039889118,
       
   189 	-0.33688985339222011,
       
   190 	-0.35989503653498811,
       
   191 	-0.38268343236508967,
       
   192 	-0.40524131400498969,
       
   193 	-0.42755509343028181,
       
   194 	-0.44961132965460665,
       
   195 	-0.47139673682599764,
       
   196 	-0.49289819222978393,
       
   197 	-0.51410274419322155,
       
   198 	-0.53499761988709693,
       
   199 	-0.55557023301960196,
       
   200 	-0.57580819141784534,
       
   201 	-0.59569930449243325,
       
   202 	-0.61523159058062671,
       
   203 	-0.63439328416364527,
       
   204 	-0.65317284295377653,
       
   205 	-0.67155895484701844,
       
   206 	-0.68954054473706683,
       
   207 	-0.70710678118654746,
       
   208 	-0.72424708295146678,
       
   209 	-0.74095112535495888,
       
   210 	-0.75720884650648423,
       
   211 	-0.77301045336273666,
       
   212 	-0.78834642762660589,
       
   213 	-0.80320753148064505,
       
   214 	-0.81758481315158382,
       
   215 	-0.83146961230254524,
       
   216 	-0.84485356524970701,
       
   217 	-0.85772861000027201,
       
   218 	-0.87008699110871135,
       
   219 	-0.88192126434835494,
       
   220 	-0.89322430119551521,
       
   221 	-0.90398929312344312,
       
   222 	-0.91420975570353047,
       
   223 	-0.92387953251128652,
       
   224 	-0.93299279883473896,
       
   225 	-0.94154406518302081,
       
   226 	-0.94952818059303667,
       
   227 	-0.95694033573220882,
       
   228 	-0.96377606579543984,
       
   229 	-0.97003125319454397,
       
   230 	-0.97570213003852846,
       
   231 	-0.98078528040323032,
       
   232 	-0.98527764238894111,
       
   233 	-0.9891765099647809,
       
   234 	-0.99247953459871008,
       
   235 	-0.99518472667219693,
       
   236 	-0.99729045667869021,
       
   237 	-0.99879545620517241,
       
   238 	-0.99969881869620425,
       
   239 	-1.0,
       
   240 	-0.99969881869620425,
       
   241 	-0.99879545620517241,
       
   242 	-0.99729045667869021,
       
   243 	-0.99518472667219693,
       
   244 	-0.99247953459871008,
       
   245 	-0.9891765099647809,
       
   246 	-0.98527764238894122,
       
   247 	-0.98078528040323043,
       
   248 	-0.97570213003852857,
       
   249 	-0.97003125319454397,
       
   250 	-0.96377606579543995,
       
   251 	-0.95694033573220894,
       
   252 	-0.94952818059303679,
       
   253 	-0.94154406518302092,
       
   254 	-0.93299279883473907,
       
   255 	-0.92387953251128663,
       
   256 	-0.91420975570353058,
       
   257 	-0.90398929312344334,
       
   258 	-0.89322430119551532,
       
   259 	-0.88192126434835505,
       
   260 	-0.87008699110871146,
       
   261 	-0.85772861000027223,
       
   262 	-0.84485356524970723,
       
   263 	-0.83146961230254546,
       
   264 	-0.81758481315158404,
       
   265 	-0.80320753148064528,
       
   266 	-0.78834642762660612,
       
   267 	-0.77301045336273688,
       
   268 	-0.75720884650648457,
       
   269 	-0.74095112535495911,
       
   270 	-0.724247082951467,
       
   271 	-0.70710678118654768,
       
   272 	-0.68954054473706716,
       
   273 	-0.67155895484701866,
       
   274 	-0.65317284295377709,
       
   275 	-0.63439328416364593,
       
   276 	-0.61523159058062737,
       
   277 	-0.59569930449243325,
       
   278 	-0.57580819141784523,
       
   279 	-0.55557023301960218,
       
   280 	-0.53499761988709726,
       
   281 	-0.51410274419322188,
       
   282 	-0.49289819222978426,
       
   283 	-0.47139673682599792,
       
   284 	-0.44961132965460698,
       
   285 	-0.42755509343028253,
       
   286 	-0.40524131400499042,
       
   287 	-0.38268343236509039,
       
   288 	-0.359895036534988,
       
   289 	-0.33688985339222,
       
   290 	-0.31368174039889152,
       
   291 	-0.2902846772544625,
       
   292 	-0.26671275747489859,
       
   293 	-0.24298017990326418,
       
   294 	-0.21910124015687016,
       
   295 	-0.19509032201612872,
       
   296 	-0.17096188876030177,
       
   297 	-0.14673047445536239,
       
   298 	-0.12241067519921603,
       
   299 	-0.098017140329560506,
       
   300 	-0.073564563599667412,
       
   301 	-0.049067674327418091,
       
   302 	-0.024541228522912448
       
   303 };
       
   304 
       
   305 QT_END_NAMESPACE