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 /*
  27  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  28  * Use is subject to license terms.
  29  */
  30 
  31 /*
  32  * table of sinl(x) where x is 0.15625 + i*0.03125, i=0,1,...,74.
  33  * {0x3ffc4000,0,0,0} --> (inc 0x800) -->  {0x3ffe9000,0,0,0}
  34  *    0.15625              0.03125           0.78125  (pi/4 = 0.785395663...)
  35  */
  36 
  37 #include "libm.h"
  38 
  39 const long double _TBL_sinl_hi[] = {
  40         +1.556149927735560412099206432035162581492e-0001L,
  41         +1.594724589318434199425963881130908091043e-0001L,
  42         +1.633274917366128508468661724543543700180e-0001L,
  43         +1.671800323648067343709660282007512722777e-0001L,
  44         +1.710300220313950192813479692398343312832e-0001L,
  45         +1.748774019902721898956853691085201901772e-0001L,
  46         +1.787221135351536593753562418641807235164e-0001L,
  47         +1.825640980004715553995456513594130154574e-0001L,
  48         +1.864032967622698845523799831032052611919e-0001L,
  49         +1.902396512390990617639858876307573287214e-0001L,
  50         +1.940731028929097911560552002141454036336e-0001L,
  51         +1.979035932299462846523939109918127853182e-0001L,
  52         +2.017310638016388047250381511640009707423e-0001L,
  53         +2.055554562054955176568330206054936963632e-0001L,
  54         +2.093767120859936437118907527248816522107e-0001L,
  55         +2.131947731354698906160730331184784624987e-0001L,
  56         +2.170095810950101567605780958260553963420e-0001L,
  57         +2.208210777553384905528563479277490523429e-0001L,
  58         +2.246292049577052923504285497964248198189e-0001L,
  59         +2.284339045947747454247378313461956799859e-0001L,
  60         +2.322351186115114624139308777462358722636e-0001L,
  61         +2.360327890060663337354342917945180835158e-0001L,
  62         +2.398268578306615644413692518108865737937e-0001L,
  63         +2.436172671924748860122309477052146367777e-0001L,
  64         +2.474039592545229295968487048493892032583e-0001L,
  65         +2.549659604158784674875565748648726276685e-0001L,
  66         +2.625123997691532814509496263956929310415e-0001L,
  67         +2.700428167185850315527550636188270542366e-0001L,
  68         +2.775567516463363259220234468281285678680e-0001L,
  69         +2.850537459405474245877630333232525606110e-0001L,
  70         +2.925333420233275436247023264939134225079e-0001L,
  71         +2.999950833786830511632482820116999437532e-0001L,
  72         +3.074385145803808506705029582019820907725e-0001L,
  73         +3.148631813197452508650363151269390156066e-0001L,
  74         +3.222686304333866256877459198931880313050e-0001L,
  75         +3.296544099308601719143177251264631756945e-0001L,
  76         +3.370200690222530762612817541738100244419e-0001L,
  77         +3.443651581456984082071720464722237468910e-0001L,
  78         +3.516892289948140592225848969555470155541e-0001L,
  79         +3.589918345460650536777102991528689411936e-0001L,
  80         +3.662725290860475613729093517162641768533e-0001L,
  81         +3.735308682386929464168397526608481120900e-0001L,
  82         +3.807664089923901920572007033888966750813e-0001L,
  83         +3.879787097270250460510796908137419597834e-0001L,
  84         +3.951673302409342362448326404196536570776e-0001L,
  85         +4.023318317777731112171055988809823868862e-0001L,
  86         +4.094717770532950661226940270114522362676e-0001L,
  87         +4.165867302820411192591124488310696565000e-0001L,
  88         +4.236762572039380103616839880311024798208e-0001L,
  89         +4.307399251108031972163215178508491897943e-0001L,
  90         +4.377773028727551328616189747027966801523e-0001L,
  91         +4.447879609645272114330560125295252111499e-0001L,
  92         +4.517714714916837765816887501340628695303e-0001L,
  93         +4.587274082167365923772950289728747732442e-0001L,
  94         +4.656553465851601826811995125075467791328e-0001L,
  95         +4.725548637513044511465513178085169418350e-0001L,
  96         +4.794255386042030002732879352155714019245e-0001L,
  97         +4.930786857539230572651365527534871205832e-0001L,
  98         +5.066114548142573676422960008938671919466e-0001L,
  99         +5.200205419537270047602136998746747297451e-0001L,
 100         +5.333026735360201733291311033081615288994e-0001L,
 101         +5.464546069192035644033495537494110008818e-0001L,
 102         +5.594731312473668773848440060031166884132e-0001L,
 103         +5.723550682345072403849537068245036075406e-0001L,
 104         +5.850972729404621548053993141500804585059e-0001L,
 105         +5.976966345387015312386476189673343370299e-0001L,
 106         +6.101500770757913712737423935661832200218e-0001L,
 107         +6.224545602223436830419267050904433302049e-0001L,
 108         +6.346070800152692968503099142036714364826e-0001L,
 109         +6.466046695911523705240421598828007629792e-0001L,
 110         +6.584443999105675415895839548840419894459e-0001L,
 111         +6.701233804731628946545315835006484946172e-0001L,
 112         +6.816387600233341667332419527798939078545e-0001L,
 113         +6.929877272463179102818154908230482095679e-0001L,
 114         +7.041675114545336727800595099739428438828e-0001L,
 115 };
 116 
 117 const long double _TBL_sinl_lo[] = {
 118         -7.839895634192879801217180506294972695887e-0036L,
 119         -7.579278167533093253112813720340914585189e-0036L,
 120         +1.813803443011554857703679023007542917336e-0036L,
 121         -5.685040200337201343842157163322014327778e-0036L,
 122         +7.013958751874876088754160302032414326691e-0036L,
 123         +9.101164084055805006113433827277389417722e-0036L,
 124         -1.529069265172651032025475612605940319203e-0036L,
 125         -5.873100812266872079952884219254900231461e-0036L,
 126         +1.764603048068267800105867159753318395454e-0036L,
 127         +1.747799267790272859521729635868399475234e-0036L,
 128         -9.673047410519982672089452429449289994858e-0036L,
 129         -7.666827750837122707923169727244402427704e-0036L,
 130         -4.275134347549669784351512906173841196088e-0036L,
 131         -1.826904072780322152815985026139121969706e-0036L,
 132         -1.594702873443294499653146384825158092559e-0036L,
 133         -7.180615084240582786256765419723871383233e-0036L,
 134         +1.073564887942168318128295491982011935257e-0035L,
 135         +6.166267602604185314123111207543917974633e-0036L,
 136         +2.420615108492974698446957518700585915995e-0036L,
 137         +1.864291640707538541155008952901532832506e-0036L,
 138         -4.969304833641910200750246243329289676583e-0036L,
 139         +7.191910920600591837788283739445222790835e-0036L,
 140         +2.398670365698962872409384444450714480056e-0036L,
 141         +2.625717623049256499265563616201152710192e-0036L,
 142         -7.364870011085995329435971152758116180239e-0036L,
 143         +2.202803779185347210050716883280741537850e-0035L,
 144         +3.249236770720310646731771785718217268891e-0036L,
 145         +2.438735936561976529428558055804286674772e-0035L,
 146         -1.358485954689981282143446687700830546868e-0036L,
 147         +2.042693258859029188027001236804037487674e-0035L,
 148         +1.935394086687044503080036879506851279569e-0035L,
 149         +1.351742655356978501392833614755710504356e-0035L,
 150         +1.065151724232046458392410994534171402266e-0035L,
 151         +1.924312402124329269930577050628341603064e-0035L,
 152         -1.495058978047592634838539083355002279867e-0035L,
 153         -1.226069967847432149730821922942328537678e-0035L,
 154         -2.214357561488394736777775450498906642993e-0035L,
 155         -3.197918850054809249377584675940519273161e-0036L,
 156         +1.752934334182702105675254128020832940341e-0035L,
 157         -2.067723892627233681394169702571120887364e-0035L,
 158         -1.967684335349365926758978182531089889151e-0035L,
 159         -1.480234947789865560488791134115171284680e-0035L,
 160         -2.020095411752086363369245333724961071903e-0035L,
 161         +8.019047838709350758444432786175864173856e-0036L,
 162         +7.575600313883125509400401940426278198665e-0036L,
 163         -1.956787228828481747235699165048715626458e-0035L,
 164         +2.239452414684575979216557857298213538383e-0035L,
 165         -2.004881068319988136754382697969636119420e-0035L,
 166         +1.404844563886544703294730965793125947043e-0035L,
 167         +1.540967800016293988508912183967615475673e-0035L,
 168         +9.627943645034426124771174260339225827341e-0036L,
 169         -1.671879365114936780075083716139548989818e-0035L,
 170         -1.193872230164722958937943872752845047434e-0035L,
 171         -4.709469941941829089292517195754317215227e-0036L,
 172         -1.562825989789718724786197721553059612264e-0035L,
 173         +9.313247749577680188502242676253713195205e-0036L,
 174         -1.384269776167183189501758486393819264119e-0035L,
 175         +7.064986931125350563523011010886249504328e-0036L,
 176         -3.109636998242741557027060430659670849804e-0035L,
 177         -3.324150213308849248337118428668967104680e-0035L,
 178         -3.427152913195516159969937952267551337396e-0035L,
 179         -2.118702307301603154209365237718648576399e-0035L,
 180         -1.289226205241639223068869521009917813361e-0037L,
 181         +2.125722734799331239445801994645145285587e-0035L,
 182         -1.781645762780561951365253354033804640300e-0035L,
 183         -2.495276089408737145274279413504615537138e-0035L,
 184         +1.338422379299389637809694183691505317685e-0035L,
 185         +1.919747869211470727176212361922698586017e-0035L,
 186         +4.330259169399683693260601564559270596091e-0036L,
 187         -3.417429818162194124156743659460798263758e-0035L,
 188         -4.544129440843003305237213918657872189520e-0035L,
 189         -1.331658529527437298976340693936847286647e-0036L,
 190         +2.748387759350275490242241143386673942983e-0035L,
 191         +4.500898710776635571808492195291899181897e-0035L,
 192         -2.872593727403933486766336102755986165044e-0035L,
 193 };