125c28e8Piotr Jasiukajtis/*
225c28e8Piotr Jasiukajtis * CDDL HEADER START
325c28e8Piotr Jasiukajtis *
425c28e8Piotr Jasiukajtis * The contents of this file are subject to the terms of the
525c28e8Piotr Jasiukajtis * Common Development and Distribution License (the "License").
625c28e8Piotr Jasiukajtis * You may not use this file except in compliance with the License.
725c28e8Piotr Jasiukajtis *
825c28e8Piotr Jasiukajtis * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
925c28e8Piotr Jasiukajtis * or http://www.opensolaris.org/os/licensing.
1025c28e8Piotr Jasiukajtis * See the License for the specific language governing permissions
1125c28e8Piotr Jasiukajtis * and limitations under the License.
1225c28e8Piotr Jasiukajtis *
1325c28e8Piotr Jasiukajtis * When distributing Covered Code, include this CDDL HEADER in each
1425c28e8Piotr Jasiukajtis * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1525c28e8Piotr Jasiukajtis * If applicable, add the following below this CDDL HEADER, with the
1625c28e8Piotr Jasiukajtis * fields enclosed by brackets "[]" replaced with your own identifying
1725c28e8Piotr Jasiukajtis * information: Portions Copyright [yyyy] [name of copyright owner]
1825c28e8Piotr Jasiukajtis *
1925c28e8Piotr Jasiukajtis * CDDL HEADER END
2025c28e8Piotr Jasiukajtis */
2125c28e8Piotr Jasiukajtis/*
2225c28e8Piotr Jasiukajtis * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
2325c28e8Piotr Jasiukajtis */
2425c28e8Piotr Jasiukajtis/*
2525c28e8Piotr Jasiukajtis * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
2625c28e8Piotr Jasiukajtis * Use is subject to license terms.
2725c28e8Piotr Jasiukajtis */
2825c28e8Piotr Jasiukajtis
2925c28e8Piotr Jasiukajtis/*
3025c28e8Piotr Jasiukajtis * __vexp: double precision vector exp
3125c28e8Piotr Jasiukajtis *
3225c28e8Piotr Jasiukajtis * Algorithm:
3325c28e8Piotr Jasiukajtis *
3425c28e8Piotr Jasiukajtis * Write x = (k + j/256)ln2 + r, where k and j are integers, j >= 0,
3525c28e8Piotr Jasiukajtis * and |r| <= ln2/512.  Then exp(x) = 2^k * 2^(j/256) * exp(r).
3625c28e8Piotr Jasiukajtis * Compute exp(r) by a polynomial approximation exp(r) ~ 1 + p(r)
3725c28e8Piotr Jasiukajtis * where p(r) := r*(1+r*(B1+r*(B2+r*B3))).  From a table, obtain
3825c28e8Piotr Jasiukajtis * h and l such that h ~ 2^(j/256) to double precision and h+l
3925c28e8Piotr Jasiukajtis * ~ 2^(j/256) to well more than double precision.  Then exp(x)
4025c28e8Piotr Jasiukajtis * ~ 2^k * (h + (l + h * p(r))) to about double precision.  Note
4125c28e8Piotr Jasiukajtis * that the multiplication by 2^k requires some finagling when
4225c28e8Piotr Jasiukajtis * the result might be subnormal.
4325c28e8Piotr Jasiukajtis *
4425c28e8Piotr Jasiukajtis * Accuracy:
4525c28e8Piotr Jasiukajtis *
4625c28e8Piotr Jasiukajtis * For normal results, the largest error observed is less than
4725c28e8Piotr Jasiukajtis * 0.6 ulps.  For subnormal results, the largest error observed
4825c28e8Piotr Jasiukajtis * is 0.737 ulps.
4925c28e8Piotr Jasiukajtis */
5025c28e8Piotr Jasiukajtis
5125c28e8Piotr Jasiukajtis#include <sys/isa_defs.h>
5225c28e8Piotr Jasiukajtis
5325c28e8Piotr Jasiukajtis#ifdef _LITTLE_ENDIAN
5425c28e8Piotr Jasiukajtis#define	HI(x)	*(1+(int *)&x)
5525c28e8Piotr Jasiukajtis#define	LO(x)	*(unsigned *)&x
5625c28e8Piotr Jasiukajtis#define	DBLWORD(x, y)	y, x
5725c28e8Piotr Jasiukajtis#else
5825c28e8Piotr Jasiukajtis#define	HI(x)	*(int *)&x
5925c28e8Piotr Jasiukajtis#define	LO(x)	*(1+(unsigned *)&x)
6025c28e8Piotr Jasiukajtis#define	DBLWORD(x, y)	x, y
6125c28e8Piotr Jasiukajtis#endif
6225c28e8Piotr Jasiukajtis
6325c28e8Piotr Jasiukajtis#ifdef __RESTRICT
6425c28e8Piotr Jasiukajtis#define	restrict _Restrict
6525c28e8Piotr Jasiukajtis#else
6625c28e8Piotr Jasiukajtis#define	restrict
6725c28e8Piotr Jasiukajtis#endif
6825c28e8Piotr Jasiukajtis
6925c28e8Piotr Jasiukajtisstatic const double TBL[] = {
7025c28e8Piotr Jasiukajtis	1.00000000000000000000e+00,  0.00000000000000000000e+00,
7125c28e8Piotr Jasiukajtis	1.00271127505020252180e+00, -3.63661592869226394432e-17,
7225c28e8Piotr Jasiukajtis	1.00542990111280272636e+00,  9.49918653545503175702e-17,
7325c28e8Piotr Jasiukajtis	1.00815589811841754830e+00, -3.25205875608430806089e-17,
7425c28e8Piotr Jasiukajtis	1.01088928605170047526e+00, -1.52347786033685771763e-17,
7525c28e8Piotr Jasiukajtis	1.01363008495148942956e+00,  9.28359976818356758749e-18,
7625c28e8Piotr Jasiukajtis	1.01637831491095309566e+00, -5.77217007319966002766e-17,
7725c28e8Piotr Jasiukajtis	1.01913399607773791367e+00,  3.60190498225966110587e-17,
7825c28e8Piotr Jasiukajtis	1.02189714865411662714e+00,  5.10922502897344389359e-17,
7925c28e8Piotr Jasiukajtis	1.02466779289713572076e+00, -7.56160786848777820704e-17,
8025c28e8Piotr Jasiukajtis	1.02744594911876374610e+00, -4.95607417464536982418e-17,
8125c28e8Piotr Jasiukajtis	1.03023163768604097967e+00,  3.31983004108081294377e-17,
8225c28e8Piotr Jasiukajtis	1.03302487902122841490e+00,  7.60083887402708848935e-18,
8325c28e8Piotr Jasiukajtis	1.03582569360195719810e+00, -7.80678239133763616702e-17,
8425c28e8Piotr Jasiukajtis	1.03863410196137873065e+00,  5.99627378885251061843e-17,
8525c28e8Piotr Jasiukajtis	1.04145012468831610342e+00,  3.78483048028757620966e-17,
8625c28e8Piotr Jasiukajtis	1.04427378242741375480e+00,  8.55188970553796365958e-17,
8725c28e8Piotr Jasiukajtis	1.04710509587928979336e+00,  7.27707724310431474861e-17,
8825c28e8Piotr Jasiukajtis	1.04994408580068721015e+00,  5.59293784812700258637e-17,
8925c28e8Piotr Jasiukajtis	1.05279077300462642341e+00, -9.62948289902693573942e-17,
9025c28e8Piotr Jasiukajtis	1.05564517836055715705e+00,  1.75932573877209198414e-18,
9125c28e8Piotr Jasiukajtis	1.05850732279451276163e+00, -7.15265185663778073796e-17,
9225c28e8Piotr Jasiukajtis	1.06137722728926209292e+00, -1.19735370853656575649e-17,
9325c28e8Piotr Jasiukajtis	1.06425491288446449900e+00,  5.07875419861123039357e-17,
9425c28e8Piotr Jasiukajtis	1.06714040067682369717e+00, -7.89985396684158212226e-17,
9525c28e8Piotr Jasiukajtis	1.07003371182024187291e+00, -9.93716271128891938112e-17,
9625c28e8Piotr Jasiukajtis	1.07293486752597555522e+00, -3.83966884335882380671e-18,
9725c28e8Piotr Jasiukajtis	1.07584388906279104781e+00, -1.00027161511441361125e-17,
9825c28e8Piotr Jasiukajtis	1.07876079775711986031e+00, -6.65666043605659260344e-17,
9925c28e8Piotr Jasiukajtis	1.08168561499321524977e+00, -4.78262390299708626556e-17,
10025c28e8Piotr Jasiukajtis	1.08461836221330920615e+00,  3.16615284581634611576e-17,
10125c28e8Piotr Jasiukajtis	1.08755906091776965994e+00,  5.40934930782029075923e-18,
10225c28e8Piotr Jasiukajtis	1.09050773266525768967e+00, -3.04678207981247114697e-17,
10325c28e8Piotr Jasiukajtis	1.09346439907288583981e+00,  1.44139581472692093420e-17,
10425c28e8Piotr Jasiukajtis	1.09642908181637688259e+00, -5.91993348444931582405e-17,
10525c28e8Piotr Jasiukajtis	1.09940180263022191376e+00,  7.17045959970192322483e-17,
10625c28e8Piotr Jasiukajtis	1.10238258330784089090e+00,  5.26603687157069438656e-17,
10725c28e8Piotr Jasiukajtis	1.10537144570174117320e+00,  8.23928876050021358995e-17,
10825c28e8Piotr Jasiukajtis	1.10836841172367872588e+00, -8.78681384518052661558e-17,
10925c28e8Piotr Jasiukajtis	1.11137350334481754821e+00,  5.56394502666969764311e-17,
11025c28e8Piotr Jasiukajtis	1.11438674259589243221e+00,  1.04102784568455709549e-16,
11125c28e8Piotr Jasiukajtis	1.11740815156736927882e+00, -7.97680590262822045601e-17,
11225c28e8Piotr Jasiukajtis	1.12043775240960674644e+00, -6.20108590655417874998e-17,
11325c28e8Piotr Jasiukajtis	1.12347556733301989773e+00, -9.69973758898704299544e-17,
11425c28e8Piotr Jasiukajtis	1.12652161860824184814e+00,  5.16585675879545612073e-17,
11525c28e8Piotr Jasiukajtis	1.12957592856628807887e+00,  6.71280585872625658758e-17,
11625c28e8Piotr Jasiukajtis	1.13263851959871919561e+00,  3.23735616673800026374e-17,
11725c28e8Piotr Jasiukajtis	1.13570941415780546357e+00,  5.06659992612615524241e-17,
11825c28e8Piotr Jasiukajtis	1.13878863475669156458e+00,  8.91281267602540777782e-17,
11925c28e8Piotr Jasiukajtis	1.14187620396956157620e+00,  4.65109117753141238741e-17,
12025c28e8Piotr Jasiukajtis	1.14497214443180417298e+00,  4.64128989217001065651e-17,
12125c28e8Piotr Jasiukajtis	1.14807647884017893780e+00,  6.89774023662719177044e-17,
12225c28e8Piotr Jasiukajtis	1.15118922995298267331e+00,  3.25071021886382721198e-17,
12325c28e8Piotr Jasiukajtis	1.15431042059021593538e+00,  1.04171289462732661865e-16,
12425c28e8Piotr Jasiukajtis	1.15744007363375112085e+00, -9.12387123113440028710e-17,
12525c28e8Piotr Jasiukajtis	1.16057821202749877898e+00, -3.26104020541739310553e-17,
12625c28e8Piotr Jasiukajtis	1.16372485877757747552e+00,  3.82920483692409349872e-17,
12725c28e8Piotr Jasiukajtis	1.16688003695248165847e+00, -8.79187957999916974198e-17,
12825c28e8Piotr Jasiukajtis	1.17004376968325018993e+00, -1.84774420179000469438e-18,
12925c28e8Piotr Jasiukajtis	1.17321608016363732041e+00, -7.28756258658499447915e-17,
13025c28e8Piotr Jasiukajtis	1.17639699165028122074e+00,  5.55420325421807896277e-17,
13125c28e8Piotr Jasiukajtis	1.17958652746287584456e+00,  1.00923127751003904354e-16,
13225c28e8Piotr Jasiukajtis	1.18278471098434101449e+00,  1.54297543007907605845e-17,
13325c28e8Piotr Jasiukajtis	1.18599156566099384058e+00, -9.20950683529310590495e-18,
13425c28e8Piotr Jasiukajtis	1.18920711500272102690e+00,  3.98201523146564611098e-17,
13525c28e8Piotr Jasiukajtis	1.19243138258315117817e+00,  4.39755141560972082715e-17,
13625c28e8Piotr Jasiukajtis	1.19566439203982732842e+00,  4.61660367048148139743e-17,
13725c28e8Piotr Jasiukajtis	1.19890616707438057986e+00, -9.80919335600842311848e-17,
13825c28e8Piotr Jasiukajtis	1.20215673145270307565e+00,  6.64498149925230124489e-17,
13925c28e8Piotr Jasiukajtis	1.20541610900512385918e+00, -3.35727219326752963448e-17,
14025c28e8Piotr Jasiukajtis	1.20868432362658162482e+00, -4.74672594522898409739e-17,
14125c28e8Piotr Jasiukajtis	1.21196139927680124337e+00, -4.89061107752111835732e-17,
14225c28e8Piotr Jasiukajtis	1.21524735998046895524e+00, -7.71263069268148813091e-17,
14325c28e8Piotr Jasiukajtis	1.21854222982740845183e+00, -9.00672695836383767487e-17,
14425c28e8Piotr Jasiukajtis	1.22184603297275762301e+00, -1.06110212114026911612e-16,
14525c28e8Piotr Jasiukajtis	1.22515879363714552674e+00, -8.90353381426998342947e-17,
14625c28e8Piotr Jasiukajtis	1.22848053610687002468e+00, -1.89878163130252995312e-17,
14725c28e8Piotr Jasiukajtis	1.23181128473407586199e+00,  7.38938247161005024655e-17,
14825c28e8Piotr Jasiukajtis	1.23515106393693341325e+00, -1.07552443443078413783e-16,
14925c28e8Piotr Jasiukajtis	1.23849989819981654016e+00,  2.76770205557396742995e-17,
15025c28e8Piotr Jasiukajtis	1.24185781207348400201e+00,  4.65802759183693679123e-17,
15125c28e8Piotr Jasiukajtis	1.24522483017525797955e+00, -4.67724044984672750044e-17,
15225c28e8Piotr Jasiukajtis	1.24860097718920481924e+00, -8.26181099902196355046e-17,
15325c28e8Piotr Jasiukajtis	1.25198627786631622172e+00,  4.83416715246989759959e-17,
15425c28e8Piotr Jasiukajtis	1.25538075702469109629e+00, -6.71138982129687841853e-18,
15525c28e8Piotr Jasiukajtis	1.25878443954971652730e+00, -8.42178258773059935677e-17,
15625c28e8Piotr Jasiukajtis	1.26219735039425073886e+00, -3.08446488747384584900e-17,
15725c28e8Piotr Jasiukajtis	1.26561951457880628169e+00,  4.25057700345086802072e-17,
15825c28e8Piotr Jasiukajtis	1.26905095719173321989e+00,  2.66793213134218609523e-18,
15925c28e8Piotr Jasiukajtis	1.27249170338940276181e+00, -1.05779162672124210291e-17,
16025c28e8Piotr Jasiukajtis	1.27594177839639200123e+00,  9.91543024421429032951e-17,
16125c28e8Piotr Jasiukajtis	1.27940120750566932450e+00, -9.75909500835606221035e-17,
16225c28e8Piotr Jasiukajtis	1.28287001607877826359e+00,  1.71359491824356096814e-17,
16325c28e8Piotr Jasiukajtis	1.28634822954602556777e+00, -3.41695570693618197638e-17,
16425c28e8Piotr Jasiukajtis	1.28983587340666572274e+00,  8.94925753089759172195e-17,
16525c28e8Piotr Jasiukajtis	1.29333297322908946647e+00, -2.97459044313275164581e-17,
16625c28e8Piotr Jasiukajtis	1.29683955465100964055e+00,  2.53825027948883149593e-17,
16725c28e8Piotr Jasiukajtis	1.30035564337965059423e+00,  5.67872810280221742200e-17,
16825c28e8Piotr Jasiukajtis	1.30388126519193581210e+00,  8.64767559826787117946e-17,
16925c28e8Piotr Jasiukajtis	1.30741644593467731816e+00, -7.33664565287886889230e-17,
17025c28e8Piotr Jasiukajtis	1.31096121152476441374e+00, -7.18153613551945385697e-17,
17125c28e8Piotr Jasiukajtis	1.31451558794935463581e+00,  2.26754331510458564505e-17,
17225c28e8Piotr Jasiukajtis	1.31807960126606404927e+00, -5.45795582714915288619e-17,
17325c28e8Piotr Jasiukajtis	1.32165327760315753913e+00, -2.48063824591302174150e-17,
17425c28e8Piotr Jasiukajtis	1.32523664315974132322e+00, -2.85873121003886075697e-17,
17525c28e8Piotr Jasiukajtis	1.32882972420595435459e+00,  4.08908622391016005195e-17,
17625c28e8Piotr Jasiukajtis	1.33243254708316150037e+00, -5.10158663091674334319e-17,
17725c28e8Piotr Jasiukajtis	1.33604513820414583236e+00, -5.89186635638880135250e-17,
17825c28e8Piotr Jasiukajtis	1.33966752405330291609e+00,  8.92728259483173198426e-17,
17925c28e8Piotr Jasiukajtis	1.34329973118683532185e+00, -5.80258089020143775130e-17,
18025c28e8Piotr Jasiukajtis	1.34694178623294580355e+00,  3.22406510125467916913e-17,
18125c28e8Piotr Jasiukajtis	1.35059371589203447428e+00, -8.28711038146241653260e-17,
18225c28e8Piotr Jasiukajtis	1.35425554693689265129e+00,  7.70094837980298946162e-17,
18325c28e8Piotr Jasiukajtis	1.35792730621290114179e+00, -9.52963574482518886709e-17,
18425c28e8Piotr Jasiukajtis	1.36160902063822475405e+00,  1.53378766127066804593e-18,
18525c28e8Piotr Jasiukajtis	1.36530071720401191548e+00, -1.00053631259747639350e-16,
18625c28e8Piotr Jasiukajtis	1.36900242297459051599e+00,  9.59379791911884877256e-17,
18725c28e8Piotr Jasiukajtis	1.37271416508766841424e+00, -4.49596059523484126201e-17,
18825c28e8Piotr Jasiukajtis	1.37643597075453016920e+00, -6.89858893587180104162e-17,
18925c28e8Piotr Jasiukajtis	1.38016786726023799048e+00,  1.05103145799699839462e-16,
19025c28e8Piotr Jasiukajtis	1.38390988196383202258e+00, -6.77051165879478628716e-17,
19125c28e8Piotr Jasiukajtis	1.38766204229852907481e+00,  8.42298427487541531762e-17,
19225c28e8Piotr Jasiukajtis	1.39142437577192623621e+00, -4.90617486528898870821e-17,
19325c28e8Piotr Jasiukajtis	1.39519690996620027157e+00, -9.32933622422549531960e-17,
19425c28e8Piotr Jasiukajtis	1.39897967253831123635e+00, -9.61421320905132307233e-17,
19525c28e8Piotr Jasiukajtis	1.40277269122020475933e+00, -5.29578324940798922316e-17,
19625c28e8Piotr Jasiukajtis	1.40657599381901543545e+00,  7.03491481213642218800e-18,
19725c28e8Piotr Jasiukajtis	1.41038960821727066275e+00,  4.16654872843506164270e-17,
19825c28e8Piotr Jasiukajtis	1.41421356237309514547e+00, -9.66729331345291345105e-17,
19925c28e8Piotr Jasiukajtis	1.41804788432041517510e+00,  2.27443854218552945230e-17,
20025c28e8Piotr Jasiukajtis	1.42189260216916557589e+00, -1.60778289158902441338e-17,
20125c28e8Piotr Jasiukajtis	1.42574774410549420800e+00,  9.88069075850060728430e-17,
20225c28e8Piotr Jasiukajtis	1.42961333839197002327e+00, -1.20316424890536551792e-17,
20325c28e8Piotr Jasiukajtis	1.43348941336778890054e+00, -5.80245424392682610310e-17,
20425c28e8Piotr Jasiukajtis	1.43737599744898236764e+00, -4.20403401646755661225e-17,
20525c28e8Piotr Jasiukajtis	1.44127311912862565713e+00,  5.60250365087898567501e-18,
20625c28e8Piotr Jasiukajtis	1.44518080697704665027e+00, -3.02375813499398731940e-17,
20725c28e8Piotr Jasiukajtis	1.44909908964203504311e+00, -6.25940500081930925441e-17,
20825c28e8Piotr Jasiukajtis	1.45302799584905262265e+00, -5.77994860939610610226e-17,
20925c28e8Piotr Jasiukajtis	1.45696755440144376514e+00,  5.64867945387699814049e-17,
21025c28e8Piotr Jasiukajtis	1.46091779418064704466e+00, -5.60037718607521580013e-17,
21125c28e8Piotr Jasiukajtis	1.46487874414640573129e+00,  9.53076754358715731900e-17,
21225c28e8Piotr Jasiukajtis	1.46885043333698184220e+00,  8.46588275653362637570e-17,
21325c28e8Piotr Jasiukajtis	1.47283289086936752810e+00,  6.69177408194058937165e-17,
21425c28e8Piotr Jasiukajtis	1.47682614593949934623e+00, -3.48399455689279579579e-17,
21525c28e8Piotr Jasiukajtis	1.48083022782247186733e+00, -9.68695210263061857841e-17,
21625c28e8Piotr Jasiukajtis	1.48484516587275239274e+00,  1.07800867644074807559e-16,
21725c28e8Piotr Jasiukajtis	1.48887098952439700383e+00,  6.15536715774287133031e-17,
21825c28e8Piotr Jasiukajtis	1.49290772829126483501e+00,  1.41929201542840357707e-17,
21925c28e8Piotr Jasiukajtis	1.49695541176723545540e+00, -2.86166325389915821109e-17,
22025c28e8Piotr Jasiukajtis	1.50101406962642558440e+00, -6.41376727579023503859e-17,
22125c28e8Piotr Jasiukajtis	1.50508373162340647333e+00,  7.07471061358284636429e-17,
22225c28e8Piotr Jasiukajtis	1.50916442759342284141e+00, -1.01645532775429503911e-16,
22325c28e8Piotr Jasiukajtis	1.51325618745260981335e+00,  8.88449785133871209093e-17,
22425c28e8Piotr Jasiukajtis	1.51735904119821474190e+00, -4.30869947204334080070e-17,
22525c28e8Piotr Jasiukajtis	1.52147301890881458952e+00, -5.99638767594568341985e-18,
22625c28e8Piotr Jasiukajtis	1.52559815074453819506e+00,  1.11795187801605698722e-16,
22725c28e8Piotr Jasiukajtis	1.52973446694728698603e+00,  3.78579211515721903683e-17,
22825c28e8Piotr Jasiukajtis	1.53388199784095591305e+00,  8.87522684443844614135e-17,
22925c28e8Piotr Jasiukajtis	1.53804077383165682669e+00,  1.01746723511613580618e-16,
23025c28e8Piotr Jasiukajtis	1.54221082540794074411e+00,  7.94983480969762085616e-17,
23125c28e8Piotr Jasiukajtis	1.54639218314102144802e+00,  1.06839600056572198028e-16,
23225c28e8Piotr Jasiukajtis	1.55058487768499997372e+00, -1.46007065906893851791e-17,
23325c28e8Piotr Jasiukajtis	1.55478893977708865215e+00, -8.00316135011603564104e-17,
23425c28e8Piotr Jasiukajtis	1.55900440023783692922e+00,  3.78120705335752750188e-17,
23525c28e8Piotr Jasiukajtis	1.56323128997135762930e+00,  7.48477764559073438896e-17,
23625c28e8Piotr Jasiukajtis	1.56746963996555299659e+00, -1.03520617688497219883e-16,
23725c28e8Piotr Jasiukajtis	1.57171948129234140268e+00, -3.34298400468720006928e-17,
23825c28e8Piotr Jasiukajtis	1.57598084510788649659e+00, -1.01369164712783039808e-17,
23925c28e8Piotr Jasiukajtis	1.58025376265282457844e+00, -5.16340292955446806159e-17,
24025c28e8Piotr Jasiukajtis	1.58453826525249374946e+00, -1.93377170345857029304e-17,
24125c28e8Piotr Jasiukajtis	1.58883438431716395023e+00, -5.99495011882447940052e-18,
24225c28e8Piotr Jasiukajtis	1.59314215134226699888e+00, -1.00944065423119624890e-16,
24325c28e8Piotr Jasiukajtis	1.59746159790862707339e+00,  2.48683927962209992069e-17,
24425c28e8Piotr Jasiukajtis	1.60179275568269341434e+00, -6.05491745352778434252e-17,
24525c28e8Piotr Jasiukajtis	1.60613565641677102924e+00, -1.03545452880599952591e-16,
24625c28e8Piotr Jasiukajtis	1.61049033194925428347e+00,  2.47071925697978878522e-17,
24725c28e8Piotr Jasiukajtis	1.61485681420486071325e+00, -7.31666339912512326264e-17,
24825c28e8Piotr Jasiukajtis	1.61923513519486372836e+00,  2.09413341542290924068e-17,
24925c28e8Piotr Jasiukajtis	1.62362532701732886764e+00, -3.58451285141447470996e-17,
25025c28e8Piotr Jasiukajtis	1.62802742185734783398e+00, -6.71295508470708408630e-17,
25125c28e8Piotr Jasiukajtis	1.63244145198727497181e+00,  9.85281923042999296414e-17,
25225c28e8Piotr Jasiukajtis	1.63686744976696441078e+00,  7.69832507131987557450e-17,
25325c28e8Piotr Jasiukajtis	1.64130544764400632118e+00, -9.24756873764070550805e-17,
25425c28e8Piotr Jasiukajtis	1.64575547815396494578e+00, -1.01256799136747726038e-16,
25525c28e8Piotr Jasiukajtis	1.65021757392061774183e+00,  9.13327958872990419009e-18,
25625c28e8Piotr Jasiukajtis	1.65469176765619430114e+00,  9.64329430319602742879e-17,
25725c28e8Piotr Jasiukajtis	1.65917809216161615815e+00, -7.27554555082304942180e-17,
25825c28e8Piotr Jasiukajtis	1.66367658032673637614e+00,  5.89099269671309967045e-17,
25925c28e8Piotr Jasiukajtis	1.66818726513058246397e+00,  4.26917801957061447430e-17,
26025c28e8Piotr Jasiukajtis	1.67271017964159662839e+00, -5.47671596459956307616e-17,
26125c28e8Piotr Jasiukajtis	1.67724535701787846875e+00,  8.30394950995073155275e-17,
26225c28e8Piotr Jasiukajtis	1.68179283050742900407e+00,  8.19901002058149652013e-17,
26325c28e8Piotr Jasiukajtis	1.68635263344839336774e+00, -7.18146327835800944212e-17,
26425c28e8Piotr Jasiukajtis	1.69092479926930527867e+00, -9.66967147439488016590e-17,
26525c28e8Piotr Jasiukajtis	1.69550936148933262260e+00,  7.23841687284516664081e-17,
26625c28e8Piotr Jasiukajtis	1.70010635371852347753e+00, -8.02371937039770024589e-18,
26725c28e8Piotr Jasiukajtis	1.70471580965805125096e+00, -2.72888328479728156257e-17,
26825c28e8Piotr Jasiukajtis	1.70933776310046292579e+00, -9.86877945663293107628e-17,
26925c28e8Piotr Jasiukajtis	1.71397224792992597386e+00,  6.47397510775336706412e-17,
27025c28e8Piotr Jasiukajtis	1.71861929812247793414e+00, -1.85138041826311098821e-17,
27125c28e8Piotr Jasiukajtis	1.72327894774627399244e+00, -9.52212380039379996275e-17,
27225c28e8Piotr Jasiukajtis	1.72795123096183766975e+00, -1.07509818612046424459e-16,
27325c28e8Piotr Jasiukajtis	1.73263618202231106658e+00, -1.69805107431541549407e-18,
27425c28e8Piotr Jasiukajtis	1.73733383527370621735e+00,  3.16438929929295694659e-17,
27525c28e8Piotr Jasiukajtis	1.74204422515515644498e+00, -1.52595911895078879236e-18,
27625c28e8Piotr Jasiukajtis	1.74676738619916904760e+00, -1.07522904835075145042e-16,
27725c28e8Piotr Jasiukajtis	1.75150335303187820735e+00, -5.12445042059672465939e-17,
27825c28e8Piotr Jasiukajtis	1.75625216037329945351e+00,  2.96014069544887330703e-17,
27925c28e8Piotr Jasiukajtis	1.76101384303758390359e+00, -7.94325312503922771057e-17,
28025c28e8Piotr Jasiukajtis	1.76578843593327272643e+00,  9.46131501808326786660e-17,
28125c28e8Piotr Jasiukajtis	1.77057597406355471392e+00,  5.96179451004055584767e-17,
28225c28e8Piotr Jasiukajtis	1.77537649252652118825e+00,  6.42973179655657203396e-17,
28325c28e8Piotr Jasiukajtis	1.78019002651542446181e+00, -5.28462728909161736517e-17,
28425c28e8Piotr Jasiukajtis	1.78501661131893496481e+00,  1.53304001210313138184e-17,
28525c28e8Piotr Jasiukajtis	1.78985628232140103755e+00, -4.15435466068334977098e-17,
28625c28e8Piotr Jasiukajtis	1.79470907500310716820e+00,  1.82274584279120867698e-17,
28725c28e8Piotr Jasiukajtis	1.79957502494053511732e+00, -2.52688923335889795224e-17,
28825c28e8Piotr Jasiukajtis	1.80445416780662393208e+00, -5.17722240879331788328e-17,
28925c28e8Piotr Jasiukajtis	1.80934653937103195886e+00, -9.03264140245002968190e-17,
29025c28e8Piotr Jasiukajtis	1.81425217550039885595e+00, -9.96953153892034881983e-17,
29125c28e8Piotr Jasiukajtis	1.81917111215860849427e+00,  7.40267690114583888997e-17,
29225c28e8Piotr Jasiukajtis	1.82410338540705341259e+00, -1.01596278622770830650e-16,
29325c28e8Piotr Jasiukajtis	1.82904903140489727420e+00,  6.88919290883569563697e-17,
29425c28e8Piotr Jasiukajtis	1.83400808640934243066e+00,  3.28310722424562658722e-17,
29525c28e8Piotr Jasiukajtis	1.83898058677589371079e+00,  6.91896974027251194233e-18,
29625c28e8Piotr Jasiukajtis	1.84396656895862598446e+00, -5.93974202694996455028e-17,
29725c28e8Piotr Jasiukajtis	1.84896606951045083811e+00,  9.02758044626108928816e-17,
29825c28e8Piotr Jasiukajtis	1.85397912508338547077e+00,  9.76188749072759353840e-17,
29925c28e8Piotr Jasiukajtis	1.85900577242882047990e+00, -9.52870546198994068663e-17,
30025c28e8Piotr Jasiukajtis	1.86404604839778897940e+00,  6.54091268062057047791e-17,
30125c28e8Piotr Jasiukajtis	1.86909998994123860427e+00, -9.93850521425506708290e-17,
30225c28e8Piotr Jasiukajtis	1.87416763411029996256e+00, -6.12276341300414256164e-17,
30325c28e8Piotr Jasiukajtis	1.87924901805656019427e+00, -1.62263155578358447799e-17,
30425c28e8Piotr Jasiukajtis	1.88434417903233453195e+00, -8.22659312553371090551e-17,
30525c28e8Piotr Jasiukajtis	1.88945315439093919352e+00, -9.00516828505912548531e-17,
30625c28e8Piotr Jasiukajtis	1.89457598158696560731e+00,  3.40340353521652967060e-17,
30725c28e8Piotr Jasiukajtis	1.89971269817655530332e+00, -3.85973976937851370678e-17,
30825c28e8Piotr Jasiukajtis	1.90486334181767413831e+00,  6.53385751471827862895e-17,
30925c28e8Piotr Jasiukajtis	1.91002795027038985154e+00, -5.90968800674406023686e-17,
31025c28e8Piotr Jasiukajtis	1.91520656139714740007e+00, -1.06199460561959626376e-16,
31125c28e8Piotr Jasiukajtis	1.92039921316304740273e+00,  7.11668154063031418621e-17,
31225c28e8Piotr Jasiukajtis	1.92560594363612502811e+00, -9.91496376969374092749e-17,
31325c28e8Piotr Jasiukajtis	1.93082679098762710623e+00,  6.16714970616910955284e-17,
31425c28e8Piotr Jasiukajtis	1.93606179349229434727e+00,  1.03323859606763257448e-16,
31525c28e8Piotr Jasiukajtis	1.94131098952864045160e+00, -6.63802989162148798984e-17,
31625c28e8Piotr Jasiukajtis	1.94657441757923321823e+00,  6.81102234953387718436e-17,
31725c28e8Piotr Jasiukajtis	1.95185211623097831790e+00, -2.19901696997935108603e-17,
31825c28e8Piotr Jasiukajtis	1.95714412417540017941e+00,  8.96076779103666776760e-17,
31925c28e8Piotr Jasiukajtis	1.96245048020892731699e+00,  1.09768440009135469493e-16,
32025c28e8Piotr Jasiukajtis	1.96777122323317588126e+00, -1.03149280115311315109e-16,
32125c28e8Piotr Jasiukajtis	1.97310639225523432039e+00, -7.45161786395603748608e-18,
32225c28e8Piotr Jasiukajtis	1.97845602638795092787e+00,  4.03887531092781665750e-17,
32325c28e8Piotr Jasiukajtis	1.98382016485021939189e+00, -2.20345441239106265716e-17,
32425c28e8Piotr Jasiukajtis	1.98919884696726634310e+00,  8.20513263836919941553e-18,
32525c28e8Piotr Jasiukajtis	1.99459211217094023461e+00,  1.79097103520026450854e-17
32625c28e8Piotr Jasiukajtis};
32725c28e8Piotr Jasiukajtis
32825c28e8Piotr Jasiukajtisstatic const union {
32925c28e8Piotr Jasiukajtis	unsigned	i[2];
33025c28e8Piotr Jasiukajtis	double		d;
33125c28e8Piotr Jasiukajtis} C[] = {
33225c28e8Piotr Jasiukajtis	{ DBLWORD(0x43380000, 0x00000000) },
33325c28e8Piotr Jasiukajtis	{ DBLWORD(0x40771547, 0x652b82fe) },
33425c28e8Piotr Jasiukajtis	{ DBLWORD(0x3f662e42, 0xfee00000) },
33525c28e8Piotr Jasiukajtis	{ DBLWORD(0x3d6a39ef, 0x35793c76) },
33625c28e8Piotr Jasiukajtis	{ DBLWORD(0x3ff00000, 0x00000000) },
33725c28e8Piotr Jasiukajtis	{ DBLWORD(0x3fdfffff, 0xfffffff6) },
33825c28e8Piotr Jasiukajtis	{ DBLWORD(0x3fc55555, 0x721a1d14) },
33925c28e8Piotr Jasiukajtis	{ DBLWORD(0x3fa55555, 0x6e0896af) },
34025c28e8Piotr Jasiukajtis	{ DBLWORD(0x01000000, 0x00000000) },
34125c28e8Piotr Jasiukajtis	{ DBLWORD(0x7f000000, 0x00000000) },
34225c28e8Piotr Jasiukajtis	{ DBLWORD(0x40862e42, 0xfefa39ef) },
34325c28e8Piotr Jasiukajtis	{ DBLWORD(0xc0874910, 0xd52d3051) },
34425c28e8Piotr Jasiukajtis	{ DBLWORD(0xfff00000, 0x00000000) },
34525c28e8Piotr Jasiukajtis	{ DBLWORD(0x00000000, 0x00000000) }
34625c28e8Piotr Jasiukajtis};
34725c28e8Piotr Jasiukajtis
34825c28e8Piotr Jasiukajtis#define	round		C[0].d
34925c28e8Piotr Jasiukajtis#define	invln2_256	C[1].d
35025c28e8Piotr Jasiukajtis#define	ln2_256h	C[2].d
35125c28e8Piotr Jasiukajtis#define	ln2_256l	C[3].d
35225c28e8Piotr Jasiukajtis#define	one		C[4].d
35325c28e8Piotr Jasiukajtis#define	B1		C[5].d
35425c28e8Piotr Jasiukajtis#define	B2		C[6].d
35525c28e8Piotr Jasiukajtis#define	B3		C[7].d
35625c28e8Piotr Jasiukajtis#define	tiny		C[8].d
35725c28e8Piotr Jasiukajtis#define	huge		C[9].d
35825c28e8Piotr Jasiukajtis#define	othresh		C[10].d
35925c28e8Piotr Jasiukajtis#define	uthresh		C[11].d
36025c28e8Piotr Jasiukajtis#define	neginf		C[12].d
36125c28e8Piotr Jasiukajtis#define	zero		C[13].d
36225c28e8Piotr Jasiukajtis
36325c28e8Piotr Jasiukajtis#define	PROCESS(N)						\
36425c28e8Piotr Jasiukajtis	y##N = (x##N * invln2_256) + round;			\
36525c28e8Piotr Jasiukajtis	j##N = LO(y##N);					\
36625c28e8Piotr Jasiukajtis	y##N -= round;						\
36725c28e8Piotr Jasiukajtis	k##N = j##N >> 8;					\
36825c28e8Piotr Jasiukajtis	j##N = (j##N & 0xff) << 1;				\
36925c28e8Piotr Jasiukajtis	x##N = (x##N - y##N * ln2_256h) - y##N * ln2_256l;	\
37025c28e8Piotr Jasiukajtis	y##N = x##N * (one + x##N * (B1 + x##N * (B2 + x##N * B3)));	\
37125c28e8Piotr Jasiukajtis	t##N = TBL[j##N];					\
37225c28e8Piotr Jasiukajtis	y##N = t##N + (TBL[j##N + 1] + t##N * y##N);		\
37325c28e8Piotr Jasiukajtis	if (k##N < -1021) {					\
37425c28e8Piotr Jasiukajtis		HI(y##N) += (k##N + 0x3ef) << 20;		\
37525c28e8Piotr Jasiukajtis		y##N *= tiny;					\
37625c28e8Piotr Jasiukajtis	} else {						\
37725c28e8Piotr Jasiukajtis		HI(y##N) += k##N << 20;				\
37825c28e8Piotr Jasiukajtis	}							\
37925c28e8Piotr Jasiukajtis	*y = y##N;						\
38025c28e8Piotr Jasiukajtis	y += stridey
38125c28e8Piotr Jasiukajtis
38225c28e8Piotr Jasiukajtis#define	PREPROCESS(N, index, label)				\
38325c28e8Piotr Jasiukajtis	hx = HI(x[0]);						\
38425c28e8Piotr Jasiukajtis	ix = hx & ~0x80000000;					\
38525c28e8Piotr Jasiukajtis	x##N = *x;						\
38625c28e8Piotr Jasiukajtis	x += stridex;						\
38725c28e8Piotr Jasiukajtis	if (ix >= 0x40862e42) {					\
38825c28e8Piotr Jasiukajtis		if (ix >= 0x7ff00000) { /* x is inf or nan */	\
38925c28e8Piotr Jasiukajtis			y[index] = (x##N == neginf)? zero :	\
39025c28e8Piotr Jasiukajtis			    x##N * x##N;			\
39125c28e8Piotr Jasiukajtis			goto label;				\
39225c28e8Piotr Jasiukajtis		}						\
39325c28e8Piotr Jasiukajtis		if (x##N > othresh) {				\
39425c28e8Piotr Jasiukajtis			y[index] = huge * huge;			\
39525c28e8Piotr Jasiukajtis			goto label;				\
39625c28e8Piotr Jasiukajtis		}						\
39725c28e8Piotr Jasiukajtis		if (x##N < uthresh) {				\
39825c28e8Piotr Jasiukajtis			y[index] = tiny * tiny;			\
39925c28e8Piotr Jasiukajtis			goto label;				\
40025c28e8Piotr Jasiukajtis		}						\
40125c28e8Piotr Jasiukajtis	} else if (ix < 0x3e300000) { /* |x| < 2^-28 */		\
40225c28e8Piotr Jasiukajtis		y[index] = one + x##N;				\
40325c28e8Piotr Jasiukajtis		goto label;					\
40425c28e8Piotr Jasiukajtis	}
40525c28e8Piotr Jasiukajtis
40625c28e8Piotr Jasiukajtisvoid
40725c28e8Piotr Jasiukajtis__vexp(int n, double *restrict x, int stridex, double *restrict y,
40825c28e8Piotr Jasiukajtis    int stridey)
40925c28e8Piotr Jasiukajtis{
41025c28e8Piotr Jasiukajtis	double		x0, x1, x2, x3, x4, x5;
41125c28e8Piotr Jasiukajtis	double		y0, y1, y2, y3, y4, y5;
41225c28e8Piotr Jasiukajtis	double		t0, t1, t2, t3, t4, t5;
41325c28e8Piotr Jasiukajtis	int		k0, k1, k2, k3, k4, k5;
41425c28e8Piotr Jasiukajtis	int		j0, j1, j2, j3, j4, j5;
41525c28e8Piotr Jasiukajtis	int		hx, ix;
41625c28e8Piotr Jasiukajtis
41725c28e8Piotr Jasiukajtis	y -= stridey;
41825c28e8Piotr Jasiukajtis
41925c28e8Piotr Jasiukajtis	for (;;) {
42025c28e8Piotr Jasiukajtisbegin:
42125c28e8Piotr Jasiukajtis		if (--n < 0)
42225c28e8Piotr Jasiukajtis			break;
42325c28e8Piotr Jasiukajtis		y += stridey;
42425c28e8Piotr Jasiukajtis
42525c28e8Piotr Jasiukajtis		PREPROCESS(0, 0, begin);
42625c28e8Piotr Jasiukajtis
42725c28e8Piotr Jasiukajtis		if (--n < 0)
42825c28e8Piotr Jasiukajtis			goto process1;
42925c28e8Piotr Jasiukajtis
43025c28e8Piotr Jasiukajtis		PREPROCESS(1, stridey, process1);
43125c28e8Piotr Jasiukajtis
43225c28e8Piotr Jasiukajtis		if (--n < 0)
43325c28e8Piotr Jasiukajtis			goto process2;
43425c28e8Piotr Jasiukajtis
43525c28e8Piotr Jasiukajtis		PREPROCESS(2, stridey << 1, process2);
43625c28e8Piotr Jasiukajtis
43725c28e8Piotr Jasiukajtis		if (--n < 0)
43825c28e8Piotr Jasiukajtis			goto process3;
43925c28e8Piotr Jasiukajtis
44025c28e8Piotr Jasiukajtis		PREPROCESS(3, (stridey << 1) + stridey, process3);
44125c28e8Piotr Jasiukajtis
44225c28e8Piotr Jasiukajtis		if (--n < 0)
44325c28e8Piotr Jasiukajtis			goto process4;
44425c28e8Piotr Jasiukajtis
44525c28e8Piotr Jasiukajtis		PREPROCESS(4, stridey << 2, process4);
44625c28e8Piotr Jasiukajtis
44725c28e8Piotr Jasiukajtis		if (--n < 0)
44825c28e8Piotr Jasiukajtis			goto process5;
44925c28e8Piotr Jasiukajtis
45025c28e8Piotr Jasiukajtis		PREPROCESS(5, (stridey << 2) + stridey, process5);
45125c28e8Piotr Jasiukajtis
45225c28e8Piotr Jasiukajtis		y0 = (x0 * invln2_256) + round;
45325c28e8Piotr Jasiukajtis		y1 = (x1 * invln2_256) + round;
45425c28e8Piotr Jasiukajtis		y2 = (x2 * invln2_256) + round;
45525c28e8Piotr Jasiukajtis		y3 = (x3 * invln2_256) + round;
45625c28e8Piotr Jasiukajtis		y4 = (x4 * invln2_256) + round;
45725c28e8Piotr Jasiukajtis		y5 = (x5 * invln2_256) + round;
45825c28e8Piotr Jasiukajtis
45925c28e8Piotr Jasiukajtis		j0 = LO(y0);
46025c28e8Piotr Jasiukajtis		j1 = LO(y1);
46125c28e8Piotr Jasiukajtis		j2 = LO(y2);
46225c28e8Piotr Jasiukajtis		j3 = LO(y3);
46325c28e8Piotr Jasiukajtis		j4 = LO(y4);
46425c28e8Piotr Jasiukajtis		j5 = LO(y5);
46525c28e8Piotr Jasiukajtis
46625c28e8Piotr Jasiukajtis		y0 -= round;
46725c28e8Piotr Jasiukajtis		y1 -= round;
46825c28e8Piotr Jasiukajtis		y2 -= round;
46925c28e8Piotr Jasiukajtis		y3 -= round;
47025c28e8Piotr Jasiukajtis		y4 -= round;
47125c28e8Piotr Jasiukajtis		y5 -= round;
47225c28e8Piotr Jasiukajtis
47325c28e8Piotr Jasiukajtis		k0 = j0 >> 8;
47425c28e8Piotr Jasiukajtis		k1 = j1 >> 8;
47525c28e8Piotr Jasiukajtis		k2 = j2 >> 8;
47625c28e8Piotr Jasiukajtis		k3 = j3 >> 8;
47725c28e8Piotr Jasiukajtis		k4 = j4 >> 8;
47825c28e8Piotr Jasiukajtis		k5 = j5 >> 8;
47925c28e8Piotr Jasiukajtis
48025c28e8Piotr Jasiukajtis		j0 = (j0 & 0xff) << 1;
48125c28e8Piotr Jasiukajtis		j1 = (j1 & 0xff) << 1;
48225c28e8Piotr Jasiukajtis		j2 = (j2 & 0xff) << 1;
48325c28e8Piotr Jasiukajtis		j3 = (j3 & 0xff) << 1;
48425c28e8Piotr Jasiukajtis		j4 = (j4 & 0xff) << 1;
48525c28e8Piotr Jasiukajtis		j5 = (j5 & 0xff) << 1;
48625c28e8Piotr Jasiukajtis
48725c28e8Piotr Jasiukajtis		x0 = (x0 - y0 * ln2_256h) - y0 * ln2_256l;
48825c28e8Piotr Jasiukajtis		x1 = (x1 - y1 * ln2_256h) - y1 * ln2_256l;
48925c28e8Piotr Jasiukajtis		x2 = (x2 - y2 * ln2_256h) - y2 * ln2_256l;
49025c28e8Piotr Jasiukajtis		x3 = (x3 - y3 * ln2_256h) - y3 * ln2_256l;
49125c28e8Piotr Jasiukajtis		x4 = (x4 - y4 * ln2_256h) - y4 * ln2_256l;
49225c28e8Piotr Jasiukajtis		x5 = (x5 - y5 * ln2_256h) - y5 * ln2_256l;
49325c28e8Piotr Jasiukajtis
49425c28e8Piotr Jasiukajtis		y0 = x0 * (one + x0 * (B1 + x0 * (B2 + x0 * B3)));
49525c28e8Piotr Jasiukajtis		y1 = x1 * (one + x1 * (B1 + x1 * (B2 + x1 * B3)));
49625c28e8Piotr Jasiukajtis		y2 = x2 * (one + x2 * (B1 + x2 * (B2 + x2 * B3)));
49725c28e8Piotr Jasiukajtis		y3 = x3 * (one + x3 * (B1 + x3 * (B2 + x3 * B3)));
49825c28e8Piotr Jasiukajtis		y4 = x4 * (one + x4 * (B1 + x4 * (B2 + x4 * B3)));
49925c28e8Piotr Jasiukajtis		y5 = x5 * (one + x5 * (B1 + x5 * (B2 + x5 * B3)));
50025c28e8Piotr Jasiukajtis
50125c28e8Piotr Jasiukajtis		t0 = TBL[j0];
50225c28e8Piotr Jasiukajtis		t1 = TBL[j1];
50325c28e8Piotr Jasiukajtis		t2 = TBL[j2];
50425c28e8Piotr Jasiukajtis		t3 = TBL[j3];
50525c28e8Piotr Jasiukajtis		t4 = TBL[j4];
50625c28e8Piotr Jasiukajtis		t5 = TBL[j5];
50725c28e8Piotr Jasiukajtis
50825c28e8Piotr Jasiukajtis		y0 = t0 + (TBL[j0 + 1] + t0 * y0);
50925c28e8Piotr Jasiukajtis		y1 = t1 + (TBL[j1 + 1] + t1 * y1);
51025c28e8Piotr Jasiukajtis		y2 = t2 + (TBL[j2 + 1] + t2 * y2);
51125c28e8Piotr Jasiukajtis		y3 = t3 + (TBL[j3 + 1] + t3 * y3);
51225c28e8Piotr Jasiukajtis		y4 = t4 + (TBL[j4 + 1] + t4 * y4);
51325c28e8Piotr Jasiukajtis		y5 = t5 + (TBL[j5 + 1] + t5 * y5);
51425c28e8Piotr Jasiukajtis
51525c28e8Piotr Jasiukajtis		if (k0 < -1021) {
51625c28e8Piotr Jasiukajtis			HI(y0) += (k0 + 0x3ef) << 20;
51725c28e8Piotr Jasiukajtis			y0 *= tiny;
51825c28e8Piotr Jasiukajtis		} else {
51925c28e8Piotr Jasiukajtis			HI(y0) += k0 << 20;
52025c28e8Piotr Jasiukajtis		}
52125c28e8Piotr Jasiukajtis		if (k1 < -1021) {
52225c28e8Piotr Jasiukajtis			HI(y1) += (k1 + 0x3ef) << 20;
52325c28e8Piotr Jasiukajtis			y1 *= tiny;
52425c28e8Piotr Jasiukajtis		} else {
52525c28e8Piotr Jasiukajtis			HI(y1) += k1 << 20;
52625c28e8Piotr Jasiukajtis		}
52725c28e8Piotr Jasiukajtis		if (k2 < -1021) {
52825c28e8Piotr Jasiukajtis			HI(y2) += (k2 + 0x3ef) << 20;
52925c28e8Piotr Jasiukajtis			y2 *= tiny;
53025c28e8Piotr Jasiukajtis		} else {
53125c28e8Piotr Jasiukajtis			HI(y2) += k2 << 20;
53225c28e8Piotr Jasiukajtis		}
53325c28e8Piotr Jasiukajtis		if (k3 < -1021) {
53425c28e8Piotr Jasiukajtis			HI(y3) += (k3 + 0x3ef) << 20;
53525c28e8Piotr Jasiukajtis			y3 *= tiny;
53625c28e8Piotr Jasiukajtis		} else {
53725c28e8Piotr Jasiukajtis			HI(y3) += k3 << 20;
53825c28e8Piotr Jasiukajtis		}
53925c28e8Piotr Jasiukajtis		if (k4 < -1021) {
54025c28e8Piotr Jasiukajtis			HI(y4) += (k4 + 0x3ef) << 20;
54125c28e8Piotr Jasiukajtis			y4 *= tiny;
54225c28e8Piotr Jasiukajtis		} else {
54325c28e8Piotr Jasiukajtis			HI(y4) += k4 << 20;
54425c28e8Piotr Jasiukajtis		}
54525c28e8Piotr Jasiukajtis		if (k5 < -1021) {
54625c28e8Piotr Jasiukajtis			HI(y5) += (k5 + 0x3ef) << 20;
54725c28e8Piotr Jasiukajtis			y5 *= tiny;
54825c28e8Piotr Jasiukajtis		} else {
54925c28e8Piotr Jasiukajtis			HI(y5) += k5 << 20;
55025c28e8Piotr Jasiukajtis		}
55125c28e8Piotr Jasiukajtis
55225c28e8Piotr Jasiukajtis		y[0] = y0;
55325c28e8Piotr Jasiukajtis		y[stridey] = y1;
55425c28e8Piotr Jasiukajtis		y[stridey << 1] = y2;
55525c28e8Piotr Jasiukajtis		y[(stridey << 1) + stridey] = y3;
55625c28e8Piotr Jasiukajtis		y[stridey << 2] = y4;
55725c28e8Piotr Jasiukajtis		y[(stridey << 2) + stridey] = y5;
55825c28e8Piotr Jasiukajtis		y += (stridey << 2) + stridey;
55925c28e8Piotr Jasiukajtis		continue;
56025c28e8Piotr Jasiukajtis
56125c28e8Piotr Jasiukajtisprocess1:
56225c28e8Piotr Jasiukajtis		PROCESS(0);
56325c28e8Piotr Jasiukajtis		continue;
56425c28e8Piotr Jasiukajtis
56525c28e8Piotr Jasiukajtisprocess2:
56625c28e8Piotr Jasiukajtis		PROCESS(0);
56725c28e8Piotr Jasiukajtis		PROCESS(1);
56825c28e8Piotr Jasiukajtis		continue;
56925c28e8Piotr Jasiukajtis
57025c28e8Piotr Jasiukajtisprocess3:
57125c28e8Piotr Jasiukajtis		PROCESS(0);
57225c28e8Piotr Jasiukajtis		PROCESS(1);
57325c28e8Piotr Jasiukajtis		PROCESS(2);
57425c28e8Piotr Jasiukajtis		continue;
57525c28e8Piotr Jasiukajtis
57625c28e8Piotr Jasiukajtisprocess4:
57725c28e8Piotr Jasiukajtis		PROCESS(0);
57825c28e8Piotr Jasiukajtis		PROCESS(1);
57925c28e8Piotr Jasiukajtis		PROCESS(2);
58025c28e8Piotr Jasiukajtis		PROCESS(3);
58125c28e8Piotr Jasiukajtis		continue;
58225c28e8Piotr Jasiukajtis
58325c28e8Piotr Jasiukajtisprocess5:
58425c28e8Piotr Jasiukajtis		PROCESS(0);
58525c28e8Piotr Jasiukajtis		PROCESS(1);
58625c28e8Piotr Jasiukajtis		PROCESS(2);
58725c28e8Piotr Jasiukajtis		PROCESS(3);
58825c28e8Piotr Jasiukajtis		PROCESS(4);
58925c28e8Piotr Jasiukajtis	}
59025c28e8Piotr Jasiukajtis}
591