1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 22 /* 23 * Copyright 2011 Nexenta Systems, Inc. All rights reserved. 24 */ 25 /* 26 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 27 * Use is subject to license terms. 28 */ 29 30 #include "libm_inlines.h" 31 32 const double __vlibm_TBL_atan2[] = { 33 7.8539816339744827900e-01, 3.0616169978683830179e-17, 34 1.0000000000000000000e+00, 0, 35 7.7198905126506112140e-01, 2.6989956960083153652e-16, 36 9.7353506088256835938e-01, 0, 37 7.6068143954461309164e-01, -3.5178810518941914972e-16, 38 9.5174932479858398438e-01, 0, 39 7.4953661876353638860e-01, -3.2548100004524337476e-16, 40 9.3073129653930664062e-01, 0, 41 7.3854614984728339522e-01, -2.0775571023910406668e-16, 42 9.1042709350585937500e-01, 0, 43 7.2770146962041337702e-01, 3.8883249403168348802e-16, 44 8.9078664779663085938e-01, 0, 45 7.1699492488093774512e-01, -4.0468841511547224071e-16, 46 8.7176513671875000000e-01, 0, 47 7.0641813488653149022e-01, 5.6902424353981484031e-17, 48 8.5331964492797851562e-01, 0, 49 6.9596351101035658360e-01, 2.8245513321075021303e-16, 50 8.3541154861450195312e-01, 0, 51 6.8562363680534943455e-01, -4.2316970721658854064e-16, 52 8.1800508499145507812e-01, 0, 53 6.7539055666438230219e-01, 4.3535917281300047233e-16, 54 8.0106592178344726562e-01, 0, 55 6.6525763346931832132e-01, 1.1830431602404727977e-17, 56 7.8456401824951171875e-01, 0, 57 6.5521767574310185722e-01, -1.7435923100651044208e-16, 58 7.6847028732299804688e-01, 0, 59 6.4526390999481897381e-01, -1.4741927403093983947e-16, 60 7.5275802612304687500e-01, 0, 61 6.3538979894204850041e-01, 1.5734535069995660853e-16, 62 7.3740243911743164062e-01, 0, 63 6.2558914346942717799e-01, -2.8175588856316910960e-16, 64 7.2238063812255859375e-01, 0, 65 6.1585586476157949676e-01, -4.3056167357725226449e-16, 66 7.0767116546630859375e-01, 0, 67 6.0618408027576098362e-01, 1.5018013918429320289e-16, 68 6.9325399398803710938e-01, 0, 69 5.9656817827486730010e-01, 5.5271942033557644157e-17, 70 6.7911052703857421875e-01, 0, 71 5.8700289083426504533e-01, -8.2411369282676383293e-17, 72 6.6522359848022460938e-01, 0, 73 5.7748303053627658699e-01, 4.9400383775709159558e-17, 74 6.5157699584960937500e-01, 0, 75 5.6800353968303252117e-01, 2.9924431103311109543e-16, 76 6.3815546035766601562e-01, 0, 77 5.5855953863493823519e-01, -2.0306003403868777403e-16, 78 6.2494468688964843750e-01, 0, 79 5.4914706708329674711e-01, 2.8255378613779667461e-17, 80 6.1193227767944335938e-01, 0, 81 5.3976176660618069292e-01, 1.6370248781078747995e-16, 82 5.9910583496093750000e-01, 0, 83 5.3039888601412332747e-01, -7.6196097360093680134e-17, 84 5.8645296096801757812e-01, 0, 85 5.2105543924318808990e-01, -2.2400815668154739561e-16, 86 5.7396411895751953125e-01, 0, 87 5.1172778873967050828e-01, -3.6888136019899681185e-16, 88 5.6162929534912109375e-01, 0, 89 5.0241199666452196482e-01, -2.5412891474397011281e-16, 90 5.4943847656250000000e-01, 0, 91 4.9310493954293743712e-01, 4.4132186128251152229e-16, 92 5.3738307952880859375e-01, 0, 93 4.8380436844750995817e-01, -2.7844387907776656488e-16, 94 5.2545595169067382812e-01, 0, 95 4.7450670361463753721e-01, -2.0494355197368286028e-16, 96 5.1364850997924804688e-01, 0, 97 4.6367660027976320691e-01, 3.1709878607954760668e-16, 98 5.0003623962402343750e-01, 0, 99 4.5304753104003925301e-01, 3.3593436122420574865e-16, 100 4.8681926727294921875e-01, 0, 101 4.4423658037407065535e-01, 2.1987183192008082015e-17, 102 4.7596645355224609375e-01, 0, 103 4.3567016972500294258e-01, 3.0118422805369552650e-16, 104 4.6550178527832031250e-01, 0, 105 4.2733152672544871820e-01, -3.2667693224866479909e-16, 106 4.5539522171020507812e-01, 0, 107 4.1920540176693954493e-01, -2.2454273841113897647e-16, 108 4.4561982154846191406e-01, 0, 109 4.1127722812701872357e-01, -3.1620568973494653391e-16, 110 4.3615055084228515625e-01, 0, 111 4.0353384063084263289e-01, -3.5932009901481421723e-16, 112 4.2696499824523925781e-01, 0, 113 3.9596319345246833166e-01, -4.0281533417458698585e-16, 114 4.1804289817810058594e-01, 0, 115 3.8855405220339722661e-01, 1.6132231486045176674e-16, 116 4.0936565399169921875e-01, 0, 117 3.8129566313738116889e-01, 1.7684657060650804570e-16, 118 4.0091586112976074219e-01, 0, 119 3.7417884791401867517e-01, 2.6897604227426977619e-16, 120 3.9267849922180175781e-01, 0, 121 3.6719421967585041955e-01, -4.5886151448673745001e-17, 122 3.8463878631591796875e-01, 0, 123 3.6033388248727771241e-01, 1.5804115573136074946e-16, 124 3.7678408622741699219e-01, 0, 125 3.5358982224579182940e-01, 1.2624619863035782939e-16, 126 3.6910200119018554688e-01, 0, 127 3.4695498404186952968e-01, 9.3221684607372865177e-17, 128 3.6158156394958496094e-01, 0, 129 3.4042268308109679964e-01, 2.7697913559445449137e-16, 130 3.5421252250671386719e-01, 0, 131 3.3398684598563566084e-01, 3.6085337449716011085e-16, 132 3.4698557853698730469e-01, 0, 133 3.2764182824591436827e-01, 2.0581506352606456186e-16, 134 3.3989214897155761719e-01, 0, 135 3.2138200938788497041e-01, -1.9015787485430693661e-16, 136 3.3292388916015625000e-01, 0, 137 3.1520245348069497737e-01, 2.6961839659264087022e-16, 138 3.2607340812683105469e-01, 0, 139 3.0909871873117023000e-01, -1.5641891686756272625e-16, 140 3.1933403015136718750e-01, 0, 141 3.0306644308947827682e-01, 2.8801634211591956223e-16, 142 3.1269931793212890625e-01, 0, 143 2.9710135482774191473e-01, -4.3148994478973365819e-16, 144 3.0616307258605957031e-01, 0, 145 2.9120015759141004708e-01, -6.8539854790808585159e-17, 146 2.9972028732299804688e-01, 0, 147 2.8535879880370362827e-01, -1.2231638445300492682e-16, 148 2.9336524009704589844e-01, 0, 149 2.7957422506893880865e-01, -4.6707752931043135528e-17, 150 2.8709340095520019531e-01, 0, 151 2.7384352102802367313e-01, -4.1215636366229625876e-16, 152 2.8090047836303710938e-01, 0, 153 2.6816369484161040049e-01, -2.3700583122400495333e-16, 154 2.7478218078613281250e-01, 0, 155 2.6253212627627764419e-01, 2.3123213692190889610e-16, 156 2.6873469352722167969e-01, 0, 157 2.5694635355759309903e-01, -4.0638513814701264145e-16, 158 2.6275444030761718750e-01, 0, 159 2.5140385572454615470e-01, -3.4795333793554943723e-16, 160 2.5683784484863281250e-01, 0, 161 2.4500357070096612233e-01, 6.6542334848010259289e-17, 162 2.5002646446228027344e-01, 0, 163 2.3877766609573036760e-01, -2.7756633678549343650e-16, 164 2.4342155456542968750e-01, 0, 165 2.3365669377188336142e-01, 3.2700803838522067998e-16, 166 2.3800384998321533203e-01, 0, 167 2.2870810463931334766e-01, -4.4279127662219799521e-16, 168 2.3278105258941650391e-01, 0, 169 2.2391820542294382790e-01, 3.7558889374284208052e-16, 170 2.2773718833923339844e-01, 0, 171 2.1927501815429550902e-01, -1.4829838176513811186e-16, 172 2.2285830974578857422e-01, 0, 173 2.1476740847367459253e-01, -2.0535381496063397578e-17, 174 2.1813154220581054688e-01, 0, 175 2.1038568111737454558e-01, -4.2826767738736168650e-16, 176 2.1354568004608154297e-01, 0, 177 2.0612057974373865221e-01, 4.2108051749502232359e-16, 178 2.0909011363983154297e-01, 0, 179 2.0196410359405447821e-01, 3.5157118083511092869e-16, 180 2.0475566387176513672e-01, 0, 181 1.9790861144712756925e-01, 3.7894950972257700994e-16, 182 2.0053362846374511719e-01, 0, 183 1.9394752160084305359e-01, 2.8270367403478935534e-16, 184 1.9641649723052978516e-01, 0, 185 1.9007440763641536563e-01, -2.0842758095683676397e-16, 186 1.9239699840545654297e-01, 0, 187 1.8628369629742813629e-01, 3.4710917040399448932e-16, 188 1.8846881389617919922e-01, 0, 189 1.8256998712939509488e-01, 1.1053834120570125251e-16, 190 1.8462586402893066406e-01, 0, 191 1.7892875067284830237e-01, 3.0486232913366680305e-16, 192 1.8086302280426025391e-01, 0, 193 1.7535529778449010507e-01, -2.3810135019970148624e-16, 194 1.7717504501342773438e-01, 0, 195 1.7184559192514736736e-01, 5.1432582846210893916e-17, 196 1.7355740070343017578e-01, 0, 197 1.6839590847744290159e-01, 3.1605623296041433586e-18, 198 1.7000591754913330078e-01, 0, 199 1.6500283902547518977e-01, 1.5405422268770998251e-16, 200 1.6651678085327148438e-01, 0, 201 1.6166306303174859949e-01, 4.0042241517254928672e-16, 202 1.6308629512786865234e-01, 0, 203 1.5837358268281231943e-01, -2.2786616251622967291e-16, 204 1.5971112251281738281e-01, 0, 205 1.5513160990288810126e-01, -3.7547723514797166336e-16, 206 1.5638816356658935547e-01, 0, 207 1.5193468535499299321e-01, 4.3497510505554267446e-16, 208 1.5311467647552490234e-01, 0, 209 1.4878033155427861089e-01, -2.3102860235324261895e-16, 210 1.4988791942596435547e-01, 0, 211 1.4566628729590647140e-01, 9.9227592950040279415e-17, 212 1.4670538902282714844e-01, 0, 213 1.4259050967286590605e-01, -3.3869909683813096906e-18, 214 1.4356482028961181641e-01, 0, 215 1.3955105903633846509e-01, 1.5500435650773331566e-17, 216 1.4046406745910644531e-01, 0, 217 1.3654610022831903393e-01, 3.3965918616682805753e-16, 218 1.3740110397338867188e-01, 0, 219 1.3357402082462854764e-01, 2.7572431581527535421e-16, 220 1.3437414169311523438e-01, 0, 221 1.3063319828908959153e-01, -3.4667213797076707331e-16, 222 1.3138139247894287109e-01, 0, 223 1.2772200049776749609e-01, 3.1089261947725651968e-16, 224 1.2842106819152832031e-01, 0, 225 1.2436931430778752627e-01, -4.0654251891464630059e-16, 226 1.2501454353332519531e-01, 0, 227 1.2111683701666819957e-01, -3.9381654342464836012e-16, 228 1.2171256542205810547e-01, 0, 229 1.1844801833536511282e-01, -3.6673155595150283444e-16, 230 1.1900508403778076172e-01, 0, 231 1.1587365536613614125e-01, -1.5026628801318421951e-16, 232 1.1639505624771118164e-01, 0, 233 1.1338607085741525538e-01, 1.2886806274050538880e-16, 234 1.1387449502944946289e-01, 0, 235 1.1097844020819369604e-01, 2.3848343623577768044e-16, 236 1.1143630743026733398e-01, 0, 237 1.0864456107308662069e-01, 4.2065430313285469408e-16, 238 1.0907405614852905273e-01, 0, 239 1.0637891628473727934e-01, -4.6883543790348472687e-18, 240 1.0678201913833618164e-01, 0, 241 1.0417650062205296990e-01, 1.4774925414624453292e-16, 242 1.0455501079559326172e-01, 0, 243 1.0203276464730581807e-01, -1.5677032794816452332e-16, 244 1.0238832235336303711e-01, 0, 245 9.9943617083734892503e-02, 3.4511310907979792828e-16, 246 1.0027772188186645508e-01, 0, 247 9.7905249824711049200e-02, 3.4489485563461708496e-16, 248 9.8219275474548339844e-02, 0, 249 9.5914316649349906641e-02, -1.3214510886789011569e-17, 250 9.6209526062011718750e-02, 0, 251 9.3967698614664918466e-02, 1.1048427091217964090e-16, 252 9.4245254993438720703e-02, 0, 253 9.2062564267554769515e-02, -3.7297463814697759309e-16, 254 9.2323541641235351562e-02, 0, 255 9.0196252506350660383e-02, -3.5280143043576718079e-16, 256 9.0441644191741943359e-02, 0, 257 8.8366391663268650802e-02, -6.1140673227541621183e-17, 258 8.8597118854522705078e-02, 0, 259 8.6570782100201526532e-02, -2.0998844594957629702e-16, 260 8.6787700653076171875e-02, 0, 261 8.4807337678923566671e-02, 3.9530981588194673068e-16, 262 8.5011243820190429688e-02, 0, 263 8.3074323040850828193e-02, -4.3022503210464894539e-17, 264 8.3265960216522216797e-02, 0, 265 8.1369880712663267275e-02, -6.3063867569127169744e-18, 266 8.1549942493438720703e-02, 0, 267 7.9692445771216036121e-02, -5.0787623072962671502e-17, 268 7.9861581325531005859e-02, 0, 269 7.8040568735575632786e-02, -3.8810063021216721741e-16, 270 7.8199386596679687500e-02, 0, 271 7.6412797391314235540e-02, 4.1246529500495762995e-16, 272 7.6561868190765380859e-02, 0, 273 7.4807854772808823896e-02, -3.7025599052186724156e-16, 274 7.4947714805603027344e-02, 0, 275 7.3224639528778112663e-02, 4.2209138483206712401e-17, 276 7.3355793952941894531e-02, 0, 277 7.1661929761571485642e-02, -3.2074473649855177622e-16, 278 7.1784853935241699219e-02, 0, 279 7.0118738881148168218e-02, -2.5371257235753296804e-16, 280 7.0233881473541259766e-02, 0, 281 6.8594137996416115755e-02, 3.3796987842548399135e-16, 282 6.8701922893524169922e-02, 0, 283 6.7087137393172291411e-02, 5.5061492696328852397e-17, 284 6.7187964916229248047e-02, 0, 285 6.5596983299946565182e-02, -2.1580863111502565280e-16, 286 6.5691232681274414062e-02, 0, 287 6.4122802037412718335e-02, -3.1315661827469233434e-16, 288 6.4210832118988037109e-02, 0, 289 6.2426231582525915087e-02, -2.5758980071296622188e-16, 290 6.2507450580596923828e-02, 0, 291 6.0781559928021700046e-02, 1.3736899336217710591e-16, 292 6.0856521129608154297e-02, 0, 293 5.9432882624005145544e-02, 2.2246097394328856474e-16, 294 5.9502959251403808594e-02, 0, 295 5.8132551274581167888e-02, -6.2525053236379489390e-18, 296 5.8198124170303344727e-02, 0, 297 5.6876611930681164608e-02, -2.6589930995607417149e-16, 298 5.6938022375106811523e-02, 0, 299 5.5661522654748551986e-02, -4.2736362859832186197e-16, 300 5.5719077587127685547e-02, 0, 301 5.4484124463757943602e-02, -1.6708067365310384253e-16, 302 5.4538100957870483398e-02, 0, 303 5.3341582449436764080e-02, 3.3271673004611311850e-17, 304 5.3392231464385986328e-02, 0, 305 5.2231267345892007370e-02, -3.5593396674200571616e-16, 306 5.2278816699981689453e-02, 0, 307 5.1150874758829623090e-02, 1.4432815841187114832e-16, 308 5.1195532083511352539e-02, 0, 309 5.0098306612679444072e-02, 9.4680943793589404083e-17, 310 5.0140261650085449219e-02, 0, 311 4.9071641675614507960e-02, 2.1131168520301896817e-16, 312 4.9111068248748779297e-02, 0, 313 4.8069135772851545596e-02, 1.6035336741307516296e-16, 314 4.8106193542480468750e-02, 0, 315 4.7089192241088539959e-02, -2.2491738698796901479e-16, 316 4.7124028205871582031e-02, 0, 317 4.6130362086062248750e-02, -1.5111423469578965206e-16, 318 4.6163111925125122070e-02, 0, 319 4.5191314382707403752e-02, 4.1989325207399786612e-16, 320 4.5222103595733642578e-02, 0, 321 4.4270836390474244126e-02, -4.1432635292331004454e-16, 322 4.4299781322479248047e-02, 0, 323 4.3367774164955186222e-02, -3.0615383054587355892e-16, 324 4.3394982814788818359e-02, 0, 325 4.2481121875321825598e-02, -3.6730166956273555173e-16, 326 4.2506694793701171875e-02, 0, 327 4.1609902899457651415e-02, -4.4226425958068821782e-16, 328 4.1633933782577514648e-02, 0, 329 4.0753259129372665370e-02, 1.9801161516527046872e-16, 330 4.0775835514068603516e-02, 0, 331 3.9910361780060910064e-02, 8.2560620036613164573e-18, 332 3.9931565523147583008e-02, 0, 333 3.9080441183869218946e-02, 3.9908991939242971628e-17, 334 3.9100348949432373047e-02, 0, 335 3.8262816593271686827e-02, 9.5182237812195590276e-17, 336 3.8281500339508056641e-02, 0, 337 3.7456806948784837630e-02, 1.5213508760679563439e-16, 338 3.7474334239959716797e-02, 0, 339 3.6661849947035918262e-02, 7.3335516005184616486e-17, 340 3.6678284406661987305e-02, 0, 341 3.5877353272533163420e-02, -1.3007348019891714540e-16, 342 3.5892754793167114258e-02, 0, 343 3.5102754135096780885e-02, -2.9903662298950558656e-16, 344 3.5117179155349731445e-02, 0, 345 3.4337638360670830195e-02, 2.9656295131966114331e-16, 346 3.4351140260696411133e-02, 0, 347 3.3581472523789734907e-02, 3.4810947205572817820e-16, 348 3.3594101667404174805e-02, 0, 349 3.2833871859357266487e-02, -3.8885440174405159838e-16, 350 3.2845675945281982422e-02, 0, 351 3.2094421679560447558e-02, 5.8805134853032009978e-17, 352 3.2105445861816406250e-02, 0, 353 3.1243584858944295490e-02, 2.8737383773884313066e-17, 354 3.1253755092620849609e-02, 0, 355 0, 0, 0, 0 356 }; 357