"Fossies" - the Fresh Open Source Software Archive 
Member "pari-2.13.1/src/test/in/hypergeom" (14 Jan 2021, 4034 Bytes) of package /linux/misc/pari-2.13.1.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "hypergeom":
2.13.0_vs_2.13.1.
1 default(realprecision,38);
2 testF(v, D0, D) =
3 {
4 for(i=1,#v,
5 my ([n,d,z] = v[i]);
6 localbitprec(D);
7 a = hypergeom(n,d,z);
8 localbitprec(D + 64);
9 b = hypergeom(n,d,z);
10 e = exponent(a/b - 1);
11 if (e > -D0, print(i,": ", e));
12 );
13 }
14 { localbitprec(320);
15 v11=[
16 [0.1,0.2,0.5], [-0.1,0.2,0.5], [0.1,0.2,-0.5+I], [1+I,1+I,1-I],
17 /*5*/
18 [10^(-8),10^(-8),10^(-10)], [10^(-8),10^(-12),-10^(-10)+10^(-12)*I], [1,1,10+10^(-9)*I], [1,3,10], [500,511,10],
19 /*10*/
20 [8.1,10.1,100], [1,2,600], [100,1.5,2.5], [-60,1,10], [60,1,10],
21 /*15*/
22 [60,1,-10], [-60,1,-10], [1000,1,10^(-3)], [10^(-3),1,700], [500,1,-5],
23 /*20*/
24 [-500,1,5], [20,-10+10^(-9),-2.5], [20,10-10^(-9),2.5], [-20,-10+10^(-12),2.5], [50,10,200*I],
25 /*25*/
26 [-5,(-5+10^(-9))*(1+I),-1], [4,80,200], [-4,500,300], [5,0.1,-2+300*I], [-5,0.1,2+300*I],
27 /*30*/
28 [2+8*I,-150+I,150], [5,2,100-1000*I], [-5,2,-100+1000*I], [-5,-2-I,1+(2-10^(-10))*I], [1,10^(-12),1],
29 /*35*/
30 [10,10^(-12),10], [1,-1+10^(-12)*I,1], [1000,1,-1000], [-1000,1,1000], [-10+500*I,5*I,10],
31 /*40*/
32 [20,10+1000*I,-5]];
33 }
34 print("1F1");
35 testF(v11, 128, 128)
36 testF(v11, 256, 256)
37
38 hypergeom([],[],-3.5)
39 hypergeom(1.5,[],0.5)
40 hypergeom(-0.5,[],3)
41 hypergeom([],2.5,15)
42 hypergeom([],2.5,-15)
43 hypergeom([],2.5,15*I)
44 v20=[[[1,1],[],-3], [[1,1],[],-3+10^-20*I], [[1,3/2],[],-3], [[1,-1],[],10^-4]];
45 print("2F0");
46 testF(v20, 128, 128)
47
48 {localbitprec(320);
49 v21=[
50 [[0.1,0.2],0.3,0.5],
51 [[-0.1,0.2],0.3,0.5],
52 [[0.1,0.2],-0.3,-0.5+0.5*I],
53 [[10^(-8),10^(-8)],10^(-8),10^(-6)],
54 [[10^(-8),-10^(-6)],10^(-12),-10^(-10)+10^(-12)*I],
55 [[1,10],1,0.5+10^(-9)*I],
56 [[1,-1+10^(-12)*I],1,-0.8],
57 [[2+8*I,3-5*I],sqrt(2)-Pi*I,0.75],
58 [[100,200],350,I],
59 /*10*/
60 [[2+10^(-9),3],5,-0.75],
61 [[-2,-3],-5+10^(-9),0.5],
62 [[-1,-1.5],-2-10^(-15),0.5],
63 [[500,-500],500,0.75],
64 [[500,500],500,-0.6],
65 [[-1000,-2000],-4000.1,-0.5],
66 [[-100,-200],-300+10^(-9),0.5*sqrt(2)],
67 [[300,10],5,0.5],
68 [[5,-300],10,0.5],
69 [[10,5],-300.5,0.5],
70 /*20*/
71 [[2+200*I,5],10,0.6],
72 [[2+200*I,5-100*I],10+500*I,0.8],
73 [[2,5],10-500*I,-0.8],
74 [[2.25,3.75],-0.5,-1],
75 [[1,2],4+3*I,0.6-0.8*I],
76 [[1,0.9],2,exp(I*Pi/3)],
77 [[1,2.5],5,exp(I*Pi/3)],
78 [[-1,0.9],2,exp(-I*Pi/3)],
79 [[4,1.1],2,0.5+(0.5*sqrt(3)-0.01)*I],
80 [[5,2.2],-2.5,0.49+0.5*sqrt(3)*I],
81 /*30*/
82 [[2/3,1],4/3,exp(I*Pi/3)],
83 [[1/2,5/2],5,3/4],
84 [[1/2,1/5],3,3/5+9/10*I],
85 [[1/2,1/5],3,3/5+I],
86 [[-2,-4/5],-9/5,3/5],
87 [[1,2],4,1],
88 [[-1/2,-3/2],4,99/100],
89 [[10,-1],2,1+I],
90 [[1,-10],2,1+2*I],
91 [[-2,1/2],1,100],
92 /*40*/
93 [[-2,1/2],1,-100],
94 [[3/2,3/2],1,0.97],
95 [[3/2,3/2],1,1.03],
96 [[3/2,-1/2],4/3,exp(I*Pi/3)],
97 [[1/2,1/3],11/6, 101/100 + I/2^30]
98 ];
99 }
100 print("2F1");
101 testF(v21, 125, 128)
102 testF(v21, 250, 256)
103
104 v31=[[[1,1,2],[3],-3], [[1,1,2],[3],-3+10^-20*I], [[1,3/2,2],[3],-3], [[1,-1,2],[3],10^-4]];
105 print("3F1");
106 testF(v31, 128, 128)
107
108 v32=[[[1,1,2],[3,I],-3], [[1,1,2],[3,I],-3+10^-20*I], [[1,3/2,2],[3,I],-3], [[1,-1,2],[3,I],10^-4]];
109 print("3F2");
110 testF(v32, 128, 128)
111
112 localprec(115); hyperu(5/6,5/3,230) \\ cancellation in F11
113
114 hypergeom([1,1],2,-1.000000000000001)
115 f(a,c)=exponent( hypergeom([a,2],c,(c-2)/(a-1)) - (a-1)*(c-1)/(a+1-c) );
116 for(j=28,32,print(j/5,": ",f(3,j/5)));
117 f(4,1/5)
118 hypergeom([3,2],3.4,0.7)
119 hypergeom([1.5,2.1],[-3.5,1.1],1)
120 a=sqrt(Pi)*(1-erfc(sqrt(2)))/sqrt(2)+exp(-2)/2-1/2;
121 b=hypergeom([1/2,1],[3/2,2],-2); exponent(a-b)
122 a=5/3;
123 T1=hypergeom([1,1,1],[a,a],1);
124 hypergeom([1,1,1],[a,a],-1)
125 T2=hypergeom([2,1,1],[a+1,a+1],1)
126 T3=hypergeom([2*a-1,1,1],[a+1,a+1],1)
127 b=T1+(a-1)^2/(a^2*(2*a-3))*(T2-2*(a-1)*T3)-gamma(a)^2/((2*a-3)*gamma(2*a-2));
128 exponent(b) <= -122
129 airy(0)
130 airy(I)
131 airy(1)
132 airy(100)[1]
133 airy(-100)[2]
134 hypergeom([1,1,1,1/2],[3/4,3/2,3/2],1)
135 hypergeom([1,2,1,1,1,1/2],[1,2,3/4,3/2,3/2],1)
136 F(k,a)=Pi^(k-1/2)*gamma(a)/(2^(3*k-1)*gamma(a+1/2))*hypergeom(concat(vector(k,j,1),1/2),concat(a+1/2,vector(k-1,j,3/2)),1);
137 L=lfuninit(lfunetaquo([4,2;8,2]),[1,6,1],2);
138 lindep([lfun(L,3),F(3,5/4),F(3,3/4),F(3,1/4)])
139
140 hypergeom([1/6,2/3],1/2,2)
141
142 \\ Errors, keep at end
143 airy(O(x))
144 hypergeom([],[],O(x))
145 hypergeom([2,1],0,1)
146 hypergeom([2,3],1,1)
147 hypergeom([1/2,1/2,1/2],[1/3,1/3], 1 - 10^-6)
148 hypergeom([1,2,3,4],[],1/2)