K iyddlmZmZmZmZmZmZmZmZm Z m Z m Z m Z m Z mZmZmZmZmZmZddlmZmZmZmZmZmZddlmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8ddl9m:Z:ddl;mZ>ddl?m@Z@mAZAmBZBddlCmDZDmEZEddlFmGZGdd lHmIZImJZJmKZKdd lLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZUmVZVmWZWmXZXmYZYmZZZm[Z[m\Z\m]Z]m^Z^m_Z_m`Z`maZambZbmcZcmdZdmeZemfZfdd lgmhZhmiZimjZjmkZkmlZlmmZmmnZnmoZompZpmqZqmrZrdd lsmtZtdd lumvZvddlwmxZxmyZyddlzm{Z{m|Z|m}Z}ddlFm~Z~ed\ZZZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd Zd!Zd"Zd#Zd$Zd%Zd&Zd'Zd(Zd)Zd*Zd+Zd,Zd-Zd.Zd/Zd0Zd1Zd2Zd3Zd4Zd5Zd6Zd7Zd8Zd9Zd:ZeEd;Zd<Zd=Zd>Zd?Zd@ZdAZdBZdCZdDZdEZdFZyG)H)SpiooSymbolsymbolsRationalIntegerFloatFunctionMod GoldenRatio EulerGammaCatalanLambdaDummynanMulPowUnevaluatedExpr)EqGeGtLeLtNe)Absacosacoshasinasinhatanatanhatan2ceilingcoscosherferfcexpfloorgammalogloggammaMaxMin Piecewisesignsinsinhsqrttantanh fibonaccilucas)Range)ITEImplies Equivalent)For aug_assign Assignment)raisesXFAIL)PrintMethodNotImplementedError)C89CodePrinterC99CodePrinterget_math_macros)AddAugmentedAssignmentElementType FloatType DeclarationPointerVariable value_const pointer_constWhileScopePrintFunctionPrototypeFunctionDefinition FunctionCallReturnrealfloat32float64float80float128intcComment CodeBlockstderr QuotedString) expm1log1pexp2log2fmalog10CbrthypotSqrtisnanisinf)restrict)implemented_function) IndexedBaseIdx)Matrix MatrixSymbol SparseMatrixccodezx,y,zcVGddt}t|tdk(sJy)NceZdZdZy)test_printmethod..fabscDd|j|jdzS)Nzfabs(%s)r)_printargs)selfprinters a/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sympy/printing/tests/test_c.py_ccodez%test_printmethod..fabs._ccode#styy| << <N)__name__ __module__ __qualname__r}r~r|fabsrv"s =r~rfabs(x))rrsx)rs r|test_printmethodr!s&=s= a>Y && &r~ctttdk(sJttdzdk(sJtttdk(sJy)Nzsqrt(x)?)rsr4rrr~r|test_ccode_sqrtr)sD a>Y && & C=I %% % a>Y && &r~c ttdzdk(sJtttdzzdk(sJtdt tdtz}td|tdztttzz zz tdztzz dk(sJttd zd k(sJttt ddzd k(sJttt ddzt ti d k(sJddfddfg}ttdzd|idk(sJttdzd|idk(sJttt ddzd|idk(sJddfddfg}tdtzd|idk(sJttdzd|idk(sJttdtttttd !d"d !d !d#k(sJy)$Nz pow(x, 3)zpow(x, pow(y, 3))gg @z,pow(3.5*2*x, -x + pow(y, x))/(pow(x, 2) + y)z1.0/xzpow(x, 2.0/3.0) type_aliaseszpowl(x, 2.0L/3.0L)c|jSN is_integerbaser)s r|z test_ccode_Pow..8s cnnr~dpowic|j Srrrs r|rz test_ccode_Pow..9s #..&8r~powruser_functionsz dpowi(x, 3)rz pow(x, 0.5)zpow(x, 16.0/5.0)c |dk(SNrrrs r|rz test_ccode_Pow..= tqyr~c d|zS)Nzexp2(%s)rrs r|rz test_ccode_Pow..=s JQTDTr~c |dk7Srrrs r|rz test_ccode_Pow..>rr~exp2(x)z pow(x, 2)Fevaluatez -2*x/(y*y)) rsryrlrrrVrYrr)r _cond_cfunc _cond_cfunc2s r|test_ccode_Powr/s A;+ %% % QT 2 22 2S&AaC.1A AaDHAqD))1a4!84 56 77 7 D>W $$ $ HQN" #'8 88 8 HQN"$ AEY YY Y4g>8%@BK Auk&: ;} LL L C (< = NN N HRO#UK4H IM_ __ _02TU0%8:L Aul&; < II I Aul&; < KK K RCAa 7eL9>@ ADP QQ Qr~c`tttttzddddk(sJy)Nmy_maxmy_pow)r.rrzmy_max(x, my_pow(x, 2)))rsr.rrr~r|test_ccode_MaxrGs' Qqs((+K LPi ii ir~cttd}dD]4}t||}|jd|jdk(r4Jy)Nza[0:50])c89c99c11standard())r/rrscount)big_min curr_standardoutputs r|test_ccode_Min_performancerLsL79%&G.6 w7||C FLL$55556r~cNttddk(sJttdk(sJttddk(sJtt ddk(sJttdk(sJtt d d k(sJtttt i d k(sJy) NrM_EM_PIrrHUGE_VALz -HUGE_VALINFINITYrz -INFINITYrM_PIl)rsr)rrrVrYrr~r|test_ccode_constants_mathhrTs Q=E !! ! 9   e $ 22 2 "u % 44 4 9 "" " "u % 44 4 4/ 2g == =r~ctdtzdtjdzk(sJtdtzdtjdzk(sJtdtzdt jdzk(sJy)Nrz,const double GoldenRatio = %s; 2*GoldenRatioz$const double Catalan = %s; 2*Catalanz*const double EulerGamma = %s; 2*EulerGamma)rsr evalfrrrr~r|test_ccode_constants_otherr^s ; #RU`UfUfgiUj#j jj j  '  = b@QQ RR R : "OR\RbRbceRf"f ff fr~cttdddk(sJttddttidk(sJttdddk(sJttdd d k(sJttdd ttid k(sJttd d dk(sJttd d ttidk(sJtttddzd k(sJtttddzttidk(sJttddtzdk(sJttddtzttidk(sJy)Nrz3.0/7.0rz 3.0L/7.0L 2z-3.0/7.0z -3.0L/7.0Lz x + 3.0/7.0z x + 3.0L/7.0Lz (3.0/7.0)*xz (3.0L/7.0L)*x)rsrrVrYrrr~r|test_ccode_RationalresI !Q I -- - !QtWo >+ MM M "a !S (( ( !R !Z // / !Rg ?< OO O "b! "i // / "b!w @K OO O Xa^# $ 55 5 Xa^#4/ Bo UU U !Q! "m 33 3 !Q!w @O SS Sr~chttddk(sJttddk(sJy)NC67rz-1)rsr rr~r|test_ccode_Integerrss0   %% %   %% %r~c^tttttzdk(sJy)Nzpow(sin(x), cos(x)))rsr2rr%rr~r|test_ccode_functionsrxs# Q3q6! "&; ;; ;r~c td}tdt|d|z}t||dk(sJtdt|d|ztz }t||dt j dzk(sJt d}tdtd d }tdt||d |zzd|zz}t||||| dk(sJy)Nrrrz2*xz&const double Catalan = %s; 2*x/CatalanrAinTintegerr assign_toz@for (int i=0; i.s q||+r~rc|jSrrrs r|rz+test_ccode_user_functions..s r~abs)r$rrrrabs(n)amuladdrdrra99) rrsr$rrr rangerr)rrcustom_functionsexprrrouts r|test_ccode_user_functionsrsU#AT"A+V47Mu6UV ,< = JJ J Q(8 9Y FF F Q(8 9X EE E #;D h F 1c]=hq!nfqWot<= hx%8 9C C<< 99X # %% %r~c tddk(sJttjdk(sJtddk(sJttjdk(sJttt zdk(sJttt zdk(sJttdk(sJttt zt zdk(sJttt zt zd k(sJttt zt zd k(sJttt zt zd k(sJttt z d k(sJttt z t z d k(sJtttt dk(sJtttt t z tt tdk(sJy)NTtrueFfalsezx && yzx || yz!xz x && y && zz x || y || zz z || x && yz z && (x || y)z(x || y) && (!x || !y)zF(x || y || z) && (x || !y || !z) && (y || !x || !z) && (z || !x || !y)zy || !xzD(x || (y || !z) && (z || !y)) && (z && !x || (y || z) && (!y || !z))) rsrrrrrzr;r<rr~r|test_ccode_booleanrsq ;&  =F "" " <7 "" " >W $$ $ Q<8 ## # Q<8 ## # !9   Q } ,, , Q } ,, , !a%1  .. . !a%1  00 0 Q<3 33 3 !a%1 !i ii i A 9 ,, , Aq1ugam4 59  r~cttttdk(sJtt ttdk(sJtt ttdk(sJtt ttdk(sJttttdk(sJttttdk(sJy)Nzx == yzx != yzx <= yzx < yzx > yzx >= y) rsrrrrrrrrrr~r|test_ccode_Relationalrs Aq?h && & Aq?h && & Aq?h && & Aq?g %% % Aq?g %% % Aq?h && &r~ctttdkftdzdftdk(sJtddk(sJtttdkftdztdkftdzdftdk(sJtdd k(sJtttdkftdztdkDftttd kDft t fd y) NrrTz'((x < 1) ? ( x ) : ( pow(x, 2) ))crz3if (x < 1) { c = x; } else { c = pow(x, 2); }zB((x < 1) ? ( x ) : ((x < 2) ? ( x + 1 ) : ( pow(x, 2) )))zUif (x < 1) { c = x; } else if (x < 2) { c = x + 1; } else { c = pow(x, 2); }rctSrrrrsr|rz&test_ccode_Piecewise..s uT{r~)r0rrsr2r@ ValueErrorr s@r|test_ccode_Piecewisers aQZ!Q$ .D ;     %    aQZ!a%Q!Q$ >D ;      %     aQZ!Q$AQQ @D :*+r~cHddlm}|t}t|dk(sJy)Nr)sincz)(((x != 0) ? ( sin(x)/x ) : ( 1 ))))(sympy.functions.elementary.trigonometricrrrs)rrs r|test_ccode_sincrs)= 7D ;   r~c vtdtttdkftdztdkftdzdfz}|dk(sJttztztdzztdzztdtdkfdzt tzdz }t|dk(sJt|d d k(sJy) NrrTzD2*((x < 1) ? ( x ) : ((x < 2) ? ( x + 1 ) : ( pow(x, 2) )))rr)rTzNpow(x, 2) + x*y*z + pow(y, 2) + ((x < 0.5) ? ( 0 ) : ( 1 )) + cos(z) - 1r rzSc = pow(x, 2) + x*y*z + pow(y, 2) + ((x < 0.5) ? ( 0 ) : ( 1 )) + cos(z) - 1;)rsr0rrrr%)prs r|test_ccode_Piecewise_deeprs a 1a!e*q1ua!enq!tTlCCDA      Q3q51a4.=seCF9=r~)r@ TypeErrorrr~r|test_ccode_settingsr<s  9=>r~ctdd\}}}}td|td|td|}}}td|}td||f}td |||f} t} | j |d k(sJ| j |d ||z|zzk(sJ| j | d ||z|z||zz|zzk(sJtdd ||f}| j |d d|z|zzk(sJtdd d||f}t |d |d|zzzk(sJtddd|f|||f}t |dk(sJtd|||f|} t | |||fdk(sJt | dd|fdk(sJy)Nzs n m oTrrjkrrBzx[j]zA[%s]zB[%s])rrshaperF)r#stridesr)r&r)r#r%offsetzA[o + s*j + i]r%r'zA[m*j + n*k + o + s*i]rzA[3*m + n*k + o + 2*s])rrnrmrD_print_Indexedrs) rrmorrr rrr!rAbases r|test_ccode_Indexedr-@sD1JAq!Q#qk3sA;C !qACACAACAq!AA  A & (( (  A 'QqSU"3 33 3  A 'QqSU1Q3Yq["9 99 9Cu%ad+A  A 'QqS1W"5 55 5Cuc21a48A 8w!ac'* ** *CwAqA!Q$GA 8' '' ' aAYq 9E q!Qw $< << < q!Qw $< << BT TT T d# $ .. . g& '< 77 7r~c@d}td|f}td|f}td|dz f}td|dz }t||||dz||z ||dz||z z }t|j|j d }|d |dzd |dzd k(sJy) Nrrr"rDyrrF)rcontractz Dy[i] = (y[z ] - y[i])/(x[z ] - x[i]);)rmrnrrsrhslhs)len_yrrr4recode0s r|2test_ccode_Indexed_without_looking_for_contractionr;cs ECx(ACx(A T%' ,B CqA 2a51QqS6!A$;1Q3!-.A !%%1555 9E Aq1uM MM Mr~ctdd\}}td}td}td}td|}td|}d ||z|zzd z}t|||f||z|| |k(sJy) Nn mTrrrrrrz}for (int i=0; irr?) rr*rrrrrrrs r|test_ccode_loops_addrJs 5$ 'DAqCACACACA C A C A , 01sQw  8    1a41!$qt+qt < AA Ar~ctdd\}}}}td}td}td}td|}td|}td |} td |} d ||z|z|z||z|zz| |zz| zd ||z|z| |zz| zd dz} t||| | f|||| | fz||| k(sJy)Nn m o pTrrbrrrr lzfor (int i=0; iA D A3 '+E EE Er~c XtttztdtztdkDftdft t g}t ddd}t||dk(sJtd|dztdkDf|ddft |d z|d z}t|d k(sJt d d d}t ddd}tt |d dt|dg|d |dz|dd gd|dz|d z t|d dzdgg}t||dk(sJy)NrrTrrrzPA[0] = x*y; if (y > 0) { A[1] = x + 2; } else { A[1] = y; } A[2] = sin(z);)rr)rrrrz:((x > 0) ? ( 2*A[2] ) : ( A[2] )) + sin(A[1]) + A[0]qrM)rr)r1rr1zM[0] = sin(q[1]); M[1] = 0; M[2] = cos(q[2]); M[3] = q[1] + q[2]; M[4] = q[3]; M[5] = 5; M[6] = 2*q[4]/q[1]; M[7] = sqrt(q[0]) + 4; M[8] = 0;) rorrr0r2rrprsr%r4)matrrr`rar*s r|test_Matrix_printingrcs\ !A#y!a%14y93q6B CCS!QA a=    a$iQ'!D'4 9C$L H1T7 RD ;  !! ! S!QAS!QAQsVaQsV- 3!C&!D'1% 1T71S6 4#8U2C#D#L#L\[dZeMf#g gg g))s AA&c td\}}tt5t|dzdddddt|dzdk(sJt||dzz|gdk(sJt|dzd d k(sJy#1swYKxYw) Nzx, ifrTr)error_on_reservedrz pow(if_, 2)r[zpow((*if_), 2)*x _unreserved)reserved_word_suffixzpow(if_unreserved, 2))rr@r rs)rrs r|test_ccode_reserved_wordsrlDs 7 DAq  < addU;< A;- '' ' QTs +/A AA A AM :>U UU U < 0) - ((x) < 0))z!(((cos(x)) > 0) - ((cos(x)) < 0))rzApow(x, 2) + x*(((pow(x, 2) + 2*x) > 0) - ((pow(x, 2) + 2*x) < 0))rzz = %s;)r1rrr%rs)expr1ref1expr2ref2expr3ref3s r|test_ccode_signrtMsq'A+:4Es1v, C4Eq1uq!t|$q(1a4/1t4E <4     D 0 00 0 <4   <4  r~ctttttzdk(sJtt tdttzdk(sJy)Nz x = y + z;+z x += y + z;)rsr?rrrr>rr~r|test_ccode_AssignmentrwVs@ Aq1u% &, 66 6 AsAE* +} << rrs)fs r|test_ccode_Forr|[s? AuQAAsA!6 78A 8  r~c tttdddk(sJtttdddk(sJtttdt tddk(sJy) Nrrrz((0 > x) ? 0 : x)rz fmax(0, x)rzI((0 < ((x < sqrt(x)) ? x : sqrt(x))) ? 0 : ((x < sqrt(x)) ? x : sqrt(x))))rsr.rr/r4rr~r|test_ccode_Max_Minr~asb QU +/B BB B QU +| ;; ; Q47#e 4S  r~ctttddk(sJttddk(sJtt dddk(sJy)Nrrexpm1(x)NANr)rsr`rrfloatrr~r|test_ccode_standardrhsI qE *j 88 8 u % .. . u .% 77 7r~ct}|jdk(sJ|jdk(sJd|jvsJd|jvsJ|j t t dk(sJy)NCrvoidtemplatelog10(x))rClanguagerreserved_wordsrfrer) c89printers r|test_C89CodePrinterrnsw!J   # %% %   % '' ' Z.. .. . Z66 66 6   eAh ': 55 5r~ctjttdk(sJtjt tdk(sJtjt tdk(sJtjt tdk(sJtjtttt dk(sJtjttdk(sJtjttdk(sJtjtttdk(sJtjttd k(sJtjttd td zd k(sJtjttd d k(sJt}|j dk(sJ|j"dk(sJd|j$vsJd|j$vsJy)Nrzlog1p(x)rzlog2(x)z fma(x, y, -z)rzcbrt(x)z hypot(x, y)z lgamma(x)rrzfmax(3, fmax(x, pow(x, 2)))z fmin(3, x)rrrkusing)rDrfr`rrarbrcrdrrrerfrgr-r.r/rrr) c99printers r|test_C99CodePrinterrws   # #E!H - ;; ;   # #E!H - ;; ;   # #DG , 99 9   # #DG , 99 9   # #C1qbM 2o EE E   # #E!H - ;; ;   # #DG , 99 9   # #E!QK 0M AA A   # #HQK 0K ?? ?   # #C1adO 48U UU U   # #C1I ., >> >!J   # %% %   % '' ' 22 22 2 *33 33 3r~ctdttii}|jt t t dzdk(sJy)Nrz2.1zsinl(x + 2.1L))rDrVrYrfr2rr ) f80_printers r|"test_C99CodePrinter__precision_f80rs= .4/!BCK   s1uU|#34 59I II Ir~c  tdd}tddd}tdttii}tdttii}tdtt ii}|j ttdzdk(sJ|j ttdzd k(sJ|j tttd zd k(sJt|||ggd D]c\fd }|t|d|ttdzd|ttdzttdz zd|ttdzd|ttd|ttdzd|t!|dd|t!d|zdzd|zdzdd|t!tdzdd|t!tdtzdzd |t#tdz d!|t%dtzdz d"|t'tdzd#|t)td$|dtzd%|dtzd&|tdzd'|tdzd(|t+dtzd)|t-tdz d*|t/tt0d+|tdtzdzd,|tdtzd-z d.|t3dt0zdzd/|t5dtzdzd0|t7dtzdzd1|t9dtzdzd2|t;dtzdt0zd3|t=dtzdzd4|t?dtzd-z d5|tAdt0zdzd6|tCdtzdzd7|tEdtzdzd8|tGdtzdzd9|tId:tzd;|tKd:tzd<|tMtd=|tOtd>|tQtdzd?|tStdzd@|tUtt0tV dA|tYtdtdzdB|t[tddCfy)DNrTrrrrg@zsinf(x + 2.1F)zsin(x + 2.1000000000000001)z2.0zsinl(x + 2.0L))r{rNcpj||jjk(sJy)N)rr)rfformatupper)rrefr{suffixs r|checkz-test_C99CodePrinter__precision..checks-??4(CJJ6<<>J,RR RRr~r@zfabs{s}(x + 2.0{S})g@z.pow{s}(sin{s}(x + 4.0{S}), cos{s}(x - 2.0{S}))g @zexp{s}(8.0{S}*x)z exp2{s}(x)zexpm1{s}(4.0{S}*x)rzp % 2rrFrz(2*p + 3) % (3*p + 5)g@z"fmod{s}(1.0{S}*x + 2.0{S}, 3.0{S})z$fmod{s}(1.0{S}*x, 2.0{S}*x + 3.0{S})zlog{s}((1.0{S}/2.0{S})*x)zlog10{s}((3.0{S}/2.0{S})*x)zlog2{s}(8.0{S}*x)z log1p{s}(x)z pow{s}(2, x)zpow{s}(2.0{S}, x)z pow{s}(x, 3)zpow{s}(x, 4.0{S})zsqrt{s}(x + 3)zcbrt{s}(x - 2.0{S})zhypot{s}(x, y)zsin{s}(3.0{S}*x + 2.0{S})g?zcos{s}(3.0{S}*x - 1.0{S})ztan{s}(4.0{S}*y + 2.0{S})zasin{s}(3.0{S}*x + 2.0{S})zacos{s}(3.0{S}*x + 2.0{S})zatan{s}(3.0{S}*x + 2.0{S})zatan2{s}(3.0{S}*x, 2.0{S}*y)zsinh{s}(3.0{S}*x + 2.0{S})zcosh{s}(3.0{S}*x - 1.0{S})ztanh{s}(4.0{S}*y + 2.0{S})zasinh{s}(3.0{S}*x + 2.0{S})zacosh{s}(3.0{S}*x + 2.0{S})zatanh{s}(3.0{S}*x + 2.0{S})gE@zerf{s}(42.0{S}*x)zerfc{s}(42.0{S}*x)z tgamma{s}(x)z lgamma{s}(x)zceil{s}(x) + 2zfloor{s}(x) + 2zfma{s}(x, y, -z)z.fmax{s}(8.0{S}, fmax{s}(x, pow{s}(x, 4.0{S})))zfmin{s}(2.0{S}, x)).rrDrVrWrXrYrfr2rr ziprr%r)rbr`r r,rercrar4rfrgrr5rrr!r#r3r&r6r rr"r'r(r+r-r$r*rdrr.r/)rr f32_printer f64_printerrrr{rs @@r|test_C99CodePrinter__precisionrsVT"ATD1A .4/!BCK .4/!BCK .4/!BCK   s1S5z *.> >> >   s1S5z *.K KK K   s1U5\>2 37G GG G [+FW/1 S c!fh c!c'l12 c!c'lCCL(*Z[ c!C%j,- d1g|$ eAcEl01 c!Qi! c!A#'1Q37U35LM c!c'3!EF c!SUS[!#IJ c!A#h34 eAaCEl9: d1S5k./ eAh & adN# c1f)* adN# af)* d1Q3i)* d1S5k01 eAqk+, c"Q$)n9: c"Q$)n9: c"Q$)n9: d2a4"9o;< d2a4"9o;< d2a4"9o;< eBqD"Q$!?@ d2a4"9o;< d2a4"9o;< d3q52: <= eBqD2I => eBqD2I => eBqD2I => c#a%j-. d3q5k/0 eAh' hqk>* ga"fo/0 eAFm./ c!Qm/0 c!S!S&!#ST c!Sk/0_/1r~cjt}|tddk(sJ|dtdz dk(sJy)Nrrr M_SQRT1_2)rEr)rh)macross r|test_get_math_macrosrs;  F #a&>U "" " !DG)  ++ +r~ctdd}t|tj|}t |}t |dk(sJtt tth}t |}t |dk(sJ|jt}t |d k(sJtttd }t |}t}d |jvsJ|j|d k(sJd |jvsJtd d} tj | t"t$h} t | } t | dk(sJtt tdth} t | } t | dk(sJt| j&| j(t| j*}t |}t |dk(sJy)NrTrtypezint i)rattrsz const float x)valuezconst float x = M_PIboolz stdbool.hzbool yurrzdouble * const restrict u __float128zconst __float128 xzconst __float128 x = M_PI)rrLrH from_exprrJrsrrWrMas_DeclarationrrrCheadersrfrKdeducedrNrksymbolrr)rvar1dcl1var2dcl2adcl2bvar3dcl3r{rptr4dcl4var5dcl5avar5bdcl5bs r|test_ccode_DeclarationrsT"A ADNN1- .D t D ;' !! ! AGK= 9D  E D t D ;5 55 5 AtL)+ ?D  E </ // / T[[$))Rtzz BE  E <6 66 6r~c tdtjtjtj}t t |i|di|dit d|di|did}|jtdk(sJ|jrJ|jrJ|jrJ|jddk(sJ|jrJ|jrJ|jd hk(sJ|jtd d d k(sJ|jttd k(sJ|jtdddk(sJ|jtdzdk(sJtt|t h}t#|}t%|dk(sJtt|t&t h}t#|}|j|dk(sJtt|t)j*dt h}t#|}|j|dt)j*|j,zk(sJy)N _Float128Qf128)!__STDC_WANT_IEC_60559_TYPES_EXT__)rtype_literal_suffixestype_func_suffixestype_math_macro_suffixes type_macrosrrz2.0Qrrrz 1.0Q/2.0Qz sinf128(x)Frz cosf128(2.0Q)rz1.0Q/xrzconst _Float128 xzconst _Float128 x = M_PIf128&)rrzconst _Float128 x = %sQ)rIrZnbitsnmantnexprDrVrfrr librariesrrr2r%rLrMrJrsrrr decimal_dig)rp128rrrrdcl5cs r|test_C99CodePrinter_custom_typers [(..(..(-- PD t "&#Vn & &% 8   D <<?c !! !|| ~~ {{? <<  && &|| ~~  ;;>? ?? ? <<A '; 66 6 <<A < // / <<B/ 0O CC C <<4 H ,, , AtK= 1D  E <. .. . Qb 6E  E << "@ @@ @ QGMM"$5k] KE  E << ";gmmDL\L\>]"] ]] ]r~ctddd}tddd}tddd}t|ddk(sJtd|dzdk(sJ|dj|||z }t|d k(sJy) Nrrrr!rr_zA[0]z3*A[0]z (A - B)[0])rprssubs)rr!rr$s r|test_MatrixElement_printingrsS!QAS!QAS!QA 4>V #$ # QtW  )* ) $ QAA 8| #$ #r~c*tttdzdk(sJttttdzdk(sJttdt dz zdk(sJttt dzdk(sJttt dzdk(sJttt zdk(sJttt dz zd k(sJttt d z zd k(sJttdt z zd k(sJttdt z zd k(sJttdt t z zdk(sJttdtt z zdk(sJttt dzdk(sJtttdzdk(sJttdt dz zdk(sJttdtdz zdk(sJy)Nrzz + M_Ez z + M_LOG2Erz z + M_LN2ryz z + M_LN10zz + M_PIz z + M_PI_2r1z z + M_PI_4z z + M_1_PIz z + M_2_PIzz + M_2_SQRTPIz z + M_SQRT2z z + M_SQRT1_2)rsrr)rcr,rr4rhrr~r|test_ccode_math_macrosr's SV  )) ) T#a&\! "m 33 3 Qs1vX - // / SV  ++ + SW  -- - R=J && & RT?l ** * RT?l ** * QrT?l ** * QrT?l ** * QtBxZ $4 44 4 QtBxZ $4 44 4 T!W  .. . T!W  .. . QtAwY ? 22 2 QtAwY ? 22 2r~c^ttddk(sJttdk(sJy)Nrint)rsrHr[rr~r|test_ccode_Typer:s+ g 7 ** * ;%  r~c ttddk(sJttttdkDt tddgdk(sJtt ttdgdk(sJtttt}tttd|gd k(sJtttd|gtttd zgd k(sJttttt gd tt#d t gdt$t'dtgt)t}t|dj+gdk(sJy)Nzthis is a commentz/* this is a comment */r-z"while (fabs(x) > 1) { x -= 1; }z{ x += 1; }rpwerzdouble pwer(double x)rz*double pwer(double x){ x = pow(x, 2); }z%d %dhelloz%s %d)file )zx;zprintf("%d %d", x, y);z%fprintf(stderr, "%s %d", "hello", y);zpwer(x);z return x;)rsr\rOrrr>rPrFrJrLrVrRrSr?r]rQrr_r^rTrUjoin)inp_xblocks r|test_ccode_codegen_astr?s\ ,- .2K KK K s1vzJq#q$9#:; <    .q!456 7    . /E "4%9 :>U UU U #D&5'Jq!Q$[ (( ( >[ (( (r~cxtttdk(sJtttdk(sJy)Nzisinf(x)zisnan(x))rsrjrrirr~r|test_ccode__isinf_isnanrvs. q?j (( ( q?j (( (r~N) sympy.corerrrrrrr r r r r rrrrrrrrsympy.core.relationalrrrrrrsympy.functionsrrrrr r!r"r#r$r%r&r'r(r)r*r+r,r-r.r/r0r1r2r3r4r5r6r7r8 sympy.setsr9 sympy.logicr:r;r< sympy.codegenr=r>r?sympy.testing.pytestr@rAsympy.printing.codeprinterrBsympy.printing.crCrDrEsympy.codegen.astrFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrUrVrWrXrYrZr[r\r]r^r_sympy.codegen.cfunctionsr`rarbrcrdrerfrgrhrirjsympy.codegen.cnodesrksympy.utilities.lambdifyrl sympy.tensorrmrnsympy.matricesrorprqrsrrrrrrrrrrrrrrrrrrrrrrrrr-r2r;r@rHrJrQrSrYr]rcrgrlrtrwr|r~rrrrrrrrrrrrrrrrr~r|rs;: 0055.ELL kjjj)9)==, ' 1a'' Q0j 6>g T& <"BY*&*@&'',T  :?=88N4* 3B,@6R8,)^F %PhV =  8 64&JJ 91x, 7@&^R %3& %N -))r~