Abstract

Polynomial approximations of the sine and cosine functions are given. The polynomials approximating the sine function use only odd powers, all coefficients for even powers are zero. Likewise, the cosine approximations use only even coefficients. The error function which was minimized to derive the coefficients is the maximum of the relative or absolute error over the "first" quarter of one period of the sine function. The polynomials can be evaluated quickly using Horner’s scheme.

Other formats

The latest version of this article is accessible as a web page and as a GitHub gist. You may also want to download the PDF version or access the Git repository.

Approximations

Sin, rel. error minimized, degree 1

Maximum relative error: 0.222030940703314563673375787965714468
Maximum absolute error: 0.222030940703314602461075138328569435

error-plot-sr1

C-style Horner evaluation for sin(2πx) approximation (set x1 = x first):

4.88812376281325840984430055331427776*x1

C-style Horner evaluation for sin(x) approximation (set x1 = x first):

0.777969059296685436326624212034285532*x1

WL-style coefficient list:

{0.777969059296685436326624212034285532423996181317579876295`36.}

Sin, rel. error minimized, degree 3

Maximum relative error: 0.00721227101683576694018949222614300928
Maximum absolute error: 0.00721227101683577140197758561561419117

error-plot-sr3

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.23786927189520681011206791022365216 - 36.2674936954007983315196520429777428*x2)

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.992787728983164233059810507773856991 - 0.146210290215383029232877806264248677*x2)

WL-style coefficient list:

{0.9927877289831642330598105077738569907203692444053314221161`36., -0.1462102902153830292328778062642486771643284068327168867468`36.}

Sin, rel. error minimized, degree 5

Maximum relative error: 0.000108178744189107114435292843058434688
Maximum absolute error: 0.000106306760359058556267427386435330041

error-plot-sr5

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28250560008354834003487064338056964 + x2*(-41.1664423308903732524414077000881397 + 74.4524187069072428211419543641796188*x2))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999891821255810892885564707156941565 + x2*(-0.165960116540878989063185380996540407 + 0.00760290334336935120704015646842617915*x2))

WL-style coefficient list:

{0.9998918212558108928855647071569415653118356592460051998323`36., -0.1659601165408789890631853809965404073798643800309926078491`36., 0.0076029033433693512070401564684261791476472004115549733978`36.}

Sin, rel. error minimized, degree 7

Maximum relative error: 9.39101023663525073017403956437051615e-7
Maximum absolute error: 9.33609073337249324449442152075312554e-7

error-plot-sr7

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28317940663383263695539184084148414 + x2*(-41.3389424984438475211600845004648977 + x2*(81.3953586300215790478948871165643136 - 71.4746942820704835483055527883527435*x2)))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999999060898976336474926982596043563 + x2*(-0.166655540927576933646197607200949732 + x2*(0.00831189980138987918776159520367912155 - 0.000184881402886071911033139680005197992*x2)))

WL-style coefficient list:

{0.9999990608989763364749269825960435629483853265208217005446`36., -0.1666555409275769336461976072009497315865555487597614847811`36., 0.0083118998013898791877615952036791215494464617100961081573`36., -0.000184881402886071911033139680005197992053149130452161285`36.}

Sin, rel. error minimized, degree 9

Maximum relative error: 5.31399266324768387974035968229591015e-9
Maximum absolute error: 5.30072278620339251549930889293408298e-9

error-plot-sr9

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318527379078585274731929079414949 + x2*(-41.3416774783915252855640244027643612 + x2*(81.6022312427274226421465134076212909 + x2*(-76.5749921819992128192000934020817094 + 39.7109181438058471453004860893416233*x2))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999999994686007336752316120259640318 + x2*(-0.166666566840071513590695269999128453 + x2*(0.00833302513896936729848481553136180314 + x2*(-0.000198074187274269708745741141088641071 + 2.60190306765146018582500885337773154e-6*x2))))

WL-style coefficient list:

{0.9999999946860073367523161202596403177040898496501611216768`36., -0.1666665668400715135906952699991284533668603175829321974375`36., 0.0083330251389693672984848155313618031435079212166530368507`36., -0.0001980741872742697087457411410886410708022403778296896364`36., 2.6019030676514601858250088533777315352551909009268267`36.*^-6}

Sin, rel. error minimized, degree 11

Maximum relative error: 2.11510139959757396623100216943462049e-11
Maximum absolute error: 2.11510139959758439372658049257632678e-11

error-plot-sr11

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530704669073655382220589738758 + x2*(-41.3417020969260358562295154399161189 + x2*(81.6052236901305879070487996745527555 + x2*(-76.7041702522234536443141173678808329 + x2*(42.0077971361087965477414621069542974 - 14.3813907433071852719484446678883883*x2)))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999997884898600402426033768998 + x2*(-0.166666666088260696413164261885310067 + x2*(0.00833333072055773645376566203656709979 + x2*(-0.000198408328232619552901560108010257242 + x2*(2.75239710746326498401791551303359689e-6 - 2.3868346521031027639830001794722295e-8*x2)))))

WL-style coefficient list:

{0.9999999999788489860040242603376899783056537951143183870912`36., -0.1666666660882606964131642618853100670067625335204879925744`36., 0.0083333307205577364537656620365670997901611755182717113525`36., -0.0001984083282326195529015601080102572421538362725251612785`36., 2.7523971074632649840179155130335968854457733333397891`36.*^-6, -2.38683465210310276398300017947222950415355599042654`36.*^-8}

Sin, rel. error minimized, degree 13

Maximum relative error: 6.24400681813329809580032940385023694e-14
Maximum absolute error: 6.17666638106202002061075213966124135e-14

error-plot-sr13

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717919415440631052356951227 + x2*(-41.3417022398184912491504586563309009 + x2*(81.6052491334177909789178729942153114 + x2*(-76.7058464941280158505651312164454235 + x2*(42.0581028415940046209613080938107769 + x2*(-15.0810317173017800774891418165142071 + 3.66346472229432872653352143098494556*x2))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999999999999937559931818667019042 + x2*(-0.166666666664323314581815742382489749 + x2*(0.00833333331876551401513171161164153048 + x2*(-0.00019841266411622150098365220068523596 + x2*(2.75569319265949080406017672747752072e-6 + x2*(-2.50295188656032073490380438676828409e-8 + 1.54011703714146442508663314577356389e-10*x2))))))

WL-style coefficient list:

{0.9999999999999375599318186670190419967059614976305799594333`36., -0.1666666666643233145818157423824897486264256985983593141745`36., 0.0083333333187655140151317116116415304845125161193612244296`36., -0.0001984126641162215009836522006852359604674565106031826592`36., 2.7556931926594908040601767274775207243915634258173167`36.*^-6, -2.50295188656032073490380438676828409194568629418124`36.*^-8, 1.540117037141464425086633145773563888660980948457`36.*^-10}

Sin, rel. error minimized, degree 15

Maximum relative error: 1.42161430527196489869592847801671319e-16
Maximum absolute error: 1.41245476968494368607577626036076699e-16

error-plot-sr15

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958558369867523044648625 + x2*(-41.3417022403980205333284857215074424 + x2*(81.605249275512840355944627940733515 + x2*(-76.7058596832908459122602888976516441 + x2*(42.0586896673551582746575138139640664 + x2*(-15.0944994748132229063932852237168167 + x2*(3.8172886387284432619824598876167985 - 0.69215692364545682101002491808127704*x2)))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999985783856947280351013 + x2*(-0.166666666666659653164780128859839316 + x2*(0.00833333333327592139676057538106745659 + x2*(-0.000198412698232225093689107237380802637 + x2*(2.75573164212929639596445204076151988e-6 + x2*(-2.5051870883490902518590017165648945e-8 + x2*(1.6047844633018114428263064708844387e-10 - 7.37066278281678179293546235379257048e-13*x2)))))))

WL-style coefficient list:

{0.9999999999999998578385694728035101304071521983286811590035`36., -0.1666666666666596531647801288598393157377652352270157145394`36., 0.008333333333275921396760575381067456588174757253550368042`36., -0.0001984126982322250936891072373808026368409323533504278215`36., 2.7557316421292963959644520407615198826035846751306848`36.*^-6, -2.50518708834909025185900171656489449572835030666892`36.*^-8, 1.604784463301811442826306470884438701566797378685`36.*^-10, -7.3706627828167817929354623537925704761783111044165500093800560778`36.*^-13}

Sin, rel. error minimized, degree 17

Maximum relative error: 2.57116077148351358053428669077559189e-19
Maximum absolute error: 2.5715886390568806850649589326659146e-19

error-plot-sr17

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647530909380262423401 + x2*(-41.3417022403997562294707421881240514 + x2*(81.6052492760734060849437848650802241 + x2*(-76.7058597527984963853697294195905433 + x2*(42.0586939237851656212519358180646156 + x2*(-15.0946416205074669984487521304903029 + x2*(3.81992705042997091822066334242715305 + x2*(-0.717723579656548249620955921341133889 + 0.1008563287153009308925771120293513*x2))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999974277490079943975 + x2*(-0.166666666666666650522767323353840604 + x2*(0.00833333333333316503140948668861163462 + x2*(-0.00019841269841201840459252750531485886 + x2*(2.75573192101527564362114785169078252e-6 + x2*(-2.50521067982746148969440582709985054e-8 + x2*(1.60589364903732230834314189302038183e-10 + x2*(-7.64291780693694318128770390349958602e-13 + 2.72047909631134875287705126898888084e-15*x2))))))))

WL-style coefficient list:

{0.999999999999999999742774900799439749219318937707081235829`36., -0.1666666666666666505227673233538406035633332849207383550534`36., 0.0083333333333331650314094866886116346181290699911270280004`36., -0.0001984126984120184045925275053148588604220132509897701326`36., 2.7557319210152756436211478516907825158132243172401019`36.*^-6, -2.50521067982746148969440582709985053875861023873028`36.*^-8, 1.605893649037322308343141893020381826352584343236`36.*^-10, -7.6429178069369431812877039034995860152814813028263417174205325156`36.*^-13, 2.72047909631134875287705126898888083963734654333622328608986302`36.*^-15}

Sin, rel. error minimized, degree 19

Maximum relative error: 3.78773125962279616160186760047621536e-22
Maximum absolute error: 3.78708467842471375281811871812195944e-22

error-plot-sr19

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692290686481920509 + x2*(-41.3417022403997602266577600629016976 + x2*(81.6052492760750504703805688263070872 + x2*(-76.7058597530606423223646211322787554 + x2*(42.0586939448221221065113929038539647 + x2*(-15.0946425724004466328297834538544185 + x2*(3.81995242673947033851481483554542173 + x2*(-0.718118794094021935415314539973412925 + x2*(0.104182006356927195351417794664316173 - 0.0116792456211126522870868520606638859*x2)))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999962122687403772 + x2*(-0.166666666666666666637194166219637268 + x2*(0.00833333333333333295212653322266277182 + x2*(-0.000198412698412696489459896530659927773 + x2*(2.75573192239364018847578909205399262e-6 + x2*(-2.50521083781017605729370231280411712e-8 + x2*(1.60590431721336942356660057796782021e-10 + x2*(-7.64712637907716970380859898835680587e-13 + x2*(2.81018528153898622636194976499656274e-15 - 7.97989713648499642889739108679114937e-18*x2)))))))))

WL-style coefficient list:

{0.9999999999999999999996212268740377203838398132399523782984`36., -0.1666666666666666666371941662196372682282173882108168867051`36., 0.0083333333333333329521265332226627718245895561563578100173`36., -0.0001984126984126964894598965306599277733162839146581230483`36., 2.7557319223936401884757890920539926204710712882369918`36.*^-6, -2.50521083781017605729370231280411711640300355277809`36.*^-8, 1.605904317213369423566600577967820206290107021337`36.*^-10, -7.6471263790771697038085989883568058689410680262331404505580804377`36.*^-13, 2.81018528153898622636194976499656273938669851053532130747258302`36.*^-15, -7.97989713648499642889739108679114937258809750597841678127043`36.*^-18}

Sin, rel. error minimized, degree 21

Maximum relative error: 4.6276454482156204730874839537861934e-25
Maximum absolute error: 4.61899648837457539441289371951304104e-25

error-plot-sr21

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528385892361706 + x2*(-41.3417022403997602339575747607453184 + x2*(81.6052492760750541966698030706061955 + x2*(-76.7058597530613842061021012863407744 + x2*(42.0586939448974484747580863050865161 + x2*(-15.094642576808003470197473512907406 + x2*(3.81995258416240355100361817822922964 + x2*(-0.718122281575531016590944853973730878 + x2*(0.104228779138823154519786966406945894 + x2*(-0.0120270656386248848511186475929082154 + 0.00110067889552603662945211798721523905*x2))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999953723545518 + x2*(-0.166666666666666666666622944355072176 + x2*(0.00833333333333333333264629832156155052 + x2*(-0.000198412698412698408467841110285163174 + x2*(2.75573192239857565503705987791772669e-6 + x2*(-2.50521083854168454477701564737931548e-8 + x2*(1.60590438339381876756824989024140185e-10 + x2*(-7.6471635166817888453662101647182022e-13 + x2*(2.81144692150789164365535396580597781e-15 + x2*(-8.21754672891591617408314234794708182e-18 + 1.90494922271745528752624517060067826e-20*x2))))))))))

WL-style coefficient list:

{0.999999999999999999999999537235455178437952691251604621247`36., -0.1666666666666666666666229443550721756069155732387543038346`36., 0.0083333333333333333326462983215615505152625316475209067416`36., -0.0001984126984126984084678411102851631735384104760035251031`36., 2.7557319223985756550370598779177266862143379033605018`36.*^-6, -2.50521083854168454477701564737931547607794389387424`36.*^-8, 1.605904383393818767568249890241401846904156630855`36.*^-10, -7.6471635166817888453662101647182021996334103900844010459789204844`36.*^-13, 2.81144692150789164365535396580597781135144226330978109730188007`36.*^-15, -8.21754672891591617408314234794708182468121816329375332577331`36.*^-18, 1.904949222717455287526245170600678259573423890158513932195`36.*^-20}

Sin, rel. error minimized, degree 23

Maximum relative error: 4.76648075527453186088089375665112157e-28
Maximum absolute error: 4.7660821641045116711433452671502113e-28

error-plot-sr23

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676356413758 + x2*(-41.341702240399760233968406756083688 + x2*(81.6052492760750542033878062008052847 + x2*(-76.7058597530613858387538131348063373 + x2*(42.0586939448976527106614640663082894 + x2*(-15.0946425768229516007418797796010684 + x2*(3.81995258484608093627454902397668405 + x2*(-0.718122301696119047033414247800481873 + x2*(0.10422916014779405372632190983088619 + x2*(-0.0120315518495018567544782260741793098 + x2*(0.00113056530917082146808609764898537513 - 0.0000860640080482751673608323886569285895*x2)))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999999952335192 + x2*(-0.166666666666666666666666612913901636 + x2*(0.00833333333333333333333232477102353248 + x2*(-0.000198412698412698412690971295629794012 + x2*(2.75573192239858903679825710807586174e-6 + x2*(-2.50521083854416543946963456980330974e-8 + x2*(1.60590438368123608117203960696952957e-10 + x2*(-7.64716373094255009484236731701576373e-13 + x2*(2.81145719877015214410810950822327266e-15 + x2*(-8.22061195268911098835441742253585312e-18 + x2*(1.9566737544349787982165880283092434e-20 - 3.77298080131772138746972954797552143e-23*x2)))))))))))

WL-style coefficient list:

{0.9999999999999999999999999995233519244725468139119106241657`36., -0.1666666666666666666666666129139016360884698578731125262441`36., 0.0083333333333333333333323247710235324772417427405728530564`36., -0.000198412698412698412690971295629794011779655459166533244`36., 2.7557319223985890367982571080758617424449984241237545`36.*^-6, -2.50521083854416543946963456980330973861748100195226`36.*^-8, 1.605904383681236081172039606969529565617071413852`36.*^-10, -7.6471637309425500948423673170157637264577070186224572413934724798`36.*^-13, 2.8114571987701521441081095082232726625240385310759474376034347`36.*^-15, -8.22061195268911098835441742253585311815543474661271683957244`36.*^-18, 1.956673754434978798216588028309243404674934782560479277072`36.*^-20, -3.772980801317721387469729547975521428568397739318620256`36.*^-23}

Sin, rel. error minimized, degree 25

Maximum relative error: 4.19504943676691951565111532789986982e-31
Maximum absolute error: 4.19479319145296338424017042763622346e-31

error-plot-sr25

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655636994 + x2*(-41.341702240399760233968420075661488 + x2*(81.6052492760750542033976706415239 + x2*(-76.7058597530613858416265037589652146 + x2*(42.0586939448976531442458649948634491 + x2*(-15.0946425768229903126789983450231896 + x2*(3.81995258484827669107388659039437157 + x2*(-0.718122301778249903012936806567606579 + x2*(0.104229162200223206350206379193020344 + x2*(-0.0120315857702439128133481899814220539 + x2*(0.0011309212261867852871324232669865833 + x2*(-0.0000882114283628065863048778806081164325 + 5.67334676473313234824991148545809567e-6*x2))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.9999999999999999999999999999995805 + x2*(-0.166666666666666666666666666611004393 + x2*(0.00833333333333333333333333210417163705 + x2*(-0.000198412698412698412698401996495140527 + x2*(2.75573192239858906520718431485709125e-6 + x2*(-2.50521083854417186436932708590805798e-8 + x2*(1.60590438368215917437265518278893558e-10 + x2*(-7.64716373181714778043777242723727502e-13 + x2*(2.81145725413197898726787861493556015e-15 + x2*(-8.22063512918879100818272371995680636e-18 + x2*(1.95728974139145456630615386976877302e-20 + x2*(-3.86712207829080891143847921730825449e-23 + 6.30003003964265966093572658715046494e-26*x2))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999995804950563233080484348883355`36., -0.1666666666666666666666666666110043928683535816895163880226`36., 0.0083333333333333333333333321041716370496628117568629412712`36., -0.0001984126984126984126984019964951405272606277384663707439`36., 2.7557319223985890652071843148570912519321727725062939`36.*^-6, -2.50521083854417186436932708590805797667323473147548`36.*^-8, 1.605904383682159174372655182788935581823815330571`36.*^-10, -7.6471637318171477804377724272372750185293045548931256422957422224`36.*^-13, 2.81145725413197898726787861493556014813273369030252889908205439`36.*^-15, -8.2206351291887910081827237199568063641905381440747054394225`36.*^-18, 1.957289741391454566306153869768773015467566771738370972438`36.*^-20, -3.867122078290808911438479217308254492129186490305787767`36.*^-23, 6.300030039642659660935726587150464941264404235698381`36.*^-26}

Sin, rel. error minimized, degree 27

Maximum relative error: 3.19129347150734998638364586221249332e-34
Maximum absolute error: 3.18562653284154182238611831063220052e-34

error-plot-sr27

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900376 + x2*(-41.3417022403997602339684200894563189 + x2*(81.6052492760750542033976826658766562 + x2*(-76.7058597530613858416306361393912443 + x2*(42.0586939448976531449857732626516763 + x2*(-15.094642576822990391696108173349149 + x2*(3.81995258484828211708410911115199852 + x2*(-0.718122301778499921527007241276411483 + x2*(0.104229162208116980728820985024673378 + x2*(-0.0120315859414967379058356061214503303 + x2*(0.00113092373629205807179287556554085277 + x2*(-0.0000882351783799966919862238857147744449 + x2*(5.80429222194045260147229862670405711e-6 - 3.19564520634032773995472517636254126e-7*x2)))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999999999999968 + x2*(-0.16666666666666666666666666666661745 + x2*(0.00833333333333333333333333333206984855 + x2*(-0.00019841269841269841269841268559704012 + x2*(2.75573192239858906525566391899938823e-6 + x2*(-2.50521083854417187748355082223593178e-8 + x2*(1.60590438368216145546212127007207836e-10 + x2*(-7.64716373181981018558568082927738456e-13 + x2*(2.81145725434490413000868500836912417e-15 + x2*(-8.22063524619805452603616973018036272e-18 + x2*(1.95729408564036109675339212160794922e-20 + x2*(-3.86816326102121313942574770328011429e-23 + x2*(6.44543985648816058731652837161857683e-26 - 8.98880813349488202504102545971544394e-29*x2)))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999996808706528492770022729279`36., -0.1666666666666666666666666666666174504791232561075192665929`36., 0.0083333333333333333333333333320698485483130870158581679744`36., -0.0001984126984126984126984126855970401203444149996322153058`36., 2.7557319223985890652556639189993882326668209584594866`36.*^-6, -2.50521083854417187748355082223593178248609991800212`36.*^-8, 1.605904383682161455462121270072078357548609540637`36.*^-10, -7.6471637318198101855856808292773845553296210759018843536097432065`36.*^-13, 2.8114572543449041300086850083691241660796018034065688025104734`36.*^-15, -8.22063524619805452603616973018036272193424537305514986488987`36.*^-18, 1.957294085640361096753392121607949222231316479108877970019`36.*^-20, -3.868163261021213139425747703280114289158267930942167184`36.*^-23, 6.445439856488160587316528371618576829779042514329938`36.*^-26, -8.988808133494882025041025459715443939055354654681`36.*^-29}

Sin, rel. error minimized, degree 29

Maximum relative error: 2.11865278589589790150771723488302663e-37
Maximum absolute error: 2.11931467978181502621186468604035581e-37

error-plot-sr29

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900577 + x2*(-41.3417022403997602339684200894685176 + x2*(81.6052492760750542033976826782386238 + x2*(-76.7058597530613858416306410888770517 + x2*(42.0586939448976531449868099334359578 + x2*(-15.0946425768229903918264387802883982 + x2*(3.81995258484828212771684891854446925 + x2*(-0.718122301778500511121314892635677992 + x2*(0.104229162208139789713176944570739309 + x2*(-0.0120315859421189142400074981917927194 + x2*(0.00113092374821068230148408235972999528 + x2*(-0.0000882353352871522086321956901767486628 + x2*(5.80564396908612819199696524959602588e-6 + x2*(-3.26426039768770010216497856951684167e-7 + 1.5558517038479503726700598334901502e-8*x2))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666629 + x2*(0.00833333333333333333333333333333222318 + x2*(-0.000198412698412698412698412698399723487 + x2*(2.75573192239858906525573184281026561e-6 + x2*(-2.50521083854417187750518138734779333e-8 + x2*(1.60590438368216145993211483359730933e-10 + x2*(-7.64716373181981646407639862566185217e-13 + x2*(2.81145725434551937513944561966331531e-15 + x2*(-8.22063524662315930664562316486611394e-18 + x2*(1.9572941062679701610307767721364446e-20 + x2*(-3.8681701397118386284141935821892017e-23 + x2*(6.44694091890808795934274904084719604e-26 + x2*(-9.18181103282828321298337267365314117e-29 + 1.10854165613066936680763885008011392e-31*x2))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999997880685320218247436196`36., -0.1666666666666666666666666666666666290750902362038145613982`36., 0.0083333333333333333333333333333322231812831543320979132639`36., -0.0001984126984126984126984126983997234872175757397315616947`36., 2.7557319223985890652557318428102656050982135501521368`36.*^-6, -2.50521083854417187750518138734779333283584003227118`36.*^-8, 1.605904383682161459932114833597309330771365730808`36.*^-10, -7.6471637318198164640763986256618521749342546094979134407919462615`36.*^-13, 2.81145725434551937513944561966331531034904337631921742794765665`36.*^-15, -8.22063524662315930664562316486611394291474801398034122241822`36.*^-18, 1.957294106267970161030776772136444602071745118832180868973`36.*^-20, -3.868170139711838628414193582189201702190090331493296849`36.*^-23, 6.446940918908087959342749040847196041906010499895226`36.*^-26, -9.181811032828283212983372673653141166820179978293`36.*^-29, 1.1085416561306693668076388500801139245873534208`36.*^-31}

Sin, rel. error minimized, degree 31

Maximum relative error: 1.23931564680083903547907147997002462e-40
Maximum absolute error: 1.23877067991372097417082601537393501e-40

error-plot-sr31

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900577 + x2*(-41.3417022403997602339684200894685269 + x2*(81.6052492760750542033976826782494868 + x2*(-76.7058597530613858416306410938887766 + x2*(42.0586939448976531449868111469282819 + x2*(-15.0946425768229903918266160302263744 + x2*(3.81995258484828212773376974792478699 + x2*(-0.718122301778500512230037066912561024 + x2*(0.104229162208139841079859116740720578 + x2*(-0.0120315859421206235468423379899599024 + x2*(0.00113092374825168866304760383027684652 + x2*(-0.0000882353359901283737253402497231190866 + x2*(5.80565236723245311921148333811416853e-6 + x2*(-3.26492443924319293719791266236133837e-7 + x2*(1.58708102801241795150008538468341907e-8 - 6.61267049303745463351700265044679504e-10*x2)))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666667 + x2*(0.00833333333333333333333333333333333249 + x2*(-0.000198412698412698412698412698412687163 + x2*(2.7557319223985890652557319223196184e-6 + x2*(-2.50521083854417187750521080496821656e-8 + x2*(1.60590438368216145993922833395466244e-10 + x2*(-7.64716373181981647588299477063124316e-13 + x2*(2.81145725434552076069439171257001611e-15 + x2*(-8.22063524662432719823376264616227798e-18 + x2*(1.95729410633894002963134479643128595e-20 + x2*(-3.86817017052978023755526534728704583e-23 + x2*(6.44695024472163654203964763071146247e-26 + x2*(-9.1836788691334994160391130763503121e-29 + x2*(1.13079249574700317009689524336035882e-31 - 1.19344102664624425226464150655740598e-34*x2)))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999998760684353199160979`36., -0.1666666666666666666666666666666666666416134898053453325466`36., 0.00833333333333333333333333333333333248999595345061630424`36., -0.0001984126984126984126984126984126871626247071658878641004`36., 2.7557319223985890652557319223196184048806354892061654`36.*^-6, -2.50521083854417187750521080496821655859791471476632`36.*^-8, 1.605904383682161459939228333954662436552657303017`36.*^-10, -7.6471637318198164758829947706312431605477222777876384195171696061`36.*^-13, 2.8114572543455207606943917125700161124924741565498950280363687`36.*^-15, -8.2206352466243271982337626461622779782044237281265438236561`36.*^-18, 1.957294106338940029631344796431285950826302415693838824733`36.*^-20, -3.86817017052978023755526534728704582999943145237508117`36.*^-23, 6.446950244721636542039647630711462469117784443943191`36.*^-26, -9.183678869133499416039113076350312096826956130063`36.*^-29, 1.1307924957470031700968952433603588152435988707`36.*^-31, -1.19344102664624425226464150655740597507269935865182923480685298`36.*^-34}

Sin, rel. error minimized, degree 33

Maximum relative error: 6.43854314507370959771025792048886463e-44
Maximum absolute error: 6.43034293725641043498168147370373865e-44

error-plot-sr33

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900577 + x2*(-41.3417022403997602339684200894685269 + x2*(81.6052492760750542033976826782494951 + x2*(-76.7058597530613858416306410938931226 + x2*(42.058693944897653144986811148132526 + x2*(-15.0946425768229903918266162323354102 + x2*(3.81995258484828212773379204260342464 + x2*(-0.718122301778500512231738107077677944 + x2*(0.104229162208139841172573164333825576 + x2*(-0.0120315859421206272268144232091129735 + x2*(0.00113092374825179596628759690774300626 + x2*(-0.0000882353359924243074490199864708816304 + x2*(5.80565240283899742598987165915956159e-6 + x2*(-3.2649283322881323890343556403828941e-7 + x2*(1.58736546929074325449663367029125159e-8 + x2*(-6.73728155422516796504139324592253817e-10 + 2.47481846249220105437501580433199674e-11*x2))))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666667 + x2*(0.00833333333333333333333333333333333333 + x2*(-0.000198412698412698412698412698412698404 + x2*(2.7557319223985890652557319223985218e-6 + x2*(-2.50521083854417187750521083851162406e-8 + x2*(1.6059043836821614599392377066160664e-10 + x2*(-7.64716373181981647590110886153864847e-13 + x2*(2.81145725434552076319524249332218442e-15 + x2*(-8.22063524662432971259125266249393488e-18 + x2*(1.95729410633912573976392818456761357e-20 + x2*(-3.86817017063043222968282883823100715e-23 + x2*(6.44695028426131356918907627824313965e-26 + x2*(-9.18368981960883578196465536976398661e-29 + x2*(1.1309951596673284911699033758104617e-31 + x2*(-1.21593057197470527850970994082426868e-34 + 1.13137790086518396610373370175684751e-37*x2))))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999999999356965706274384`36., -0.1666666666666666666666666666666666666666519700006184307058`36., 0.0083333333333333333333333333333333333327739485882032634114`36., -0.0001984126984126984126984126984126984042514871664405923237`36., 2.7557319223985890652557319223985218027201394619072219`36.*^-6, -2.50521083854417187750521083851162406179249125045133`36.*^-8, 1.605904383682161459939237706616066403757316167576`36.*^-10, -7.6471637318198164759011088615386484699850321459229998422009697539`36.*^-13, 2.81145725434552076319524249332218441501577460986823039424346001`36.*^-15, -8.22063524662432971259125266249393488321412799274373211789993`36.*^-18, 1.95729410633912573976392818456761356730147172163066848058`36.*^-20, -3.868170170630432229682828838231007147041914821155425765`36.*^-23, 6.44695028426131356918907627824313965063761537956948`36.*^-26, -9.183689819608835781964655369763986610567383785343`36.*^-29, 1.1309951596673284911699033758104616989963206243`36.*^-31, -1.21593057197470527850970994082426868425889464484126170647847491`36.*^-34, 1.13137790086518396610373370175684750549380170169012019431948`36.*^-37}

Sin, abs. error minimized, degree 1

Maximum relative error: 0.275388646223291508763148658158904588
Maximum absolute error: 0.138216852866331001654175858019012891

error-plot-sa1

C-style Horner evaluation for sin(2πx) approximation (set x1 = x first):

4.55286741146532415112634427336770245*x1

C-style Horner evaluation for sin(x) approximation (set x1 = x first):

0.724611353776708491236851341841095412*x1

WL-style coefficient list:

{0.7246113537767084912368513418410954118904828839168314632364`36.}

Sin, abs. error minimized, degree 3

Maximum relative error: 0.0144704570211964643111464100201678923
Maximum absolute error: 0.0044917348792172094871636831012903229

error-plot-sa3

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.1922647442358311664092063140774168 - 35.3637069400432002923807340734237452*x2)

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.985529542978803535688853589979832108 - 0.142566726507797377224105326882192683*x2)

WL-style coefficient list:

{0.9855295429788035356888535899798321076719188094226817579409`36., -0.1425667265077973772241053268821926834763560480978155208183`36.}

Sin, abs. error minimized, degree 5

Maximum relative error: 0.000303226860956541311622126708083403337
Maximum absolute error: 0.0000677064024158611644474844946697212884

error-plot-sa5

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.2812800766220821491468958126456729 + x2*(-41.0952426871208970211323332525800187 + 73.5855147347551640956688672796423323*x2))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999696773139043458688377873291916597 + x2*(-0.165673079320546139044772080908073214 + 0.00751437717830006597565730091774665237*x2))

WL-style coefficient list:

{0.9996967731390434586883778732919165966628788881056302347741`36., -0.1656730793205461390447720809080732144581300032215463381599`36., 0.0075143771783000659756573009177466523737135965416914790972`36.}

Sin, abs. error minimized, degree 7

Maximum relative error: 3.38409199722692067415308677961682201e-6
Maximum absolute error: 5.8914844688500411755280733626842814e-7

error-plot-sa7

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28316404430247135671540270030948533 + x2*(-41.3371423711001029236311900250633048 + x2*(81.3407688876640676542096535737693472 - 70.9934332720751750562132689396061123*x2)))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999996615908002773079325846913220383 + x2*(-0.16664828381895056829366054140948866 + x2*(0.00830632522715989396465411782615901079 - 0.00018363653976946785297280224158683484*x2)))

WL-style coefficient list:

{0.9999966159080027730793258469132203831779948892088145493035`36., -0.1666482838189505682936605414094886595810603781794372468216`36., 0.0083063252271598939646541178261590107945670042977487223016`36., -0.000183636539769467852972802241586834839733575780525463001`36.}

Sin, abs. error minimized, degree 9

Maximum relative error: 2.34101179326720584279701250915594214e-8
Maximum absolute error: 3.33811237735309799387214422296813557e-9

error-plot-sa9

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318516008947744301885339855754539 + x2*(-41.3416550314162780771649724741397745 + x2*(81.6010040732617735242889484141942461 + x2*(-76.5497822935957426856648840708956891 + 39.5367060657302079906898367421553316*x2))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.999999976589882067327941572029874908 + x2*(-0.166666476346397125275908028138103582 + x2*(0.00833289982335175125355506891971407298 + x2*(-0.000198008977627954312733279528442081684 + 2.5904885005360522843180547611890065e-6*x2))))

WL-style coefficient list:

{0.9999999765898820673279415720298749084405786056640894317782`36., -0.1666664763463971252759080281381035817113132438698259798382`36., 0.0083328998233517512535550689197140729752148214058982859309`36., -0.0001980089776279543127332795284420816836198002032613819455`36., 2.5904885005360522843180547611890064988522452011995094`36.*^-6}

Sin, abs. error minimized, degree 11

Maximum relative error: 1.10148099345850673176490062657393315e-10
Maximum absolute error: 1.32971443901248371442745936559819048e-11

error-plot-sa11

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530648750555750168039633888658 + x2*(-41.3417019297726782752642081499228641 + x2*(81.605209431076456455082671035413192 + x2*(-76.7036678275326660847999194353563935 + x2*(41.9999898253486435026302929016540341 - 14.3370246790313375969687637066849494*x2)))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999988985190065414932682350994 + x2*(-0.166666665414391662957238076832950332 + x2*(0.00833332926445715285723741015926085083 + x2*(-0.000198407028626057951892931706291369095 + x2*(2.75188556386854406868696924998396177e-6 - 2.3794713545277060334805162803882547e-8*x2)))))

WL-style coefficient list:

{0.9999999998898519006541493268235099373426066851277860366564`36., -0.1666666654143916629572380768329503316332382463494550460359`36., 0.0083333292644571528572374101592608508257832650602777478161`36., -0.0001984070286260579518929317062913690954248870846827084064`36., 2.7518855638685440686869692499839617710862407837692601`36.*^-6, -2.37947135452770603348051628038825470328452008685123`36.*^-8}

Sin, abs. error minimized, degree 13

Maximum relative error: 3.75278625550439621853410487355189818e-13
Maximum absolute error: 3.92751996091969009822948392734988182e-14

error-plot-sa13

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717722853177912969457335782 + x2*(-41.3417022389895442785312855779846842 + x2*(81.6052490320559539552387253130358273 + x2*(-76.7058411297555927220488709015300581 + x2*(42.0579638749736921679850990359011008 + x2*(-15.079294914383864428791620957792896 + 3.65508391952242788813000654371816106*x2))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999962472137444956037814659 + x2*(-0.166666666660981463111038159154818803 + x2*(0.00833333330841468508328542103458644311 + x2*(-0.000198412650240363630540903643014885226 + x2*(2.75568408741356365778988994429302032e-6 + x2*(-2.5026636347867372887533506439062342e-8 + 1.53659375573646611905501956100125293e-10*x2))))))

WL-style coefficient list:

{0.9999999999996247213744495603781465895126448101816351092699`36., -0.1666666666609814631110381591548188031657348812008719423382`36., 0.0083333333084146850832854210345864431092441596801956660167`36., -0.0001984126502403636305409036430148852264209397765252956871`36., 2.7556840874135636577898899442930203203052200644147014`36.*^-6, -2.50266363478673728875335064390623419610463588904002`36.*^-8, 1.536593755736466119055019561001252930645643666126`36.*^-10}

Sin, abs. error minimized, degree 15

Maximum relative error: 9.68519915816214045836521421102895228e-16
Maximum absolute error: 8.94528941709807131985482238805207329e-17

error-plot-sa15

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958039153518199931292109 + x2*(-41.3417022403950826269137548575868393 + x2*(81.6052492750262900264683880627579985 + x2*(-76.7058596474695298484280620477031589 + x2*(42.058688305389948652980058354567756 + x2*(-15.0944716166319875171830509266782016 + x2*(3.81699742832518043225711459600155625 - 0.690935882396552049219204056252025327*x2)))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999903148008418378595416 + x2*(-0.166666666666647809166043102595249597 + x2*(0.00833333333322623603809875967403959193 + x2*(-0.000198412698139567192404904096148800949 + x2*(2.75573155289183671003278704218629314e-6 + x2*(-2.50518246481347370240543449781033653e-8 + x2*(1.60466203872904879366205078294157963e-10 - 7.35766011971809330900478644486164214e-13*x2)))))))

WL-style coefficient list:

{0.9999999999999990314800841837859541634785788971047723916859`36., -0.1666666666666478091660431025952495965911789723210586121046`36., 0.0083333333332262360380987596740395919347206553034805924808`36., -0.00019841269813956719240490409614880094883618152205264401`36., 2.7557315528918367100327870421862931375563014403301554`36.*^-6, -2.50518246481347370240543449781033652810330277249264`36.*^-8, 1.604662038729048793662050782941579626582130210373`36.*^-10, -7.3576601197180933090047864448616421397797071216919261300445598025`36.*^-13}

Sin, abs. error minimized, degree 17

Maximum relative error: 1.95888061628065126006088975093116177e-18
Maximum absolute error: 1.61897250857654514571856367691517451e-19

error-plot-sa17

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958646461727685982552431 + x2*(-41.3417022403997484108820902972724014 + x2*(81.6052492760717225960919894617164119 + x2*(-76.7058597526346150816909424877749798 + x2*(42.0586939152807306728302753076164238 + x2*(-15.0946413691372349249662909142080676 + x2*(3.81992280531953245260843650545316673 + x2*(-0.717685441210393140919935757047115907 + 0.100714943778361135242430168713924538*x2))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999804111938371934874 + x2*(-0.166666666666666619002582182668768551 + x2*(0.00833333333333299311754500597897929703 + x2*(-0.000198412698411594497842939169564714446 + x2*(2.75573192045805570474164069181139307e-6 + x2*(-2.50521063810832659313336530795770274e-8 + x2*(1.60589186439698687926057420595617862e-10 + x2*(-7.64251167703190749594387242108845966e-13 + 2.71666540637857550793519752037048238e-15*x2))))))))

WL-style coefficient list:

{0.9999999999999999980411193837193487399391102490688382290023`36., -0.1666666666666666190025821826687685507771258301971631178742`36., 0.0083333333333329931175450059789792970313039590502723860866`36., -0.0001984126984115944978429391695647144458884962619060785457`36., 2.7557319204580557047416406918113930668361350461154922`36.*^-6, -2.50521063810832659313336530795770273775241470514717`36.*^-8, 1.60589186439698687926057420595617862037015091283`36.*^-10, -7.6425116770319074959438724210884596611057475954213442685083821098`36.*^-13, 2.71666540637857550793519752037048237546999699142578124831683858`36.*^-15}

Sin, abs. error minimized, degree 19

Maximum relative error: 3.18852883438819432451386083717742782e-21
Maximum absolute error: 2.38445728401241479409641082429530453e-22

error-plot-sa19

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647690525264903525941 + x2*(-41.3417022403997602104506946739631933 + x2*(81.6052492760750460716472258611540045 + x2*(-76.7058597530600964423215103301608912 + x2*(42.0586939447852593373304397675755438 + x2*(-15.094642570932888638807077073736136 + x2*(3.81995239132417404919218846922503493 + x2*(-0.718118284976825145517253087459866405 + x2*(0.104177995925885648161541781733250451 - 0.0116659220673217207856800123131228391*x2)))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999681147116561181 + x2*(-0.166666666666666666571856325288079038 + x2*(0.00833333333333333250293838029678134938 + x2*(-0.000198412698412695077448705835001537767 + x2*(2.75573192239122489926321745222406046e-6 + x2*(-2.50521083756661002556381165026219477e-8 + x2*(1.60590430232481300901501731427622871e-10 + x2*(-7.64712095757368360494490720934726969e-13 + x2*(2.81007710494804045581937928846346559e-15 - 7.970793758390793011296801848868938e-18*x2)))))))))

WL-style coefficient list:

{0.9999999999999999999968114711656118056754861391628225720614`36., -0.1666666666666666665718563252880790375578286605489195302492`36., 0.0083333333333333325029383802967813493831479027187631668847`36., -0.0001984126984126950774487058350015377674489461932434034699`36., 2.7557319223912248992632174522240604616598546783321574`36.*^-6, -2.50521083756661002556381165026219477190763785088563`36.*^-8, 1.605904302324813009015017314276228710341600713799`36.*^-10, -7.6471209575736836049449072093472696923097860218896747913877994731`36.*^-13, 2.81007710494804045581937928846346558813795207456454331254870606`36.*^-15, -7.97079375839079301129680184886893800070864583736369239117166`36.*^-18}

Sin, abs. error minimized, degree 21

Maximum relative error: 4.26698473758778690782956529778450974e-24
Maximum absolute error: 2.91358280906673744253003992528298963e-25

error-plot-sa21

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.2831853071795864769252599563031966 + x2*(-41.3417022403997602339306576356599242 + x2*(81.6052492760750541876825752642530684 + x2*(-76.7058597530613828230848159062962774 + x2*(42.0586939448973310146925362491739518 + x2*(-15.0946425768019873115405581943853673 + x2*(3.81995258396875378359254797464255721 + x2*(-0.718122277631009308859760818550070395 + x2*(0.104228729786475701384518698659704212 + x2*(-0.0120267195143608644969507692496160832 + 0.00109963715657365408162883154551737462*x2))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999573301526241 + x2*(-0.166666666666666666666514429531755384 + x2*(0.00833333333333333333172854406289157612 + x2*(-0.000198412698412698404890432651178389459 + x2*(2.75573192239856795892427360372335785e-6 + x2*(-2.5052108385406860616531523863229249e-8 + x2*(1.60590438331240859205508445933481769e-10 + x2*(-7.64716347467723994327423363023101821e-13 + x2*(2.8114455902872205130769778553538974e-15 + x2*(-8.21731023795469081465850855895926586e-18 + 1.90314628108235905239662428611078629e-20*x2))))))))))

WL-style coefficient list:

{0.9999999999999999999999957330152624122130921704347022153228`36., -0.1666666666666666666665144295317553844763842771223800035615`36., 0.0083333333333333333317285440628915761216847194073139223086`36., -0.0001984126984126984048904326511783894591448796913781862941`36., 2.7557319223985679589242736037233578471778209443960123`36.*^-6, -2.50521083854068606165315238632292490247507560260129`36.*^-8, 1.605904383312408592055084459334817689781463832693`36.*^-10, -7.647163474677239943274233630231018213268036490142551118789060621`36.*^-13, 2.81144559028722051307697785535389739668667191152879786637946201`36.*^-15, -8.21731023795469081465850855895926586425298298692905836507771`36.*^-18, 1.903146281082359052396624286110786294461145485578788331847`36.*^-20}

Sin, abs. error minimized, degree 23

Maximum relative error: 4.77754562374796466202595025157022506e-27
Maximum absolute error: 3.0013974845584287650407091177895145e-28

error-plot-sa23

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.2831853071795864769252867365408013 + x2*(-41.34170224039976023396837012502937 + x2*(81.6052492760750542033730529574809035 + x2*(-76.7058597530613858359992031965691425 + x2*(42.0586939448976524239061887276783178 + x2*(-15.0946425768229333109938224059476642 + x2*(3.81995258484532999611569776961421019 + x2*(-0.718122301675868736674094963369712446 + x2*(0.104229159791157626713582469999616002 + x2*(-0.0120315479000407670999253989380225302 + x2*(0.00113054034746971435186969004818869744 - 0.0000859953392597041223963295581126063189*x2)))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999999522245438 + x2*(-0.166666666666666666666666465237937929 + x2*(0.00833333333333333333333081820501876582 + x2*(-0.000198412698412698412683846030458663913 + x2*(2.75573192239858901800973582869065055e-6 + x2*(-2.50521083854416240397708584736261872e-8 + x2*(1.60590438368092038665327371381603984e-10 + x2*(-7.64716373072690794230879209022944105e-13 + x2*(2.81145718915031016661470168758419682e-15 + x2*(-8.22060925420204577747634922115771996e-18 + x2*(1.95663055312230260575934453615464494e-20 - 3.76997041373754999394011588166265576e-23*x2)))))))))))

WL-style coefficient list:

{0.9999999999999999999999999952224543762520353379740497482937`36., -0.1666666666666666666666664652379379286488643115678779792951`36., 0.0083333333333333333333308182050187658239997749506827134981`36., -0.0001984126984126984126838460304586639125122602586026893904`36., 2.7557319223985890180097358286906505454288046584658083`36.*^-6, -2.50521083854416240397708584736261872369779495664064`36.*^-8, 1.605904383680920386653273713816039840492673476821`36.*^-10, -7.6471637307269079423087920902294410475937314471523551814066774086`36.*^-13, 2.81145718915031016661470168758419682228094724247021989370353794`36.*^-15, -8.22060925420204577747634922115771996253975618769297273363978`36.*^-18, 1.956630553122302605759344536154644944715977548038046433445`36.*^-20, -3.769970413737549993940115881662655764946730707344189387`36.*^-23}

Sin, abs. error minimized, degree 25

Maximum relative error: 4.54146330554792571281885467189057809e-30
Maximum absolute error: 2.64181832570551807815436676868964557e-31

error-plot-sa25

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676653047091 + x2*(-41.3417022403997602339684200340603143 + x2*(81.605249276075054203397650755649697 + x2*(-76.7058597530613858416220776177975106 + x2*(42.0586939448976531436924181755038682 + x2*(-15.0946425768229902697858409431701777 + x2*(3.81995258484827451456717311044739686 + x2*(-0.718122301778175535228077214535034256 + x2*(0.104229162198499551619812117313211425 + x2*(-0.012031585743517746452024826661176431 + x2*(0.00113092096073582688896566541415787796 + x2*(-0.0000882099015046605490405057094911358628 + 5.66947895724932623987481230815906245e-6*x2))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999999999545854 + x2*(-0.166666666666666666666666666443291682 + x2*(0.00833333333333333333333333007347361421 + x2*(-0.00019841269841269841269839054753132646 + x2*(2.75573192239858906517092187005894064e-6 + x2*(-2.50521083854417185725048327919899102e-8 + x2*(1.60590438368215825937133130381123866e-10 + x2*(-7.64716373181635585039217211227352033e-13 + x2*(2.8114572540854854580761466065905647e-15 + x2*(-8.22063511092801755288244448638588204e-18 + x2*(1.95728928197445390825214917249663244e-20 + x2*(-3.86705514198837569444267171879021543e-23 + 6.29573499046868600160694919241022418e-26*x2))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999954585366944520742871811451827`36., -0.1666666666666666666666666664432916817564928658192911304334`36., 0.0083333333333333333333333300734736142087423449699427749535`36., -0.0001984126984126984126983905475313264604151929685836184707`36., 2.7557319223985890651709218700589406416639881525817782`36.*^-6, -2.50521083854417185725048327919899101633126652806197`36.*^-8, 1.605904383682158259371331303811238660187285594815`36.*^-10, -7.6471637318163558503921721122735203280118749563557453863409006504`36.*^-13, 2.81145725408548545807614660659056470072402463307524568443774822`36.*^-15, -8.22063511092801755288244448638588204290566181842942308978866`36.*^-18, 1.957289281974453908252149172496632442040228084168532083033`36.*^-20, -3.8670551419883756944426717187902154327107842101359559`36.*^-23, 6.295734990468686001606949192410224184991591510072555`36.*^-26}

Sin, abs. error minimized, degree 27

Maximum relative error: 3.71093256816016322292028876732097709e-33
Maximum absolute error: 2.00985691437973118885893008725590714e-34

error-plot-sa27

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655898245 + x2*(-41.3417022403997602339684200894162884 + x2*(81.6052492760750542033976826434729574 + x2*(-76.7058597530613858416306302811925815 + x2*(42.0586939448976531449849076978200403 + x2*(-15.094642576822990391616147018240379 + x2*(3.81995258484828211218705988966300851 + x2*(-0.718122301778499715970493510273790408 + x2*(0.104229162208110976342636405287321068 + x2*(-0.0120315859413748015647856256142760351 + x2*(0.00113092373460371414507594488909923547 + x2*(-0.0000882351631792841011341475676199375534 + x2*(5.80421200143293938616426089187840539e-6 - 3.19376214983463935963417948199967731e-7*x2)))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(0.99999999999999999999999999999999629 + x2*(-0.16666666666666666666666666666645607 + x2*(0.00833333333333333333333333332978203629 + x2*(-0.000198412698412698412698412670443817038 + x2*(2.75573192239858906525560720623886909e-6 + x2*(-2.50521083854417187747027991824324088e-8 + x2*(1.60590438368216145340340649882346379e-10 + x2*(-7.6471637318198079966489039738306564e-13 + x2*(2.81145725434474216885751679541412313e-15 + x2*(-8.22063524611474097220361505908501198e-18 + x2*(1.957294082718337731035943654297292e-20 + x2*(-3.8681625946335085432899773650766175e-23 + x2*(6.44535077474715538910010897226219076e-26 - 8.98351141482267797927348888929096093e-29*x2)))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999962890674318398378469392544`36., -0.1666666666666666666666666666664560701263534328919566141808`36., 0.0083333333333333333333333333297820362851177445713992492039`36., -0.000198412698412698412698412670443817038444109807042050005`36., 2.7557319223985890652556072062388690929124780588684828`36.*^-6, -2.50521083854417187747027991824324087511113096517861`36.*^-8, 1.605904383682161453403406498823463787496468558764`36.*^-10, -7.6471637318198079966489039738306563999375323885011258687311753963`36.*^-13, 2.81145725434474216885751679541412312629008978586189567944795211`36.*^-15, -8.22063524611474097220361505908501198251161289442159899001078`36.*^-18, 1.957294082718337731035943654297291995082545305355873060398`36.*^-20, -3.868162594633508543289977365076617496063284160401119856`36.*^-23, 6.445350774747155389100108972262190761163631642904123`36.*^-26, -8.983511414822677979273488889290960927959148921257`36.*^-29}

Sin, abs. error minimized, degree 29

Maximum relative error: 2.63448144363874529778822467112020764e-36
Maximum absolute error: 1.33481335245430954292391387876180739e-37

error-plot-sa29

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900575 + x2*(-41.3417022403997602339684200894684846 + x2*(81.605249276075054203397682678217212 + x2*(-76.7058597530613858416306410823800194 + x2*(42.0586939448976531449868088144004408 + x2*(-15.0946425768229903918263174566700949 + x2*(3.81995258484828212770804570578395629 + x2*(-0.718122301778500510677731827242377653 + x2*(0.104229162208139773872466925925391484 + x2*(-0.0120315859421185105914434605214188918 + x2*(0.00113092374820339150006009187157072642 + x2*(-0.0000882353351959773894657644531921605464 + x2*(5.80564321844408342010290676383443878e-6 + x2*(-3.26422380203998240640952562297723349e-7 + 1.55505138528488273803732379221574841e-8*x2))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666496 + x2*(0.00833333333333333333333333333333003666 + x2*(-0.000198412698412698412698412698382917813 + x2*(2.75573192239858906525573176948982678e-6 + x2*(-2.50521083854417187750516125164454643e-8 + x2*(1.60590438368216145992841397144036295e-10 + x2*(-7.64716373181981645935275709367752941e-13 + x2*(2.81145725434551894785519855865981904e-15 + x2*(-8.22063524662288351194750604256154162e-18 + x2*(1.95729410625535194280012708606373849e-20 + x2*(-3.86817013571480374612515885599094957e-23 + x2*(6.44694008534940960061339672835405816e-26 + x2*(-9.18170809547616330916120808145380419e-29 + 1.10797143053452745080081357394968071e-31*x2))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999973655185564230600780122`36., -0.1666666666666666666666666666666664958063735747899454617189`36., 0.0083333333333333333333333333333300366610416542285886726546`36., -0.0001984126984126984126984126983829178125904991414395477673`36., 2.7557319223985890652557317694898267791430034167951584`36.*^-6, -2.50521083854417187750516125164454643100996241655573`36.*^-8, 1.605904383682161459928413971440362953449536401867`36.*^-10, -7.6471637318198164593527570936775294095436171407898292578115122158`36.*^-13, 2.81145725434551894785519855865981904367283810988941543442572321`36.*^-15, -8.22063524662288351194750604256154162197581635191048606944269`36.*^-18, 1.957294106255351942800127086063738487337227226183867887934`36.*^-20, -3.86817013571480374612515885599094956618812304063997629`36.*^-23, 6.446940085349409600613396728354058162371543383828437`36.*^-26, -9.181708095476163309161208081453804191976682353325`36.*^-29, 1.1079714305345274508008135739496807126682217781`36.*^-31}

Sin, abs. error minimized, degree 31

Maximum relative error: 1.64002557798425265331386526431095701e-39
Maximum absolute error: 7.80601195686311420504782780641951757e-41

error-plot-sa31

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900577 + x2*(-41.3417022403997602339684200894685269 + x2*(81.6052492760750542033976826782494692 + x2*(-76.7058597530613858416306410938826516 + x2*(42.0586939448976531449868111457124854 + x2*(-15.0946425768229903918266158775032608 + x2*(3.81995258484828212773375681321587093 + x2*(-0.718122301778500512229268635441459545 + x2*(0.104229162208139841047063127709829973 + x2*(-0.0120315859421206225292670431909913382 + x2*(0.00113092374825166568518386330819391835 + x2*(-0.0000882353359897547854768837189926567247 + x2*(5.80565236297348695464931341061311603e-6 + x2*(-3.26492411624761599157827161582672559e-7 + x2*(1.58706639616057779758437178451334006e-8 - 6.60967532111103422469506843827607277e-10*x2)))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666667 + x2*(0.00833333333333333333333333333333333069 + x2*(-0.000198412698412698412698412698412671319 + x2*(2.75573192239858906525573192223995808e-6 + x2*(-2.50521083854417187750521077962123682e-8 + x2*(1.60590438368216145993922289621550506e-10 + x2*(-7.64716373181981647587481187300831335e-13 + x2*(2.81145725434552075980975905006999319e-15 + x2*(-8.22063524662432650297086257962703293e-18 + x2*(1.95729410633890026175367390152305383e-20 + x2*(-3.86817017051340241224838720319634797e-23 + x2*(6.44695023999222092772271073593727141e-26 + x2*(-9.1836779606017064087088551595474321e-29 + x2*(1.13078207057779775850779192271873238e-31 - 1.19290046424220296937971101373203567e-34*x2)))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999983599745016155147671`36., -0.1666666666666666666666666666666666665461233066991886751738`36., 0.0083333333333333333333333333333333306948563055744330311194`36., -0.0001984126984126984126984126984126713192410002366662633477`36., 2.755731922398589065255731922239958079425671834130477`36.*^-6, -2.50521083854417187750521077962123682401042055739648`36.*^-8, 1.605904383682161459939222896215505059064151231749`36.*^-10, -7.6471637318198164758748118730083133452870661218849613795271495675`36.*^-13, 2.81145725434552075980975905006999319274992857658877472801886566`36.*^-15, -8.22063524662432650297086257962703293359428698085145324427873`36.*^-18, 1.957294106338900261753673901523053826987552229529296046796`36.*^-20, -3.868170170513402412248387203196347966468990659062328631`36.*^-23, 6.446950239992220927722710735937271411608363387299454`36.*^-26, -9.183677960601706408708855159547432102702823349575`36.*^-29, 1.1307820705777977585077919227187323754148950422`36.*^-31, -1.1929004642422029693797110137320356717714186758012211287361608`36.*^-34}

Sin, abs. error minimized, degree 33

Maximum relative error: 9.02629874811745645627454723728152409e-43
Maximum absolute error: 4.05041813281115814551160041034571479e-44

error-plot-sa33

C-style Horner evaluation for sin(2πx) approximation (set x1 = x and x2 = x * x first):

x1*(6.28318530717958647692528676655900577 + x2*(-41.3417022403997602339684200894685269 + x2*(81.605249276075054203397682678249495 + x2*(-76.7058597530613858416306410938931177 + x2*(42.0586939448976531449868111481314004 + x2*(-15.0946425768229903918266162321733623 + x2*(3.81995258484828212773379202678015315 + x2*(-0.718122301778500512231737014715662347 + x2*(0.104229162208139841172518419816747688 + x2*(-0.0120315859421206272247918695472204175 + x2*(0.00113092374825179591086433399148871892 + x2*(-0.0000882353359924231844057771849731444841 + x2*(5.80565240282239984379553819712014009e-6 + x2*(-3.26492833054978809891389086260956241e-7 + x2*(1.58736534709332145815783307969688033e-8 + x2*(-6.73722985845646172199141106651886326e-10 + 2.47382386455741853500280877434932012e-11*x2))))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x1 = x and x2 = x * x first):

x1*(1. + x2*(-0.166666666666666666666666666666666667 + x2*(0.00833333333333333333333333333333333333 + x2*(-0.000198412698412698412698412698412698391 + x2*(2.75573192239858906525573192239844806e-6 + x2*(-2.50521083854417187750521083848472947e-8 + x2*(1.60590438368216145993923769996397832e-10 + x2*(-7.64716373181981647590109722915908442e-13 + x2*(2.81145725434552076319376582531091405e-15 + x2*(-8.22063524662432971120933376991172232e-18 + x2*(1.95729410633912564384267263771198416e-20 + x2*(-3.86817017063038299631930987571173923e-23 + x2*(6.4469502842428826022931795893278841e-26 + x2*(-9.18368981471916803573077288615983239e-29 + x2*(1.13099507260187617461053670403005966e-31 + x2*(-1.21592124202981493418420109807105932e-34 + 1.1309232145353729608313042496143056e-37*x2))))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999999990974500904188327`36., -0.1666666666666666666666666666666666666665920376393310486732`36., 0.0083333333333333333333333333333333333314941769534174164696`36., -0.0001984126984126984126984126984126983913993848481005103147`36., 2.7557319223985890652557319223984480562922485790801386`36.*^-6, -2.50521083854417187750521083848472946967502287375286`36.*^-8, 1.605904383682161459939237699963978324767196533631`36.*^-10, -7.6471637318198164759010972291590844214354394498792311515265329524`36.*^-13, 2.81145725434552076319376582531091404628433537330520565428188616`36.*^-15, -8.22063524662432971120933376991172232436731314677095939547517`36.*^-18, 1.957294106339125643842672637711984161661000195969107475706`36.*^-20, -3.868170170630382996319309875711739226291412667223216681`36.*^-23, 6.446950284242882602293179589327884097606758993240148`36.*^-26, -9.183689814719168035730772886159832387635372759008`36.*^-29, 1.1309950726018761746105367040300596631028349419`36.*^-31, -1.21592124202981493418420109807105931793761843316881812093955282`36.*^-34, 1.13092321453537296083130424961430560238518099837345109582762`36.*^-37}

Cos, rel. error minimized, degree 0

Maximum relative error: 0.99999999999999990028472498526237759
Maximum absolute error: 0.99999999999999990028472498526237759

error-plot-cr0

C-style Horner evaluation for sin(2πx) approximation:

9.97152750147376224095834991128486075e-17

C-style Horner evaluation for sin(x) approximation:

9.97152750147376224095834991128486075e-17

WL-style coefficient list:

{9.971527501473762240958349911284860751341224492349366537271189`36.*^-17}

Cos, rel. error minimized, degree 2

Maximum relative error: 0.120198305204304754596251158678705399
Maximum absolute error: 0.120198305204304754596251158678705399

error-plot-cr2

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.879801694795695245403748841321294601 - 14.0768271167311241182296977154374711*x2

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.879801694795695245403748841321294601 - 0.35657019634893858693517659373981896*x2

WL-style coefficient list:

{0.8798016947956952454037488413212946010255143250704652500625`36., -0.3565701963489385869351765937398189597686514213566533980325`36.}

Cos, rel. error minimized, degree 4

Maximum relative error: 0.00262735495952200930097234130165281387
Maximum absolute error: 0.00262735495952200930097234130165281387

error-plot-cr4

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.997372645040477990699027658698347186 + x2*(-19.3825703453028767024917664241925739 + 54.7937283944836616879859645265254083*x2)

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.997372645040477990699027658698347186 + x2*(-0.490966242354240750313919970830772248 + 0.0351569652103601536791893003031729288*x2)

WL-style coefficient list:

{0.9973726450404779906990276586983471861311355716720078400587`36., -0.4909662423542407503139199708307722479603236818011744534093`36., 0.035156965210360153679189300303172928795410532429239404777`36.}

Cos, rel. error minimized, degree 6

Maximum relative error: 0.0000297893100469313736764129442719222356
Maximum absolute error: 0.0000297893100469313736764129442719222356

error-plot-cr6

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.999970210689953068626323587055728078 + x2*(-19.7306304067237950816667714169962724 + x2*(64.4709705317840353922437485876101219 - 76.3721273733007944747948679364638273*x2))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.999970210689953068626323587055728078 + x2*(-0.499782706704688809140466617726333455 + x2*(0.0413661149638482252569383872576459943 - 0.0012412397582398600702129604944720102*x2))

WL-style coefficient list:

{0.9999702106899530686263235870557280777644038128750708717888`36., -0.499782706704688809140466617726333454962621718153317275064`36., 0.0413661149638482252569383872576459943402674481677568640056`36., -0.0012412397582398600702129604944720101982126127760401739003`36.}

Cos, rel. error minimized, degree 8

Maximum relative error: 3.29669320191241834029784593642135125e12
Maximum absolute error: 2.07728785060732446194777946088978011e-7

error-plot-cr8

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.999999792271214939267553805222053911 + x2*(-19.7391040780789844235702352004932038 + x2*(64.9298644173431418335930643775704593 + x2*(-85.130116947651883461388895316839217 + 55.4204978477637650890325418893609991*x2)))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.999999792271214939267553805222053911 + x2*(-0.499997347307564798261689263275170926 + x2*(0.0416605522442190334337486569138386962 + x2*(-0.0013835791854080904305903409668113965 + 0.0000228155780226852578391801303428006217*x2)))

WL-style coefficient list:

{0.9999997922712149392675538052220539110219893115384615395302`36., -0.4999973473075647982616892632751709259693590463633814137761`36., 0.041660552244219033433748656913838696152864604401204409585`36., -0.0013835791854080904305903409668113965006925278736101999033`36., 0.0000228155780226852578391801303428006216660642628632451437`36.}

Cos, rel. error minimized, degree 10

Maximum relative error: 9.81899323677814078475853240765616657e-10
Maximum absolute error: 9.81899323677814078475853240765616657e-10

error-plot-cr10

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999901810067632218592152414676 + x2*(-19.7392080320548995682599111266827624 + x2*(64.9392878245787538584194003810854251 + x2*(-85.4511616308164044967465654262107341 + x2*(60.1029288012462159679724965251436792 - 24.7337944595523781372950725036124394*x2))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999901810067632218592152414676 + x2*(-0.49999998049253581064488831264724178 + x2*(0.0416665985274352494970529831079268818 + x2*(-0.00138879697151174993540500936074733546 + x2*(0.00002474324689798977846771995314323317 - 2.57924183182520559803981154578763508e-7*x2))))

WL-style coefficient list:

{0.9999999990181006763221859215241467592343833431607956876104`36., -0.4999999804925358106448883126472417799170538129969117112355`36., 0.0416665985274352494970529831079268817924347682625283903769`36., -0.0013887969715117499354050093607473354568100294068286064696`36., 0.0000247432468979897784677199531432331700043016419859875338`36., -2.579241831825205598039811545787635083596569894942531`36.*^-7}

Cos, rel. error minimized, degree 12

Maximum relative error: 3.35502237705911696549656487937213553e-12
Maximum absolute error: 3.35502237705911696549656487937213553e-12

error-plot-cr12

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999664497762294088303450344 + x2*(-19.739208798392478282001076336809467 + x2*(64.9393932828628894787230914518556699 + x2*(-85.456760688627053551670913896517608 + x2*(60.2425192299477296627231970574457077 + x2*(-26.3842946833417189788012868629667837 + 7.48242646017731236610073291586232663*x2)))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999664497762294088303450344 + x2*(-0.499999999904093446864749737540127153 + x2*(0.0416666661919898461055893453767336909 + x2*(-0.00138888797032770920681384355560203468 + x2*(0.0000248007136556145113256051130495176344 + x2*(-2.75135611164571371141959208910569516e-7 + 1.97644182995841772799444848310451781e-9*x2)))))

WL-style coefficient list:

{0.9999999999966449776229408830345034351206278644747810789636`36., -0.4999999999040934468647497375401271533730522520950867269179`36., 0.0416666661919898461055893453767336908690840881385524373943`36., -0.001388887970327709206813843555602034675580116400859385192`36., 0.000024800713655614511325605113049517634394436004251609979`36., -2.751356111645713711419592089105695164223310614841717`36.*^-7, 1.9764418299584177279944484831045178095358117934665`36.*^-9}

Cos, rel. error minimized, degree 14

Maximum relative error: 8.67532643728020790749920619471485427e-15
Maximum absolute error: 8.67532643728020790749920619471485427e-15

error-plot-cr14

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.9999999999999913246735627197920925 + x2*(-19.739208802165385317528125439523807 + x2*(64.9393940191550727055562394997593414 + x2*(-85.4568168422078210788773671861403962 + x2*(60.244622320021700380473555489092483 + x2*(-26.4257046324331496244942486888121207 + x2*(7.89451210364662582456019033363214216 - 1.63625691613893768763069002029860695*x2))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.9999999999999913246735627197920925 + x2*(-0.499999999999662298517775822702998135 + x2*(0.041666666664412501559930358186670219 + x2*(-0.00138888888296507330038783473947564241 + x2*(0.0000248015794582964580010321673714486073 + x2*(-2.75567434405946778860326965959718338e-7 + x2*(2.08529198807394186029297197627654707e-9 - 1.094796343456433735930433763570635e-11*x2))))))

WL-style coefficient list:

{0.9999999999999913246735627197920925007938052851457281156089`36., -0.4999999999996622985177758227029981347820510428448621068418`36., 0.0416666666644125015599303581866702190206461017924819668054`36., -0.001388888882965073300387834739475642406914658284842507373`36., 0.0000248015794582964580010321673714486072576278788287417738`36., -2.755674344059467788603269659597183376916159634784388`36.*^-7, 2.0852919880739418602929719762765470683432821021175`36.*^-9, -1.09479634345643373593043376357063499515359708312`36.*^-11}

Cos, rel. error minimized, degree 16

Maximum relative error: 1.75699555199255133753003756355699876e-17
Maximum absolute error: 1.75699555199255133753003756355699876e-17

error-plot-cr16

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999998243004448007448662 + x2*(-19.7392088021786819392764818587750612 + x2*(64.9393940226562091437977220895416253 + x2*(-85.4568172050586217836507287747925837 + x2*(60.244641258656183397655589644431288 + x2*(-26.4262523020868557642174344599837745 + x2*(7.90343062815075398391919868116738223 + x2*(-1.71291715210778999635263534680016425 + 0.270783473417456507078234525883083018*x2)))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999998243004448007448662 + x2*(-0.499999999999999105881272803474436268 + x2*(0.041666666666658914344068844317924505 + x2*(-0.00138888888886231429175747130897185107 + x2*(0.0000248015872549765577961155967511699095 + x2*(-2.75573145508960795189972565635584642e-7 + x2*(2.08764776731016710219609723288490596e-9 + x2*(-1.14608862231521440480830153964369191e-11 + 4.58927688754481747776178904291483144e-14*x2)))))))

WL-style coefficient list:

{0.9999999999999999824300444800744866246996243644300123873912`36., -0.4999999999999991058812728034744362675252233271368901237966`36., 0.0416666666666589143440688443179245049794077100058356260936`36., -0.0013888888888623142917574713089718510686343043428500349693`36., 0.0000248015872549765577961155967511699095293017759361650482`36., -2.755731455089607951899725656355846417300431182046384`36.*^-7, 2.0876477673101671021960972328849059583671196948314`36.*^-9, -1.14608862231521440480830153964369190684170124124`36.*^-11, 4.58927688754481747776178904291483144154062235164042970386023404`36.*^-14}

Cos, rel. error minimized, degree 18

Maximum relative error: 2.86272054791745787453118095889156969e-20
Maximum absolute error: 2.86272054791745787453118095889156969e-20

error-plot-cr18

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999997137279452082542 + x2*(-19.7392088021787171648042627245900989 + x2*(64.9393940226682600339169145088889141 + x2*(-85.4568172066883436276042941686355228 + x2*(60.2446413714002821865664454989888517 + x2*(-26.4262567588033183473572355881798248 + x2*(7.90353558996711987941677721380101198 + x2*(-1.71437516180775445884314339031685128 + x2*(0.281817053201561500323407638868350504 - 0.0350983829588417078760373537871295726*x2))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999997137279452082542 + x2*(-0.499999999999999998154315099318475409 + x2*(0.0416666666666666464830761430785494906 + x2*(-0.00138888888888880138354292714761533424 + x2*(0.000024801587301391185639801128147609099 + x2*(-2.75573191983631520203018748182144674e-7 + x2*(2.08767549239714497727103009851893486e-9 + x2*(-1.1470641559691907631205172698119569e-11 + x2*(4.77627556974286641810975958891813886e-14 - 1.50677871898184264862447669562686491e-16*x2))))))))

WL-style coefficient list:

{0.999999999999999999971372794520825421254688190411084303105`36., -0.4999999999999999981543150993184754092229377420536693426857`36., 0.041666666666666646483076143078549490646989405601871543181`36., -0.0013888888888888013835429271476153342409790381664992857501`36., 0.0000248015873013911856398011281476090989997999054664564914`36., -2.755731919836315202030187481821446739864646629753236`36.*^-7, 2.0876754923971449772710300985189348556318360528203`36.*^-9, -1.1470641559691907631205172698119568957183338975`36.*^-11, 4.776275569742866418109759588918138864877800612332857230548545722`36.*^-14, -1.506778718981842648624476695626864908924873401656320824178316`36.*^-16}

Cos, rel. error minimized, degree 20

Maximum relative error: 3.83379747773817394469035669860874374e-23
Maximum absolute error: 3.71671348650100186455052283486671174e-23

error-plot-cr20

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999996166202522262 + x2*(-19.7392088021787172375483865108094485 + x2*(64.9393940226682914268270556675993448 + x2*(-85.4568172066937141887740792731426095 + x2*(60.2446413718751703990627855459684853 + x2*(-26.4262567832775736706445887409631264 + x2*(7.9035363673527762364987010024920601 + x2*(-1.71439060577383078621333886528624499 + x2*(0.282004156316146650381968681921656903 + x2*(-0.0363633211804583796798227266129824054 + 0.0036599525371884609923028948666621371*x2)))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999996166202522262 + x2*(-0.4999999999999999999969452805795959 + x2*(0.0416666666666666666255172950807513268 + x2*(-0.0013888888888888886687119707284005049 + x2*(0.0000248015873015866881972488500331641627 + x2*(-2.75573192238849227440874853664844263e-7 + x2*(2.08767569773929399952910743265163937e-9 + x2*(-1.14707448930830276887881891315116143e-11 + x2*(4.77944661998650334511553845226073297e-14 + x2*(-1.56108270202840630711319117658432415e-16 + 3.97995430894436507218477438332260387e-19*x2)))))))))

WL-style coefficient list:

{0.9999999999999999999999616620252226182605530964330139125624`36., -0.4999999999999999999969452805795959000757485143012137765248`36., 0.0416666666666666666255172950807513267950013119677814116156`36., -0.0013888888888888886687119707284005048990931798118458582187`36., 0.0000248015873015866881972488500331641626509144544291018715`36., -2.755731922388492274408748536648442634446328829451295`36.*^-7, 2.0876756977392939995291074326516393686283230269228`36.*^-9, -1.14707448930830276887881891315116143490006820471`36.*^-11, 4.779446619986503345115538452260732967598368070500356217361125843`36.*^-14, -1.5610827020284063071131911765843241538279076121295503259378494`36.*^-16, 3.9799543089443650721847743833226038690788316403990503471078`36.*^-19}

Cos, rel. error minimized, degree 22

Maximum relative error: 4.29495542596219609810527296536498609e-26
Maximum absolute error: 4.29495542596219609810527296536498609e-26

error-plot-cr22

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999995705044574 + x2*(-19.7392088021787172376688183665147091 + x2*(64.9393940226682914908550790795508568 + x2*(-85.4568172066937277091481030812882183 + x2*(60.24464137187665676838184253041035 + x2*(-26.4262567833741106261890364183044783 + x2*(7.90353637130381918717311304157811646 + x2*(-1.71439071059196367848369994144272787 + x2*(0.282005957136193996718322627667697367 + x2*(-0.0363826695753648475294611641359695308 + x2*(0.00377817407524686306417278781479026612 - 0.000313693618892545548127138801407448319*x2))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999995705044574 + x2*(-0.499999999999999999999995855121670957 + x2*(0.0416666666666666666665992045901017882 + x2*(-0.00138888888888888888845216079270130966 + x2*(0.0000248015873015873001075796201592479227 + x2*(-2.75573192239855915494600176896710069e-7 + x2*(2.08767569878294028208678323910282378e-9 + x2*(-1.14707455944063191995946291534997447e-11 + x2*(4.77947714054123887323684076497833664e-14 + x2*(-1.56191333145443170903131182889979227e-16 + x2*(4.10851234761418167951440009282159662e-19 - 8.64069310821033119622399888572610661e-22*x2))))))))))

WL-style coefficient list:

{0.99999999999999999999999995705044574037803901894727034635`36., -0.4999999999999999999999958551216709569650308442264813089406`36., 0.0416666666666666666665992045901017882124040251110735423723`36., -0.0013888888888888888884521607927013096614898420811036595621`36., 0.0000248015873015873001075796201592479227083751472827119869`36., -2.755731922398559154946001768967100693727296826755743`36.*^-7, 2.0876756987829402820867832391028237788505928026476`36.*^-9, -1.14707455944063191995946291534997447341038821848`36.*^-11, 4.77947714054123887323684076497833664356529174903849339935367079`36.*^-14, -1.5619133314544317090313118288997922740082062218294258344917366`36.*^-16, 4.1085123476141816795144000928215966233821858998999664162037`36.*^-19, -8.6406931082103311962239988857261066089261708939179528033`36.*^-22}

Cos, rel. error minimized, degree 24

Maximum relative error: 4.08453472767001147349492089611627555e-29
Maximum absolute error: 4.0845356096706675936031957333105612e-29

error-plot-cr24

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999995915464 + x2*(-19.7392088021787172376689818143874965 + x2*(64.9393940226682914909600801809447874 + x2*(-85.4568172066937277359764329552915735 + x2*(60.2446413718766603558373535955043069 + x2*(-26.4262567833743967918630087707459676 + x2*(7.90353637131842771866677103924451885 + x2*(-1.71439071108694849022016578330065267 + x2*(0.282005968405983369131799542736742404 + x2*(-0.0363828401486796383531110000894051527 + x2*(0.0037798207399160031892693439623462996 + x2*(-0.000322872828234053676986536555096644262 + 0.0000224913321512810436524186985222331491*x2)))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999995915464 + x2*(-0.499999999999999999999999995304654619 + x2*(0.0416666666666666666666665758053288133 + x2*(-0.00138888888888888888888818884157334806 + x2*(0.0000248015873015873015844676723101640684 + x2*(-2.75573192239858899632267969671451625e-7 + x2*(2.08767569878679904539999412282442082e-9 + x2*(-1.14707455977181925161291069715764596e-11 + x2*(4.77947733154323482806513694443407265e-14 + x2*(-1.56192065419180836809895430039312807e-16 + x2*(4.11030298562894815972674061988163591e-19 + x2*(-8.89353449904256905090989216944095986e-22 + 1.56927240766816931826135305111096059e-24*x2)))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999591546439032933240639680426667`36., -0.4999999999999999999999999953046546194256316498901872446491`36., 0.0416666666666666666666665758053288133419675553748473400086`36., -0.0013888888888888888888881888415733480567675982706963925101`36., 0.000024801587301587301584467672310164068420490345108873036`36., -2.755731922398588996322679696714516252427125193799239`36.*^-7, 2.087675698786799045399994122824420820321537786268`36.*^-9, -1.14707455977181925161291069715764595837566109368`36.*^-11, 4.779477331543234828065136944434072653514070091189691448385543526`36.*^-14, -1.5619206541918083680989543003931280730903096831397261255006816`36.*^-16, 4.110302985628948159726740619881635908426350633878775919374`36.*^-19, -8.8935344990425690509098921694409598643243027900447545221`36.*^-22, 1.5692724076681693182613530511109605856954508537222155`36.*^-24}

Cos, rel. error minimized, degree 26

Maximum relative error: 3.33862465029656795822935765352100898e-32
Maximum absolute error: 3.33875354262687897026003767929157552e-32

error-plot-cr26

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999999996661 + x2*(-19.7392088021787172376689819995743288 + x2*(64.9393940226682914909602216329995422 + x2*(-85.4568172066937277360194491685402119 + x2*(60.2446413718766603627104022310161413 + x2*(-26.4262567833743974516829788971687438 + x2*(7.90353637131846871386720292089942776 + x2*(-1.71439071108866748555853678819970618 + x2*(0.282005968455628471974793992929041442 + x2*(-0.0363828411384502923157630731273879045 + x2*(0.00377983412801100302703133708895885354 + x2*(-0.000322990177600439427443846706921257629 + x2*(0.0000230928018029158810474906857727582979 - 1.36892355366832187250371434753876765e-6*x2))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999999996661 + x2*(-0.49999999999999999999999999999549188 + x2*(0.0416666666666666666666666665643465635 + x2*(-0.00138888888888888888888888796356941544 + x2*(0.0000248015873015873015872971773396566562 + x2*(-2.75573192239858906512875274817328617e-7 + x2*(2.08767569878680987405690005120423929e-9 + x2*(-1.14707455977296940706362564543678305e-11 + x2*(4.77947733238462710426914020405770261e-14 + x2*(-1.56192069668280744952451466714923773e-16 + x2*(4.11031754428943398478372408474600821e-19 + x2*(-8.8967668882284311250973250147050073e-22 + x2*(1.61123834023328757158702786214322464e-24 - 2.41937182488060032250287418487354979e-27*x2))))))))))))

WL-style coefficient list:

{0.999999999999999999999999999999966612464573731210297399623`36., -0.4999999999999999999999999999954918799433527383508751837219`36., 0.0416666666666666666666666665643465634649096321395216047145`36., -0.0013888888888888888888888879635694154363169987589444082503`36., 0.0000248015873015873015872971773396566561529109330145945794`36., -2.755731922398589065128752748173286172771572754044482`36.*^-7, 2.0876756987868098740569000512042392897436740245324`36.*^-9, -1.14707455977296940706362564543678305385024695939`36.*^-11, 4.77947733238462710426914020405770261468570721862552520860847436`36.*^-14, -1.5619206966828074495245146671492377263821233581829572134563955`36.*^-16, 4.1103175442894339847837240847460082057695110469291857938924`36.*^-19, -8.8967668882284311250973250147050072955589641385903516939`36.*^-22, 1.61123834023328757158702786214322464113453365416920515`36.*^-24, -2.41937182488060032250287418487354978994261463873037`36.*^-27}

Cos, rel. error minimized, degree 28

Maximum relative error: 2.37094722065961068544199718420836137e-35
Maximum absolute error: 2.37094722065961068544199718420836137e-35

error-plot-cr28

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999999999998 + x2*(-19.7392088021787172376689819997521556 + x2*(64.939394022668291490960221792317699 + x2*(-85.4568172066937277360195060393334989 + x2*(60.2446413718766603627211005056911042 + x2*(-26.4262567833743974528988209393520681 + x2*(7.90353637131846880405231895530775979 + x2*(-1.71439071108867205581314547149415801 + x2*(0.282005968455790804791695935304804337 + x2*(-0.0363828411425330384905234176488524789 + x2*(0.00377983420039862186366542260878072649 + x2*(-0.00032299106271176653165873880514394469 + x2*(0.0000230999067377242461707919693113923484 + x2*(-1.40262718004815224632990374879395083e-6 + 7.16144822225800304819861827511239386e-8*x2)))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999999999998 + x2*(-0.499999999999999999999999999999996284 + x2*(0.0416666666666666666666666666665688991 + x2*(-0.00138888888888888888888888888786329251 + x2*(0.0000248015873015873015873015816183988866 + x2*(-2.7557319223985890652555408421399961e-7 + x2*(2.08767569878680989787880284152372166e-9 + x2*(-1.14707455977297246495629818374412263e-11 + x2*(4.7794773323873783439784765486992477e-14 + x2*(-1.56192069685808034053910479920657012e-16 + x2*(4.1103176230061420775064813947065879e-19 + x2*(-8.89679126862663976086835125404000055e-22 + x2*(1.61173406801312979277352877800301076e-24 + x2*(-2.47893804670588492529166036962942878e-27 + 3.20600756109725541928196721886212037e-30*x2)))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999762905277934038931455799`36., -0.4999999999999999999999999999999962843648237757276217621366`36., 0.0416666666666666666666666666665688991274885348299100695146`36., -0.001388888888888888888888888887863292513626021226520636435`36., 0.000024801587301587301587301581618398886590073062014424567`36., -2.755731922398589065255540842139996095881093228321685`36.*^-7, 2.0876756987868098978788028415237216606794324075737`36.*^-9, -1.14707455977297246495629818374412262516059266131`36.*^-11, 4.779477332387378343978476548699247702628064894241981371762090442`36.*^-14, -1.5619206968580803405391047992065701236953591633857568130818394`36.*^-16, 4.1103176230061420775064813947065879028497648752179517982565`36.*^-19, -8.8967912686266397608683512540400005515924417087073692406`36.*^-22, 1.611734068013129792773528778003010761535014791674425`36.*^-24, -2.47893804670588492529166036962942877886197186308255`36.*^-27, 3.20600756109725541928196721886212037201474393281`36.*^-30}

Cos, rel. error minimized, degree 30

Maximum relative error: 1.47629942379879625523627834934956442e-38
Maximum absolute error: 1.47632042193695274932150580781960641e-38

error-plot-cr30

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

1. + x2*(-19.7392088021787172376689819997523022 + x2*(64.9393940226682914909602217924699491 + x2*(-85.4568172066937277360195061023778425 + x2*(60.2446413718766603627211142955499628 + x2*(-26.4262567833743974529006510214827576 + x2*(7.90353637131846880421187139140169693 + x2*(-1.71439071108867206540527992486527971 + x2*(0.282005968455791214248525283406958707 + x2*(-0.0363828411425456405075157884204392513 + x2*(0.00377983420067921786099683766019805811 + x2*(-0.000322991067190683705522220368542132537 + x2*(0.0000230999567066690674122752376561073748 + x2*(-1.40299716250630277621039932374524237e-6 + x2*(7.32479698171313153116454350681126065e-8 - 3.25475544474911064898529372709244227e-9*x2))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

1. + x2*(-0.499999999999999999999999999999999997 + x2*(0.0416666666666666666666666666666665864 + x2*(-0.00138888888888888888888888888888792216 + x2*(0.0000248015873015873015873015872954247692 + x2*(-2.75573192239858906525573168323374212e-7 + x2*(2.08767569878680989792094774070130099e-9 + x2*(-1.147074559772972471374259582051505e-11 + x2*(4.77947733238738528351115798998742201e-14 + x2*(-1.56192069685862134697357839719554288e-16 + x2*(4.11031762331127151219297331433042247e-19 + x2*(-8.8967913919984472368244650875181655e-22 + x2*(1.61173755446230144849643763129805917e-24 + x2*(-2.47959193649582299714152529144837331e-27 + x2*(3.27913485904815466449434894827885198e-30 - 3.69081529290172836989264646507263976e-33*x2))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999852367957806304725066`36., -0.4999999999999999999999999999999999973422142299333272051673`36., 0.0416666666666666666666666666666665864061862251237986210721`36., -0.0013888888888888888888888888888879221584297992849798038592`36., 0.0000248015873015873015873015872954247692174806278157732459`36., -2.755731922398589065255731683233742116527557403581632`36.*^-7, 2.0876756987868098979209477407013009877263356057956`36.*^-9, -1.14707455977297247137425958205150500339470449215`36.*^-11, 4.779477332387385283511157989987422009742169816529095597614838963`36.*^-14, -1.5619206968586213469735783971955428787959104803854593907564638`36.*^-16, 4.1103176233112715121929733143304224728800923191129735108231`36.*^-19, -8.8967913919984472368244650875181654964666247900428577623`36.*^-22, 1.6117375544623014484964376312980591722185101271598149`36.*^-24, -2.4795919364958229971415252914483733120773129776073`36.*^-27, 3.27913485904815466449434894827885198338459055474`36.*^-30, -3.690815292901728369892646465072639762950273246814058556989458228`36.*^-33}

Cos, rel. error minimized, degree 32

Maximum relative error: 8.12619624242803278859051444677398884e-42
Maximum absolute error: 7.7431483157510000902943142919188299e-42

error-plot-cr32

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

1. + x2*(-19.7392088021787172376689819997523023 + x2*(64.9393940226682914909602217924700741 + x2*(-85.4568172066937277360195061024372761 + x2*(60.2446413718766603627211143105053053 + x2*(-26.4262567833743974529006533125444093 + x2*(7.90353637131846880421210314740447933 + x2*(-1.71439071108867206542156324754790512 + x2*(0.282005968455791215068931892569073801 + x2*(-0.0363828411425456707138244707428422221 + x2*(0.00377983420068003750550893985453999107 + x2*(-0.000322991067207052330456610766908529837 + x2*(0.0000230999569442472186141307837306698564 + x2*(-1.40299959968484678574003956541754926e-6 + x2*(7.32647166293665566958868227178634487e-8 + x2*(-3.32390491443188418029324562110621609e-9 + 1.29705108807168488529330897590414318e-10*x2)))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

1. + x2*(-0.5 + x2*(0.0416666666666666666666666666666666666 + x2*(-0.0013888888888888888888888888888888881 + x2*(0.0000248015873015873015873015873015816028 + x2*(-2.75573192239858906525573192214581284e-7 + x2*(2.08767569878680989792100895777582633e-9 + x2*(-1.14707455977297247138515452278876132e-11 + x2*(4.77947733238738529741552609007542169e-14 + x2*(-1.56192069685862264373483246671607443e-16 + x2*(4.11031762331216282093935658832353954e-19 + x2*(-8.89679139244932113461297989744020352e-22 + x2*(1.61173757103868006574313381551459163e-24 + x2*(-2.47959624385183698302987689485713355e-27 + x2*(3.27988457342133952476810336110182605e-30 + x2*(-3.76922914750114764453840339303172407e-33 + 3.72564349303493030406966712013533341e-36*x2)))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999999918738037575719686`36., -0.499999999999999999999999999999999999998334442861919485251`36., 0.0416666666666666666666666666666666666094477917716240882855`36., -0.0013888888888888888888888888888888881045509885184309388778`36., 0.0000248015873015873015873015873015816028315532048783667751`36., -2.755731922398589065255731922145812842335922595466615`36.*^-7, 2.0876756987868098979210089577758263342836677688544`36.*^-9, -1.14707455977297247138515452278876132047257648017`36.*^-11, 4.779477332387385297415526090075421690054227868701591466619883273`36.*^-14, -1.5619206968586226437348324667160744319686899416303769384167753`36.*^-16, 4.1103176233121628209393565883235395362867866750414140056007`36.*^-19, -8.8967913924493211346129798974402035189574692070125108904`36.*^-22, 1.61173757103868006574313381551459163407549767008758544`36.*^-24, -2.47959624385183698302987689485713355289089989867847`36.*^-27, 3.2798845734213395247681033611018260470814214665`36.*^-30, -3.769229147501147644538403393031724066600338450782380338215890612`36.*^-33, 3.725643493034930304069667120135333411814681907221509573745618`36.*^-36}

Cos, abs. error minimized, degree 0

Maximum relative error: ∞
Maximum absolute error: 0.499999999999999975071181246315593155

error-plot-ca0

C-style Horner evaluation for sin(2πx) approximation:

0.500000000000000024928818753684406845

C-style Horner evaluation for sin(x) approximation:

0.500000000000000024928818753684406845

WL-style coefficient list:

{0.5000000000000000249288187536844068452878836863068567276073`36.}

Cos, abs. error minimized, degree 2

Maximum relative error: ∞
Maximum absolute error: 0.0280047979770638759291060552891241475

error-plot-ca2

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.971995202022936124070893944710875852 - 16.0000000000000002179692507853476138*x2

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.971995202022936124070893944710875852 - 0.405284734569351091296743474640156079*x2

WL-style coefficient list:

{0.9719952020229361240708939447108758524754531195581202864464`36., -0.4052847345693510912967434746401560789497236932431234169525`36.}

Cos, abs. error minimized, degree 4

Maximum relative error: ∞
Maximum absolute error: 0.000596770526309982297457348580684014551

error-plot-ca4

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.999403229473690017702542651419315985 + x2*(-19.5647477222549878348841378173530406 + 57.3415100655505164664127632969575748*x2)

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.999403229473690017702542651419315985 + x2*(-0.495580849220651811464013801967281656 + 0.0367916827993590494951089345856308425*x2)

WL-style coefficient list:

{0.9994032294736900177025426514193159854488455119022203006686`36., -0.4955808492206518114640138019672816559677261036455608121806`36., 0.036791682799359049495108934585630842466848558465608986245`36.}

Cos, abs. error minimized, degree 6

Maximum relative error: ∞
Maximum absolute error: 6.70471783257833560033871297733054832e-6

error-plot-ca6

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.999993295282167421664399661287022669 + x2*(-19.7357520605731997923131144531813776 + x2*(64.6605412184475346259857582330916529 - 78.216131988421407239016179329701802*x2))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.999993295282167421664399661287022669 + x2*(-0.49991243971224581435251505760757806 + x2*(0.0414877480454292132253667471195955447 - 0.00127120948569655081466419067530634131*x2))

WL-style coefficient list:

{0.9999932952821674216643996612870226694516786048117357739048`36., -0.4999124397122458143525150576075780596897617681514150996532`36., 0.0414877480454292132253667471195955446785127422202556658417`36., -0.001271209485696550814664190675306341309341784052185077019`36.}

Cos, abs. error minimized, degree 8

Maximum relative error: ∞
Maximum absolute error: 4.65333298636935875690755366488474953e-8

error-plot-ca8

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.999999953466670136306412430924463351 + x2*(-19.7391714347023936187801472240954706 + x2*(64.9345906267809912470922917936257057 + x2*(-85.2403303226994278863819325993069411 + 56.2423804648732435055202811617457179*x2)))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.999999953466670136306412430924463351 + x2*(-0.49999905347076729097546897993796764 + x2*(0.0416635846931078386653947196040757567 + x2*(-0.00138537043082318983893723662479142648 + 0.0000231539316590538762175742441588523467*x2)))

WL-style coefficient list:

{0.999999953466670136306412430924463351152504700515019821758`36., -0.4999990534707672909754689799379676398150209984364866058901`36., 0.0416635846931078386653947196040757567079280633710808363054`36., -0.0013853704308231898389372366247914264788129711647108438425`36., 0.0000231539316590538762175742441588523466656029306643982568`36.}

Cos, abs. error minimized, degree 10

Maximum relative error: ∞
Maximum absolute error: 2.19348317815576377245021713819752119e-10

error-plot-ca10

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999978065168218442462303648381 + x2*(-19.739208548913522979242130820260143 + x2*(64.9393466294885804834208034156025726 + x2*(-85.4535716268352565215233341354096818 + x2*(60.1440150929656073143633201490654729 - 24.9822378062077400002138086395123456*x2))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999978065168218442462303648381 + x2*(-0.499999993584717685582395813817447263 + x2*(0.0416666362580702975248498709575042942 + x2*(-0.0013888361400275250332287059384957359 + x2*(0.0000247601613525831235758833333699501231 - 2.60514952154827112019382972029056341e-7*x2))))

WL-style coefficient list:

{0.9999999997806516821844246230364838101182518274947911362928`36., -0.4999999935847176855823958138174472627568490281879399411397`36., 0.0416666362580702975248498709575042942293398777103052874096`36., -0.0013888361400275250332287059384957358998923680805341499328`36., 0.0000247601613525831235758833333699501230779370356546478097`36., -2.605149521548271120193829720290563411060759747697501`36.*^-7}

Cos, abs. error minimized, degree 12

Maximum relative error: ∞
Maximum absolute error: 7.48169860694358170822070099412796824e-13

error-plot-ca12

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999925183013930564182917793 + x2*(-19.7392088010038523705158852859029907 + x2*(64.9393937214303361737761541682004817 + x2*(-85.4567882334860836498463686351824135 + x2*(60.2433135172980315698446980943823431 + x2*(-26.3949729206059011561807631623839006 + 7.53672952180346297865741209396321406*x2)))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999925183013930564182917793 + x2*(-0.499999999970240325260062579581136404 + x2*(0.0416666664733851976839413971282747661 + x2*(-0.00138888841800116468296195769839668651 + x2*(0.0000248010406487978462229185911206625161 + x2*(-2.75246963898123729813292275409227504e-7 + 1.99078568526577620551890608596753138e-9*x2)))))

WL-style coefficient list:

{0.9999999999992518301393056418291779299005872031748236459514`36., -0.4999999999702403252600625795811364044395310274430396180813`36., 0.0416666664733851976839413971282747661289313047008581118086`36., -0.0013888884180011646829619576983966865058380414855444916287`36., 0.0000248010406487978462229185911206625161240987095552409875`36., -2.752469638981237298132922754092275035836528452849244`36.*^-7, 1.9907856852657762055189060859675313820032012704324`36.*^-9}

Cos, abs. error minimized, degree 14

Maximum relative error: ∞
Maximum absolute error: 1.93230575844198160047566973503160827e-15

error-plot-ca14

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999806769424155801839952 + x2*(-19.7392088021747558654927385178558316 + x2*(64.9393940213358573696438490894383272 + x2*(-85.4568170359342955933198219032765223 + x2*(60.2446306219523283098981516131014279 + x2*(-26.4258890666606654137170899758229465 + x2*(7.89655949788973907994819340298757011 - 1.64524054692082595073824496088423706*x2))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999806769424155801839952 + x2*(-0.499999999999899657270563796735665619 + x2*(0.0416666666658117451013560543638280049 + x2*(-0.00138888888611361728706523857964438186 + x2*(0.0000248015828760453656479722543550303923 + x2*(-2.75569357687372954745034678987402723e-7 + x2*(2.08583279601185364835442459941203768e-9 - 1.10080716366074620087149492800555232e-11*x2))))))

WL-style coefficient list:

{0.9999999999999980676942415580183995243302649683917329880915`36., -0.499999999999899657270563796735665618863154898131639042735`36., 0.0416666666658117451013560543638280048638834099880834402588`36., -0.0013888888861136172870652385796443818584510028904552569292`36., 0.000024801582876045365647972254355030392281050305378937401`36., -2.755693576873729547450346789874027233624171165487519`36.*^-7, 2.0858327960118536483544245994120376791123261502227`36.*^-9, -1.10080716366074620087149492800555231519253454295`36.*^-11}

Cos, abs. error minimized, degree 16

Maximum relative error: ∞
Maximum absolute error: 3.91018048927698453648852850918676152e-18

error-plot-ca16

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999608981951072301546 + x2*(-19.7392088021787070951372800410619596 + x2*(64.939394022663960757319625987229563 + x2*(-85.4568172059817358561226460072469135 + x2*(60.2446413132309244255076876631957671 + x2*(-26.4262540690970024823588805928350913 + x2*(7.90346253759247379426100249684495736 + x2*(-1.71321885875627832284898587056372472 + 0.271947641663980014582272096782358561*x2)))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999608981951072301546 + x2*(-0.49999999999999974308667070690271678 + x2*(0.041666666666663887964497659102665977 + x2*(-0.00138888888887731722447063574018337351 + x2*(0.0000248015872774439536215582612189964674 + x2*(-2.75573163935355075808996593111486352e-7 + x2*(2.08765619601383980877940138085106396e-9 + x2*(-1.14629048996344469555493302470243688e-11 + 4.60900737685258733987906059894416831e-14*x2)))))))

WL-style coefficient list:

{0.9999999999999999960898195107230154635114714908132384765347`36., -0.4999999999999997430866707069027167799802980625131753986239`36., 0.0416666666666638879644976591026659769609649814285024926592`36., -0.001388888888877317224470635740183373514814139707799956828`36., 0.0000248015872774439536215582612189964674040230626354896827`36., -2.75573163935355075808996593111486351929074749244764`36.*^-7, 2.087656196013839808779401380851063961597945875612`36.*^-9, -1.1462904899634446955549330247024368803677757911`36.*^-11, 4.609007376852587339879060598944168310662693008458895617026741406`36.*^-14}

Cos, abs. error minimized, degree 18

Maximum relative error: ∞
Maximum absolute error: 6.36705152453469880661396038810907771e-21

error-plot-ca18

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.9999999999999999999936329484754653 + x2*(-19.7392088021787172172834965112448604 + x2*(64.9393940226682807214796194853414423 + x2*(-85.456817206691520815089326857519872 + x2*(60.2446413716469799474997346585941065 + x2*(-26.4262567696429744526212421898601534 + x2*(7.90353587142375131781551707583799487 + x2*(-1.71437944219889029229915480302212545 + x2*(0.28185230256708262823500410729890442 - 0.0352197581729049705197313150862478292*x2))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.9999999999999999999936329484754653 + x2*(-0.499999999999999999483629620295181441 + x2*(0.0416666666666666597567106194509073831 + x2*(-0.00138888888888885302085566728426120377 + x2*(0.00002480158730149274647435112538868325 + x2*(-2.75573192096667530569389294627340694e-7 + x2*(2.08767556674236743347120826564072266e-9 + x2*(-1.14706701991831626578598421821623353e-11 + x2*(4.77687298101189663061322965166463478e-14 - 1.51198937469144760417667489952621371e-16*x2))))))))

WL-style coefficient list:

{0.9999999999999999999936329484754653011933860396118909222948`36., -0.4999999999999999994836296202951814411930056471734059881436`36., 0.0416666666666666597567106194509073830783417045599149246405`36., -0.0013888888888888530208556672842612037749164306483787245939`36., 0.0000248015873014927464743511253886832500200168152361337565`36., -2.755731920966675305693892946273406942380209317162986`36.*^-7, 2.0876755667423674334712082656407226584437772328395`36.*^-9, -1.14706701991831626578598421821623352721410933706`36.*^-11, 4.776872981011896630613229651664634784964398178926048348812577625`36.*^-14, -1.5119893746914476041766748995262137078783364240868360825711567`36.*^-16}

Cos, abs. error minimized, degree 20

Maximum relative error: ∞
Maximum absolute error: 8.52289673067732074183853338428631923e-24

error-plot-ca20

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999147710326932 + x2*(-19.7392088021787172376359678928319532 + x2*(64.9393940226682914698223657630719327 + x2*(-85.4568172066937224576379424120240736 + x2*(60.2446413718759843864392543849185206 + x2*(-26.4262567833238940511661820566269929 + x2*(7.90353636896598002129119927354601458 + x2*(-1.71439064070099719011216697690710745 + x2*(0.282004615014669515429128968641374382 + x2*(-0.0363666671046050444380288068438178429 + 0.00367035423724807832643664170925383103*x2)))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999147710326932 + x2*(-0.499999999999999999999163742902483883 + x2*(0.0416666666666666666531041132354245666 + x2*(-0.00138888888888888880310187101535943782 + x2*(0.0000248015873015870233005629400750831338 + x2*(-2.75573192239332256695859278971613616e-7 + x2*(2.08767569816541291395884906777039919e-9 + x2*(-1.14707451267757546018273288630548098e-11 + x2*(4.77945439407442225649362245140933143e-14 + x2*(-1.56122634304188074433057975000970292e-16 + 3.99126546408967813735306959579906681e-19*x2)))))))))

WL-style coefficient list:

{0.9999999999999999999999914771032693226792581614666157136806`36., -0.4999999999999999999991637429024838834426704193701566430571`36., 0.0416666666666666666531041132354245665858258251481027830567`36., -0.0013888888888888888031018710153594378246952809813344387892`36., 0.0000248015873015870233005629400750831337994431469544976171`36., -2.755731922393322566958592789716136159900855990509427`36.*^-7, 2.0876756981654129139588490677703991890519684382604`36.*^-9, -1.1470745126775754601827328863054809822977906031`36.*^-11, 4.779454394074422256493622451409331431448717629099004472613624344`36.*^-14, -1.5612263430418807443305797500097029154595225558829488274810368`36.*^-16, 3.9912654640896781373530695957990668084927827386003529629066`36.*^-19}

Cos, abs. error minimized, degree 22

Maximum relative error: ∞
Maximum absolute error: 9.54467166152347468773653866637555533e-27

error-plot-ca22

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999045532834 + x2*(-19.7392088021787172376689380039562318 + x2*(64.9393940226682914909266567999553743 + x2*(-85.4568172066937277259913079916407808 + x2*(60.2446413718766588149224873319037354 + x2*(-26.426256783374256506608901974470633 + x2*(7.90353637131033228597146895668324877 + x2*(-1.71439071077945317765488159069901187 + x2*(0.282005960615049890840257815427711553 + x2*(-0.0363827097748428891257638964454912318 + x2*(0.00377843725478991383698755314008036108 - 0.000314439329951950534507742809671497557*x2))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999045532834 + x2*(-0.499999999999999999999998885573466714 + x2*(0.0416666666666666666666451305655707591 + x2*(-0.00138888888888888888872590536824156365 + x2*(0.0000248015873015873009501019642624621983 + x2*(-2.75573192239857436736648083348872503e-7 + x2*(2.0876756987846606813417887454761316e-9 + x2*(-1.14707455956607849017989306493981385e-11 + x2*(4.77947719950138421925491727313196747e-14 + x2*(-1.56191505722390941644917208508280764e-16 + x2*(4.10879853781630806206359136865815304e-19 - 8.66123372498941866442018293026718247e-22*x2))))))))))

WL-style coefficient list:

{0.9999999999999999999999999904553283384765253122634613336243`36., -0.4999999999999999999999988855734667139160760530235885247321`36., 0.0416666666666666666666451305655707591114433939470283412393`36., -0.0013888888888888888887259053682415636492569729980402381653`36., 0.0000248015873015873009501019642624621982684750763420941365`36., -2.755731922398574367366480833488725032200966950866529`36.*^-7, 2.0876756987846606813417887454761316048056958112843`36.*^-9, -1.14707455956607849017989306493981385366066528616`36.*^-11, 4.779477199501384219254917273131967474420946230608388146305406417`36.*^-14, -1.5619150572239094164491720850828076365483935840068126754561002`36.*^-16, 4.1087985378163080620635913686581530378895623462401839336884`36.*^-19, -8.6612337249894186644201829302671824692148955238362355915`36.*^-22}

Cos, abs. error minimized, degree 24

Maximum relative error: ∞
Maximum absolute error: 9.07401246486339729568546521808840071e-30

error-plot-ca24

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999999092551 + x2*(-19.7392088021787172376689819506651266 + x2*(64.9393940226682914909601777990959774 + x2*(-85.4568172066937277360040162532594175 + x2*(60.2446413718766603598878496147972558 + x2*(-26.4262567833743971445385945355927903 + x2*(7.90353637131844726649219966859504084 + x2*(-1.71439071108766427922696079059489097 + x2*(0.28200596842352218031128201216497598 + x2*(-0.0363828404332981586515247006066357684 + x2*(0.00377982367593955383830539328888570653 + x2*(-0.000322890263629251873867665891901803951 + 0.0000225367159115055131020282243079044897*x2)))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999999092551 + x2*(-0.499999999999999999999999998756607315 + x2*(0.0416666666666666666666666384394668041 + x2*(-0.00138888888888888888888863713975854479 + x2*(0.0000248015873015873015861351854424461033 + x2*(-2.7557319223985890330997146702886084e-7 + x2*(2.08767569878680420885065648353959571e-9 + x2*(-1.14707455977229817590627572868734584e-11 + x2*(4.77947733184048509878946027377473279e-14 + x2*(-1.56192066641052311392222501358600492e-16 + x2*(4.11030617835876168464466883764666513e-19 + x2*(-8.89401475713535349215938946493873708e-22 + 1.57243893787622689684247777925479598e-24*x2)))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999909255126942858130857252936332`36., -0.4999999999999999999999999987566073151324485024547352827862`36., 0.0416666666666666666666666384394668040875449368957279721938`36., -0.0013888888888888888888886371397585447932599973866703341059`36., 0.0000248015873015873015861351854424461032688310578303174844`36., -2.755731922398589033099714670288608401099033927078484`36.*^-7, 2.0876756987868042088506564835395957098730535333914`36.*^-9, -1.14707455977229817590627572868734584144462729737`36.*^-11, 4.779477331840485098789460273774732789219535594514750446379440852`36.*^-14, -1.5619206664105231139222250135860049245327020338374984386314544`36.*^-16, 4.1103061783587616846446688376466651336352968606087523558751`36.*^-19, -8.8940147571353534921593894649387370792601526762530399474`36.*^-22, 1.57243893787622689684247777925479598408442305672511397`36.*^-24}

Cos, abs. error minimized, degree 26

Maximum relative error: ∞
Maximum absolute error: 7.41592015742532335431430174500802618e-33

error-plot-ca26

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999999999258 + x2*(-19.7392088021787172376689819997057802 + x2*(64.9393940226682914909602217440771265 + x2*(-85.4568172066937277360194862764099758 + x2*(60.244641371876660362716876219119872 + x2*(-26.4262567833743974523580371509750556 + x2*(7.90353637131846875921090919622816827 + x2*(-1.71439071108866953259090875487782083 + x2*(0.282005968455691884731877286121954956 + x2*(-0.03638284113980182602787393185189186 + x2*(0.0037798341474950790369529684075491542 + x2*(-0.00032299035911159625889898618510470773 + x2*(0.0000230937880634623850216019387595320672 - 1.37129763028714586303759834793194841e-6*x2))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999999999258 + x2*(-0.499999999999999999999999999998821582 + x2*(0.0416666666666666666666666666356165953 + x2*(-0.00138888888888888888888888856666592301 + x2*(0.0000248015873015873015872998425589606102 + x2*(-2.75573192239858906519914787052232289e-7 + x2*(2.08767569878680988603419087856828179e-9 + x2*(-1.14707455977297077670401259294404275e-11 + x2*(4.77947733238570183271096500841373748e-14 + x2*(-1.56192069674082898965595723875156815e-16 + x2*(4.11031756547706728973827020955354479e-19 + x2*(-8.89677188795462075499170060208177269e-22 + x2*(1.61130715391902171173178171723352863e-24 - 2.42356765748666433449749267974141391e-27*x2))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999925840798425746766456857`36., -0.4999999999999999999999999999988215816393807958149253644462`36., 0.0416666666666666666666666666356165953172808195313419988709`36., -0.0013888888888888888888888885666659230062711691338375619997`36., 0.0000248015873015873015872998425589606102058007091602535734`36., -2.755731922398589065199147870522322885870180827211403`36.*^-7, 2.0876756987868098860341908785682817878250710148177`36.*^-9, -1.14707455977297077670401259294404275038579175573`36.*^-11, 4.779477332385701832710965008413737475662077629638853824098823565`36.*^-14, -1.5619206967408289896559572387515681541131247038215633381851803`36.*^-16, 4.1103175654770672897382702095535447915164799659302102436748`36.*^-19, -8.896771887954620754991700602081772694881980321081750159`36.*^-22, 1.6113071539190217117317817172335286289143996744649595`36.*^-24, -2.42356765748666433449749267974141390605043897285044`36.*^-27}

Cos, abs. error minimized, degree 28

Maximum relative error: ∞
Maximum absolute error: 5.26528734946693245852103549454994295e-36

error-plot-ca28

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

0.99999999999999999999999999999999999 + x2*(-19.7392088021787172376689819997522644 + x2*(64.9393940226682914909602217924247691 + x2*(-85.4568172066937277360195060810737649 + x2*(60.2446413718766603627211090357849344 + x2*(-26.4262567833743974528998692112468831 + x2*(7.90353637131846880413605151304712308 + x2*(-1.71439071108867206036569854521654768 + x2*(0.282005968455790977704032856389483551 + x2*(-0.0363828411425376746819258103212524686 + x2*(0.00377983420048601204073094498943433597 + x2*(-0.00032299106384491314830240061254720802 + x2*(0.0000230999163610814809594351821322198123 + x2*(-1.40267537341253072097544681387459482e-6 + 7.17223743843259587983341565680992535e-8*x2)))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

0.99999999999999999999999999999999999 + x2*(-0.49999999999999999999999999999999904 + x2*(0.0416666666666666666666666666666375979 + x2*(-0.00138888888888888888888888888854167715 + x2*(0.0000248015873015873015873015851300782991 + x2*(-2.755731922398589065255650156007169e-7 + x2*(2.0876756987868098979009203365002863e-9 + x2*(-1.14707455977297246800234700978276498e-11 + x2*(4.77947733238738127452139849402089783e-14 + x2*(-1.56192069685827937291476847853211619e-16 + x2*(4.11031762310117306718115082701454485e-19 + x2*(-8.896791299839171898408159760286486e-22 + x2*(1.61173473945708322829830267621096395e-24 + x2*(-2.47902322141678170083969783303284805e-27 + 3.21083763283142640339634627057560775e-30*x2)))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999947347126505330675414806`36., -0.499999999999999999999999999999999039567228698162770055917`36., 0.041666666666666666666666666666637597868269802671677272559`36., -0.0013888888888888888888888888885416771480433156833887108554`36., 0.000024801587301587301587301585130078299138410595421671882`36., -2.755731922398589065255650156007169000172804830609726`36.*^-7, 2.0876756987868098979009203365002863020351339063904`36.*^-9, -1.14707455977297246800234700978276497799421836094`36.*^-11, 4.779477332387381274521398494020897827564243476379626417599372659`36.*^-14, -1.5619206968582793729147684785321161928329625245901039771108598`36.*^-16, 4.1103176231011730671811508270145448540726493946362029237529`36.*^-19, -8.8967912998391718984081597602864859974481790356614032585`36.*^-22, 1.61173473945708322829830267621096394641158694516010423`36.*^-24, -2.47902322141678170083969783303284804576427794822448`36.*^-27, 3.21083763283142640339634627057560775022901951197`36.*^-30}

Cos, abs. error minimized, degree 30

Maximum relative error: ∞
Maximum absolute error: 3.27804061650188319204074676993384692e-39

error-plot-ca30

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

1. + x2*(-19.7392088021787172376689819997523022 + x2*(64.9393940226682914909602217924700376 + x2*(-85.4568172066937277360195061024176824 + x2*(60.2446413718766603627211143049736489 + x2*(-26.4262567833743974529006523683795894 + x2*(7.90353637131846880421199739135869544 + x2*(-1.71439071108867206541338101228495264 + x2*(0.282005968455791214617239056200980108 + x2*(-0.0363828411425456525740342175807161216 + x2*(0.0037798342006795028260996383094121105 + x2*(-0.000322991067195497046314497636683891633 + x2*(0.0000230999567633724752752458927214099739 + x2*(-1.4029976049577646266926173182276883e-6 + x2*(7.32500246502529555585438033894544095e-8 - 3.25905486760831267503629102752953663e-9*x2))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

1. + x2*(-0.499999999999999999999999999999999999 + x2*(0.0416666666666666666666666666666666432 + x2*(-0.00138888888888888888888888888888856966 + x2*(0.0000248015873015873015873015872993043238 + x2*(-2.7557319223985890652557318236882388e-7 + x2*(2.08767569878680989792098102289751236e-9 + x2*(-1.14707455977297247137967990498343616e-11 + x2*(4.77947733238738528976017154405452036e-14 + x2*(-1.56192069685862186499098115280481984e-16 + x2*(4.11031762331158139273849029500580264e-19 + x2*(-8.89679139213103074540244650455765911e-22 + x2*(1.61173755841862972561211457857514863e-24 + x2*(-2.47959271846395979322459305387477117e-27 + x2*(3.27922684896863327088335713153287456e-30 - 3.69569073620576969980558269093164118e-33*x2))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999967219593834981168078`36., -0.4999999999999999999999999999999999993196939767680649178464`36., 0.0416666666666666666666666666666666432274026802735518603999`36., -0.0013888888888888888888888888888885696571015335165201114657`36., 0.0000248015873015873015873015872993043238143899369829652366`36., -2.755731922398589065255731823688238796326026222950437`36.*^-7, 2.0876756987868098979209810228975123649439094413537`36.*^-9, -1.1470745597729724713796799049834361620817455321`36.*^-11, 4.779477332387385289760171544054520359735569080212410697141840568`36.*^-14, -1.5619206968586218649909811528048198421057622919044395959757781`36.*^-16, 4.1103176233115813927384902950058026377054660220680138622483`36.*^-19, -8.8967913921310307454024465045576591140562061091346843899`36.*^-22, 1.61173755841862972561211457857514862674896127252646804`36.*^-24, -2.47959271846395979322459305387477117204123871735524`36.*^-27, 3.27922684896863327088335713153287455501491955828`36.*^-30, -3.69569073620576969980558269093164118008932637005790439999126744`36.*^-33}

Cos, abs. error minimized, degree 32

Maximum relative error: ∞
Maximum absolute error: 1.80406534594806334360281404185405666e-42

error-plot-ca32

C-style Horner evaluation for sin(2πx) approximation (set x2 = x * x first):

1. + x2*(-19.7392088021787172376689819997523023 + x2*(64.9393940226682914909602217924700741 + x2*(-85.4568172066937277360195061024373088 + x2*(60.2446413718766603627211143105141595 + x2*(-26.4262567833743974529006533139998651 + x2*(7.9035363713184688042121033048638694 + x2*(-1.71439071108867206542157504411073499 + x2*(0.282005968455791215069563913245262991 + x2*(-0.0363828411425456707385078208603390493 + x2*(0.00377983420068003821433238732024539201 + x2*(-0.000322991067207067279355460530121728446 + x2*(0.0000230999569444759017126226911736461456 + x2*(-1.40299960215288451000857092116244391e-6 + x2*(7.32647344405838402329703796332643925e-8 + x2*(-3.32398203242913388247207307411141944e-9 + 1.29856563034244219466942373289485008e-10*x2)))))))))))))))

C-style Horner evaluation for sin(x) approximation (set x2 = x * x first):

1. + x2*(-0.5 + x2*(0.0416666666666666666666666666666666667 + x2*(-0.00138888888888888888888888888888888864 + x2*(0.0000248015873015873015873015873015852479 + x2*(-2.75573192239858906525573192229758788e-7 + x2*(2.08767569878680989792100899936785891e-9 + x2*(-1.14707455977297247138516241570198547e-11 + x2*(4.77947733238738529742623766654306629e-14 + x2*(-1.5619206968586226447944923010120297e-16 + x2*(4.11031762331216359173758562466598535e-19 + x2*(-8.89679139244973290214501480503565676e-22 + x2*(1.61173757105463581590277799117611453e-24 + x2*(-2.47959624821373207705239218354539419e-27 + x2*(3.27988537078655827882448844587725832e-30 + x2*(-3.76931659747655711635436902424567497e-33 + 3.72999385718624695747058735680768987e-36*x2)))))))))))))))

WL-style coefficient list:

{0.9999999999999999999999999999999999999999981958798622600974`36., -0.4999999999999999999999999999999999999995773278516675801501`36., 0.0416666666666666666666666666666666666502197032992932819312`36., -0.0013888888888888888888888888888888886355617159998388643421`36., 0.0000248015873015873015873015873015852479346440542757613049`36., -2.755731922398589065255731922297587881122466366477743`36.*^-7, 2.0876756987868098979210089993678589083927213950462`36.*^-9, -1.14707455977297247138516241570198546513244099493`36.*^-11, 4.779477332387385297426237666543066294771374723240742407138232996`36.*^-14, -1.5619206968586226447944923010120297038303061216436958447936055`36.*^-16, 4.1103176233121635917375856246659853489698275412494367047364`36.*^-19, -8.8967913924497329021450148050356567640984252220113163092`36.*^-22, 1.61173757105463581590277799117611453486309244505134974`36.*^-24, -2.47959624821373207705239218354539418613693929691326`36.*^-27, 3.27988537078655827882448844587725832176277660836`36.*^-30, -3.769316597476557116354369024245674966444008329163378000195458476`36.*^-33, 3.72999385718624695747058735680768987103447181840612519738343`36.*^-36}

Appendix A: Summary of Polynomial Degree vs. Max. Error

error-summary-plot

Appendix B: Why approximate sin(2πx) et al. this way?

Context

The approximations are provided with DSP applications in mind. Calculating sines and cosines with low memory footprint, only floating-point multiply-adds and no more precision than needed can improve performance significantly in some cases.

The interval [-1/2, 1/2] can be folded with the function f(x) = max(min(x, 1/2 - x), -1/2 - x)) such that a polynomial p(x), which approximates sin(2πx) over [-1/4, 1/4] (which is true for odd polynomials fitted over [0, 1/4]) can be evaluated over [-1/2, 1/2] as p(f(x)). To approximate sin(2πx) over [-∞, ∞], one can evaluate p(f(x - ⌊x + 1/2⌋)). Similar folding functions can be used for cosine approximations and obviously, both the polynomials approximating sine as well as those approximating cosine can be used as building block for either sine or cosine over [-∞, ∞].

What sorts of intervals and sine function variations to optimize over

I chose to approximate sin(2πx) for 0 < x < 1/4 and cos(2πx) for 0 < x < 1/4. sin(2πx a) for 0 < x < 1/(4a) and any a ∈ ℝ is already covered then, since it is trivial to transform the coefficients accordingly and the optimum approximation coefficients would be the same, except for that transformation. Similarly, (a sin(2πx)) for any a ∈ ℝ does not gain anything. This includes -sin and -cos in particular. sin(2πx + a) for 0 < x < 1/4 and any a ∈ ℝ is not generally sufficient since one needs to approximate at least a complete quarter of one period from an extremum to a zero of the sine function to be able to calculate all sine output values from that approximation. At the same time, approximating over a bigger interval than a quarter of a period is either redundant or would (probably) need unnecessarily many coefficients (although I have not tested or proven that last assumption).

What sorts of polynomial coefficient sets to use

After having found a number of optimal approximations for given sets of coefficients between a0 and a7 and by minimizing the p-Norm of the error for p ∈ {2, 4, 6, 8, ∞}, it became empirically clear that the most efficient method of achieving the lowest error using the fewest coefficients is to only use coefficients with an odd index (a1, a3, a5, a7, …) for sine and only coefficients with an even index (a0, a2, a4, a6, …) for cosine. This is somewhat expected since sine and cosine are odd and even functions, respectively. Other coefficients tend to improve the approximation less than using the next higher-order odd (or even) coefficient while needing the same number of multiplications and additions. Generally, the results always showed the least error for a given number of nonzero coefficients when using only odd or even coefficients. Interestingly, the approximations of the sine function for a given number of odd coefficients were usually marginally or even substantially better than the approximations of the cosine function for an equal number of even coefficients. I have not attempted to prove these results or found something like a proof, so they may not generally hold true for higher degree polynomials, other values of p, or other norms in general, but the trend was definitely visible in the data. Evaluating a polynomial with n coefficients ai where i = 2 j + 1 and j ∈ {0, …, n-1} (having a sine approximation in mind) takes merely one multiplication more than evaluating such a polynomial where i = 2 j (having a cosine approximation in mind) when using Horner’s scheme.

Some of the discussed findings are reflected by [Garrett2012] and [samhocevar2018].

More design variables

Other things to consider when finding such sine approximations include choosing whether the points sin(0) == 0 and sin(2π 1/4) == 1 should be matched perfectly by the polynomial, whether one wants to minimize relative, absolute, or some other error, choosing the norm one wants to minimize and choosing the numerical precision of the coefficients one wants to derive.

Having "exact" output values at the zeros and extrema of the sine function might come in handy in certain situations, but it comes at the cost of a higher maximum error over the interval.

When trying to find approximations whose errors are near a floating-point epsilon, one should obviously minimize the relative error. For an approximation that does not focus on reaching some floating-point precision, minimizing the absolute error may be more appropriate, depending on the application.

Of the p-Norms, p → ∞ (the Max-Norm) does not increase the mean error significantly compared to an approximation using, say, the 2-norm, while the maximum error decreases substantially, which is often desirable.

Methods to find optimal approximations

One can of course formulate the problem as an optimization problem and do an exhaustive (or "smart") search of the parameter space. I was able to do this fairly successfully with polynomials of low degrees. An advantage of this method was that I did not need to implement any fancy algorithms or use any algebra to get special polynomials where some coefficients ai == 0. That being said, this method is of course very naive. It can reach exponential runtime and I would highly discourage it.

The Remez algorithm [Remez1934] can be used to minimize the Max-Norm.

[Garrett2012] describes an algorithm for minimizing the 2-Norm of the absolute error. I did not check whether this can be generalized to other p-Norms, but I would assume so.

Summary

So basically, my goal was to find polynomials, whose even coefficients are equal to zero, with a minimum error on the interval [0, 1/4] when approximating sin(2πx). Similarly, I found approximations for cos(2πx) using only even coefficients. I chose the Max-Norm to measure the error over the approximation interval. I found approximations both for minimal relative error and for minimal absolute error. The value at x == 0 is then fixed by definition for the sine approximations, but I left other extrema (and zeros of the cosine approximations) open for optimization. The coefficients were found with extremely high precision and then rounded to 36 digits before evaluation.

I am sure something like this or quite similar approximations have been done thousands of times before, but I had a hard time finding a collection like in this document, so I chose to make one myself.

Implementation

Although there were a couple of options, I ended up using the Julia language to do the actual approximation finding. I had tried with the Wolfram Language’s Function Approximation Package and the C++ Boost Libraries among others, but nothing seemed to work quite the way I needed it to. I’m sure that I can blame myself in part. It’s always kind of funny and sad how much time one can waste on such little stupid things, always thinking that the solution is basically right around the next corner while not anticipating the next problem awaiting you instead. Anyhow… 😄 There is a Julia package called Remez.jl [simonbyrne2018], which only worked in Julia 0.6 at the time of writing. Here’s the code I finally wrote to get my approximations:

using Remez
setprecision (2000)

for sine in[true, false]
  for relative in[true, false]
    for degree in 0 : 16
      filename = "outfiles/"*(sine?"" : "co")*"sine-"*lpad(degree, 2,
        0)*(relative?"-relative.txt" : "-absolute.txt")
      println ("Computing: "*(sine?"S" : "Cos")*"ine, "*(relative?"relative" :
        "absolute")*" error, degree $degree. -> $filename")
      if sine
        out = ratfn_minimax ((x) -> sin (sqrt (x))/(sqrt (x)), (BigFloat (1. e -
          318), BigFloat (pi*pi/4.)), degree, 0, (relative?(x, y) -> 1./y
          : (x, y) -> sqrt (x)))
      else
        out = ratfn_minimax ((x) -> cos (sqrt (x)), (BigFloat (1. e - 318),
          BigFloat (pi*pi/4.)), degree, 0, (relative?(x, y) -> 1./y : (x, y)
          -> 1.))
      end

      open (filename, "w") do f
        write (f, string (out))
      end
    end
  end
end

Bibliography