[nfft] 01/04: Imported Upstream version 3.3.2~rc2

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jun 30 16:07:01 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository nfft.

commit b95f63e7287db2c5d098af4c9dbd0451f7ab2070
Author: Ghislain Antony Vaillant <ghisvail at gmail.com>
Date:   Thu Jun 30 11:43:51 2016 +0100

    Imported Upstream version 3.3.2~rc2
---
 kernel/util/bessel_i0.c | 211 ++++++++++++++++++++----------------------------
 1 file changed, 89 insertions(+), 122 deletions(-)

diff --git a/kernel/util/bessel_i0.c b/kernel/util/bessel_i0.c
index d7673e8..2f5b27d 100644
--- a/kernel/util/bessel_i0.c
+++ b/kernel/util/bessel_i0.c
@@ -23,133 +23,90 @@
     /* long double 128 bit wide */
     static const R P1[] =
     {
-/*        K(1.00715709113717408460589579223209941204261347125985390244049122),
-        K(0.244951997023176876020320575838917179801959212259109588711443322),
-        K(0.007157677421552158878119583351756319398653762265084335703499437),
-        K(0.000088638803372684623765617528646130117285577351082745565226135),
-        K(5.86290506716174293160891590037213629006472953235560773267e-7),
-        K(2.345957469650316879673588315314269880856753475545514611e-9),
-        K(6.128655873200031753345017339110506400750029700912053e-12),
-        K(1.0986892011606471142197070904902679807307454250063e-14),
-        K(1.3971139352985872209413265761909675621623302845e-17),
-        K(1.2871864763402201040551492995178709443354555e-20),
-        K(8.691006015934819586402366491436791599814e-24),
-        K(4.309390047550403478410330783891146603e-27),
-        K(1.555612957227921944637472907134242e-30),
-        K(3.9925388022711127965090640127e-34),
-        K(6.9368410036374068977799409e-38),
-        K(7.357454531748581565018e-42),
-        K(3.62204101214442072e-46),*/
-            K(0.9999999999999999999999999999999999999999963515065921354497623928177244792974547753040696048019993068306675177598294917679926543),
-            K(0.24276955985311678830288083577293544704012354683319145630709103400802420412620905478538554110386082548028866764933663319841013742),
-            K(0.013844000842246463336843317193621339855944831486655409125072546540606366090450490190063651171448141102105390267023313455494802031),
-            K(0.00032763845166349779609624476806643905692244330767883713044114956959726110588033852488576786498440206723959034484117143043714211872),
-            K(4.04278885380813770024807051634824441153887632161345065929233320635142375490984393216297506314781705551344035216665454332238235e-6),
-            K(2.9325743226756448326703947080260081389259160960470915792249652053458431219164897298629105406427758884445334480365543323669142762e-8),
-            K(1.3416945462493443207573100874446091344709631116863657704764416440229805215129727891601536132878669919905709392817394894494425677e-10),
-            K(4.0371971250467042974736443967244346562054293605112799970377213755073446077415709659054361024114190831360613645387670633846568544e-13),
-            K(8.1678797936139235907848459949161332792483634497971529272331873214695723482690572892077603647732164105505823130495158062801046885e-16),
-            K(1.1165878793312910647478353889670801840459072972272122299134924612830770907089313712476063043251498513091899193529937985402078293e-18),
-            K(1.0169264578489866422787383175800265073817756845613863091789102925882053694431068354556850955496203485982689612448409358037117224e-21),
-            K(5.9142741273023781136631333449369758009797135719841659345768586480313343614241803535448993719207666398407854710005136444504735373e-25),
-            K(1.9897807089898986657009220458155311224877079439590225847312210818955629435772271187048354122731017832435358317884079274114350597e-28),
-            K(2.9530812783305899252122293177156565148483175841218970825603396228881503512715581471598172039269397955931595227424211384966216511e-32),
+        K(0.9999999999999999999999999999999999962027889818871465625924752326583154315551642695323965510694779151206544639605419513240736857),
+        K(0.25000000000000000000000000000000012196714800029501487764875563265263401524033425368818847175854607800541392646833606522273821246),
+        K(0.027777777777777777777777777777777144587988290342214362953013414854374623029362784740516243952857824585136440104808521394795213943),
+        K(0.0017361111111111111111111111111123869249041395763984631620599418268304349163419724426016945727467811299651660803976432220176426406),
+        K(0.000069444444444444444444444444443107647328522467237563132750155356213911633630315806134293192377451924142086027094615621024770286162),
+        K(1.9290123456790123456790123465252951528964587234675843733257549721655185850604449629037749798050593867815808367493607761074167203e-6),
+        K(3.9367598891408415217939027108074887847673564509601917363278330920730719763184952569786096533271821267912464336083679709264700463e-8),
+        K(6.1511873267825648778029740886343589006492244222098376295896480615672663845071908228080782331139431967897922330634666102008303163e-10),
+        K(7.5940584281266233059295735665953083409170414099680216865037645091739362117435423650805312126318743025058577203204754258976678014e-12),
+        K(7.5940584281266233059299735717776013802752093873942144943735559285381124771290874275774972580263377448832380260417572227398010273e-14),
+        K(6.2760813455591928148129664638468741352313877508511272487605818260638787040214741939853005199347727650099145873785771162609470873e-16),
+        K(4.3583898233049950103405756560043488004237104566659409254314063662323845080352835082013472245469229428130314480254874472462460891e-18),
+        K(2.5789288895295828459033545114345754110126610917070986842981263284383138335900724842812739092696462831628856077304156728937367615e-20),
+        K(1.3157800456783585979726388980387458854840810376002467594059415767303181634829326622143751699233015215909660383669969973896437826e-22),
+        K(5.8479113141260380335975041071277913723234662896226038462639284334574178411617861304919195972489113065590753369218560772342930726e-25),
+        K(2.2843403570804844741559425131287256347316408180969139215424927280400161659234508601992572475246984021932920101195981533775809011e-27),
+        K(7.9042918930120215557655530936488590704671411306518762754706457865191035559604608171265261834240025123226121413351951869227469481e-30),
+        K(2.439596263275438744691212721375550679559038036180973780451914524892069264667965537779114429543772487937962814842584430315822309e-32),
+        K(6.7578843858008565460738956555556721994562125360817163818492848944114465748014992064357014275747373903974186259850477923287772269e-35),
+        K(1.6894710964596677914300599135928934608666852785592175435009841929849562545281838798552390215907162912732614665877854602723350365e-37),
+        K(3.8310002185198913939699183167260082132386992335359252310560205887083199288222921373551164604122527855575096799590794332372889982e-40),
+        K(7.9152897117050638868250808160461112764395266893341033364145136187242187903457065607810464366513129569605469553757332577108931927e-43),
+        K(1.4962740408949741994371775249428502243459110838196377209217623910923455903816887608569441907818721649385471112081388662207931364e-45),
+        K(2.5976980842076886545162534185856248239556535520445635413487233605795098016339073754464291911162237045775316398305220029774563812e-48),
+        K(4.1563157246970089177790104414625258959749615665778227563200792024682955941012716142727278222955329547858593509607233532321977384e-51),
+        K(6.1484091972930398448317003607725995381550723813563853679777776077080177504939862858361387931698777740352242553154617386041598546e-54),
+        K(8.4339079896649387396805165150345921345758626392364604080732341511582436140021851014611248449264294960348295127030417414763783526e-57),
+        K(1.0758542181237264915749101505104765885049322002226174095616335030835886896108338436649327399785636341219913669804985122152824265e-59),
+        K(1.2785524522454856200134470274184700289665086209215001086254221172250431156408812081801869424331341843840158057362920094547656938e-62),
+        K(1.4248179766163819508194806049285708797690012879420281636927945272874304904429404793261110930103216776338690899423424418356698994e-65),
+        K(1.4613184522449821802557940850011777432583484917091332887731152191646500305736827143107335993192474581511762327392034830200299768e-68),
+        K(1.517919158523286579991864653430437909257242986598610110778281992820044480031975647280367518640551811313326095597412581231791542e-71),
+        K(1.0730639360074958234700168111189609812309927776575154251790558216554191498594054258151950239282462897703667491995027177113192561e-74),
+        K(1.849733759307828545234442543657764632352967627228530812064253357302934215881683992754041627944673908746817007111464947383730042e-77),
+        K(-5.8729229858051647671731463714537532835823360515481187134639456051237156797256723676348818396781843804444226329124520413341278697e-81),
+        K(3.1842186240879590225313774846938043014439524114338193689962549518448769929496194164836586422709285896399036894999980974150749013e-83),
+        K(-2.1881719673472495157660923989130852804625696106789978549832744474725166266000647439983140838502086580706730083730364920779307716e-86),
+        K(2.0535558773071560722118718580083555594558665120203432096590057810260358624306996796538168725229696967831406758396551788353456152e-89),
     };
     static const R Q1[] =
     {
-        /*K(1.000007070784273109528051454385187718969110645914059499666326971665),
-        K(-0.005313926453449002844879821442805584438144938596471790433918964154),
-        K(7.070788418542362565462155969863941136682888242514039780835548e-6),
-        K(-6.26540971437695808708857953483635930152829451235344028056e-9),
-        K(4.145433773149898726789014352388133793941127788810021957e-12),
-        K(-2.175603200497645955857316018087216481968512641548262e-15),
-        K(9.38635995876117135738708302122439402494096616172e-19),
-        K(-3.40237206590514988600833435986797066144532635e-22),
-        K(1.04920116497922307284730776882365699575587e-25),
-        K(-2.7669765371483918815184949580784634161e-29),
-        K(6.231564149372584873279011515844227e-33),
-        K(-1.188050982913851622946881814029e-36),
-        K(1.88293159106694034780937099e-40),
-        K(-2.4019827304263718078055e-44),
-        K(2.329008315410200325e-48),
-        K(-1.5351885198203e-52),
-        K(5.185989964e-57),*/
-            K(1),
-            K(-0.007230440146883211697119164227064552959940469601802150267743902983950633225740330555568499761006523145220060365617298575094972364),
-            K(0.000026610878967266261123108250387478096107767403703098829324400402789773733036278358942208368636230110552954724959336237423334611354),
-            K(-6.6418561046364194823131260324605071971736768593116331036743492617164346537067017078667860850205389434338539132171418303552823641e-8),
-            K(1.2635173536516244659083712181830860254951317797951697889315997192717623908334183898523633919285989474010384847783329982632172733e-10),
-            K(-1.9517346807463823741843626600230023016243596738590561462886629288968714083439872722087483091272116306494280458539104079877963867e-13),
-            K(2.5459600708465926950568822248200620423992132521259083910226347336222666927639065909493751131398894251614012646995410744015559072e-16),
-            K(-2.8790218876160776506148097182123491633858030422401313378350393848406759730467694280467887294892944770215457791589036549542194809e-19),
-            K(2.8738884119239095061588791219478165718008910893684665211335982689627174926584039000157382606089292467623099246542063585502730545e-22),
-            K(-2.5644755191632550113321700287923019423704601492756985611529511459673947528784204294165642982187400805362843756251316630197171617e-25),
-            K(2.0630019070002105495983927614425566607750872558325302074182464328391656962221421552530098790143235472950584190081781381635126635e-28),
-            K(-1.5036541536186884008079051856308703738223209609730328195575520395541903540554854682218673228471525989874850952368884748950691195e-31),
-            K(9.9483378830871614794714300624683404078126644061648067673976795037385419799614706160677430487801547129197617194653848496972860448e-35),
-            K(-5.9666072338595577136675685567379621640652365858136833276048183536646869001300548323677693849740241191969161925507470584091020584e-38),
-            K(3.2281028151284542036169429498006402237378996543942470437138237045380783628834109543661443253176467830392497005208834688479362203e-41),
-            K(-1.5609087004678718448649634494155339624833103667184112471336868908855917869938809716149630194765597509071088580980485176246671792e-44),
-            K(6.6442791370456417706879995929001251138613704220713466640453318576286491971798462000027629043082409996804243977262775241716469185e-48),
-            K(-2.4316502070204632324531926290052001071369167680891484995765974380869029745472241953227653321482690388081421033279879605300878605e-51),
-            K(7.3718663976068509458216002032719538491642327044087760501859950135169216959756295014557221276386055532269835887246143354291263258e-55),
-            K(-1.7402063031722075308972216386755603097203276298684716386056631858675960072536233015088697443420074462290323581370737416680264926e-58),
-            K(2.8480300407821398144958972563451588416708146926635758589735999654660638025080500841891165268477538943982713226240517522905931531e-62),
-            K(-2.4252997561052839868467014562745507777332139979018019792999864063820565601738471968013560629065587192404418964874082120251773035e-66),
+        K(1),
     };
     static const R P2[] =
     {
-      K( 131.0667020533290798466779416062094395070734202211890460026693857),
-      K(-245.6303545941878773983069709370348347580041325639555236454969282),
-      K( 204.5101554148308448423458719550952945685069457114308003995567211),
-      K(-150.5327320302921153754033870344894598759293143264072490756636477),
-      K( 98.7912567249134681293252237328232822188103014960829409778733265),
-      K(-57.7019241687318590480852440271548151666166507997357208465833492),
-      K( 30.1081598594932287475081756049550869990287890532877175670317803),
-      K(-14.0088712491952531569334147267018927351724433165829632848926311),
-      K( 5.8111909743388254524987383393719023598144356156326152933831237),
-      K(-2.1414136626793476610653760169160704073350780611789294609123711),
-      K( 0.698259559703142895902111022926235616592885506170181809796723),
-      K(-0.2001189347807367129846000381714457873845590394096920427488356),
-      K( 0.049988621846192684047867347253361546337456980171441178625268),
-      K(-0.0107553807128048320349112565182564637746370430259714241685807),
-      K( 0.0019628478791093008488874963820323167136472914702684286586238),
-      K(-0.0002975064821201439959012839810796951490827490578144599267114),
-      K( 0.0000363948822068787975159479880539390140326476204059270500102),
-      K(-3.4500354506312803346122587812035952285744626406680126004e-6),
-      K( 2.389194163273735466736165111640837640682648262451843124e-7),
-      K(-1.10522228579658847710719851107420853059835206797979003e-8),
-      K( 2.998585735858447897961231663140456464729911623332484e-10),
-      K(-3.9833617558882606404645795329229040634928477778665e-12),
-      K( 1.92588438006565847602499920031655017544553574078e-14),
-      K(-1.53988141966712757209882685942469734803820881e-17)
+        K(0.39894228040143267793994605993438189141018035442705729869804407689568381581734064686884602636060801485954621762740457550454120697),
+        K(0.049867785050179084742493257490426145214512545591609659268248950196534280305961469882423461068790635445162491599891668241427694247),
+        K(0.028050629090725735167652470998240899244071027169401361478749442415263988321141666521103085221687123192693334717091473761538817597),
+        K(0.029219405302839307466250377876541919632987444632087277804127165783408826159066976653503074036487303121478723913535606767065816568),
+        K(0.044742214369972689672757506995683668911838579935127513656738903414493578300728048844259081530992294260985826760124616165540729805),
+        K(0.090602984099194545717108245690464709907435886237578028801057472781356468016933973445902282489417082489842418887592185592440521463),
+        K(0.22839502241685343551568202900938534408323646867712940217756161458845324824124440104346632880269277474229622722857526929839330408),
+        K(0.68926354970839797649853996399096479758550548316271823261307182611573812144139459011679425469995979044875363036072019650427109275),
+        K(2.423192207724660758719355443491407013949377273831782675793140405839150024194700004683477388942832249119599378305563068242785029),
+        K(9.7264091894977322855634221908603466759090961796678318811908721617317858636550474385646395183519977007947556596807399846944242623),
+        K(43.894849749018396087574371484153328058059670508806822372081594668827438357942108803133491029755284933660373288867373132032368835),
+        K(218.92224061880098667718426029789638820474517627422355720085391021586878854687601367885067299893531247137789283401227975375634307),
+        K(1411.0714378841016321410168079012058915863951925541781772306639164464058932052840516833410793638465388787557712463940136004684829),
+        K(-24669.417143852155941925922310645066937535848529101153480534808775058200117108762353716556845844109846670042694143992197668096542),
+        K(4.3456187215737626225180053878439968236045760017182272244210822162169787026396322773165192567887238575971635413521445809876980004e6),
+        K(-4.8794244314757594930125129712472496055896630924509326926769483634245544755261389240465702901747116533723557473550656594631532836e8),
+        K(4.7135622802198833573595004986499079081107263879749738524409185091193774357674279922423541892450668395500169866908527469556459572e10),
+        K(-3.8845767816711551934241716931447885535253872729659980739269139137736111723828410537289978592243029663663867611966517996124536087e12),
+        K(2.7431597072135274612373797235764178284960675893163510470039767771950309546569261187500692221566731027281621740913265115102310496e14),
+        K(-1.6636598713596741944604248189852920881501346018142892635481495198437840156774926185383215014490693563834394957950230048940030269e16),
+        K(8.6761557906756247348638118281136603405500414721831534457612925481123322024593371759387146931591096846424375193986594474897877506e17),
+        K(-3.8913176955569588730031997156307239438827348326480575220510931691527300070325174335141194550785118636626722266446637917200705305e19),
+        K(1.4994387859623891999511364539836016709264090275867767459706869909005029610415881414010795232967045454552995180823348444416265002e21),
+        K(-4.9526316726474597668971927656830715565011030190318549395742059758921820863775022631233335917983607537011812481817492614325105297e22),
+        K(1.397064884652902423392749086230445982786614531772675459975976690233879103001760917728872951577136897092365891622780984709402973e24),
+        K(-3.3476761876177350335523912452608780785827233458182277101687250287742574272022970793769978972224508627617386323901820464201569753e25),
+        K(6.7638961792609295046405395451813410863531398189017078811550463864945380021979484321848645213471320221939039055909450745691397385e26),
+        K(-1.14079573340166931747184530752445311008079545441036388481953511060965509254548158980345036081716115934507061629230171580151953e28),
+        K(1.5843626737066263794105803441416923917274696837109592895480698389316466299714783209728565162325083868829306539854083641550288868e29),
+        K(-1.7782859979199278216778586806675418350823245944594339589914373884037721073371915283109990177929377444043444423433544695887093251e30),
+        K(1.5708853802374339215889671052352242220779637148891880270680676413885516142759102997242314905431899904918009952268613041942043472e31),
+        K(-1.0500350399986598062815891870047338843859846801171623906896291522399576189691430301012749176131933567692272239383081900006983104e32),
+        K(4.9857172763962740855781912335959709090990833630483482545791462951647915758552039690361109105750366582497609235282417166004295666e32),
+        K(-1.4964974779697884725668300877703598873484331649647945507167852672912478283006052834187237212505395652815341504129608210970635177e33),
+        K(2.1318910685882714113074231521717786024327977165170135019860427349218908241618243742167588675566067235117191319364522120898974407e33),
     };
     static const R Q2[] =
     {
-      K(328.4489907350967829456654595549647170421869780143590268003242948),
-      K(-615.575319575198219705670766725559477112082560070865403723416427),
-      K(512.563661235514015228169012911053008163272899480360140632585558),
-      K(-377.3415411557897134242242685951784724031156711312221525972796826),
-      K(247.6887960380354072297631204916926385047383091206925653242453925),
-      K(-144.7079367047916629699737294050207521413589574809430211064537016),
-      K(75.5300501439366128901130531145623549019791219037305096822646727),
-      K(-35.1562871183824787711155827433330019401972267325168728838283815),
-      K(14.5900995053625141158588399870084373879991873744753473985888771),
-      K(-5.3793167684795558315535956122846115342243771791771104555817078),
-      K(1.7551860916884001665224751521627837644140913167505738803593836),
-      K(-0.5034275191915128601243198185547065251560284487106213345738464),
-      K(0.1258761177781805904401665597080296597844219207555140252667602),
-      K(-0.0271165711067811527517031577204913417520417117202287079370524),
-      K(0.0049566968097755025323253093106955508273120444565853663949773),
-      K(-0.0007529042621964042565348473109633952383792675486716081916002),
-      K(0.0000923845012025941529926888028246088283227759969619552077927),
-      K(-8.7971061636613823628316954758674029940675792754742342069e-6),
-      K(6.136252042100256280345626781919643641626278378156829218e-7),
-      K(-2.87514497545628209951433938237642236070094379906239019e-8),
-      K(7.99982739755782677965258184972152681716223485333226e-10),
-      K(-1.12250050360331111260828032356887810736651792918878e-11),
-      K(6.221827386743849038481605158298006999161167883e-14),
-      K(-8.0950402455773560717067392049638116407074069e-17)
+        K(1.0),
     };
   #elif LDBL_MANT_DIG == 64
     /* long double 96 bit wide */
@@ -351,15 +308,24 @@ R Y(bessel_i0)(R x)
   if (x == K(0.0))
     return K(1.0);
 
+#if defined(NFFT_LDOUBLE) && LDBL_MANT_DIG > 64
+  if (x <= K(25.0))
+  {
+    R y = (x / K(2.0));
+    y = y * y;
+
+    return (K(1.0) + y * evaluate_polynomial(N1, P1, y));
+  }
+  else
+  {
+    return (EXP(x) / SQRT(x)) * evaluate_polynomial(N2, P2, 1 / x);
+  }
+#else
   if (x <= K(15.0))
   {
     /* x in (0, 15] */
     const R y = x * x;
-#if defined(NFFT_LDOUBLE) && LDBL_MANT_DIG > 64
-    return evaluate_polynomial(N1, P1, y) / evaluate_polynomial(M1, Q1, y);
-#else
     return evaluate_chebyshev(N1, P1, y) / evaluate_chebyshev(M1, Q1, y);
-#endif
   }
   else
   {
@@ -368,4 +334,5 @@ R Y(bessel_i0)(R x)
     return (EXP(x) / SQRT(x)) * (evaluate_chebyshev(N2, P2, y) /
       evaluate_chebyshev(M2, Q2, y));
   }
+#endif
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/nfft.git



More information about the debian-science-commits mailing list