347
347
348
348
349
349
function _₂F₁maclaurin (a:: Number , b:: Number , c:: Number , z:: Number )
350
- T = promote_type (typeof (a), typeof (b), typeof (c), typeof (z))
350
+ T = float ( promote_type (typeof (a), typeof (b), typeof (c), typeof (z) ))
351
351
S₀, S₁, j = one (T), one (T)+ a* b* z/ c, 1
352
352
while errcheck (S₀, S₁, 10 eps (real (T))) || j ≤ 1
353
353
rⱼ = (a+ j)/ (j+ 1 )* (b+ j)/ (c+ j)
@@ -358,7 +358,7 @@ function _₂F₁maclaurin(a::Number, b::Number, c::Number, z::Number)
358
358
end
359
359
360
360
function _₂F₁maclaurinalt (a:: Number , b:: Number , c:: Number , z:: Number )
361
- T = promote_type (typeof (a), typeof (b), typeof (c), typeof (z))
361
+ T = float ( promote_type (typeof (a), typeof (b), typeof (c), typeof (z) ))
362
362
C, S, j = one (T), one (T), 0
363
363
while abs (C) > 10 abs (S)* eps (real (T)) || j ≤ 1
364
364
C *= (a+ j)/ (j+ 1 )* (b+ j)/ (c+ j)* z
@@ -369,7 +369,7 @@ function _₂F₁maclaurinalt(a::Number, b::Number, c::Number, z::Number)
369
369
end
370
370
371
371
function _₂F₁continuation (s:: Number , t:: Number , c:: Number , z₀:: Number , z:: Number )
372
- T = promote_type (typeof (s), typeof (t), typeof (c), typeof (z₀), typeof (z))
372
+ T = float ( promote_type (typeof (s), typeof (t), typeof (c), typeof (z₀), typeof (z) ))
373
373
izz₀, d0, d1 = inv (z- z₀), one (T), s/ (2 s- t+ one (T))* ((s+ 1 )* (1 - 2 z₀)+ (t+ 1 )* z₀- c)
374
374
S₀, S₁, izz₀j, j = one (T), one (T)+ d1* izz₀, izz₀, 2
375
375
while errcheck (S₀, S₁, 10 eps (real (T))) || j ≤ 2
@@ -381,7 +381,7 @@ function _₂F₁continuation(s::Number, t::Number, c::Number, z₀::Number, z::
381
381
end
382
382
383
383
function _₂F₁continuationalt (a:: Number , c:: Number , z₀:: Number , z:: Number )
384
- T = promote_type (typeof (a), typeof (c), typeof (z₀), typeof (z))
384
+ T = float ( promote_type (typeof (a), typeof (c), typeof (z₀), typeof (z) ))
385
385
izz₀ = inv (z- z₀)
386
386
e0, e1 = one (T), (a+ one (T))* (one (T)- 2 z₀)+ (2 a+ one (T))* z₀- c
387
387
f0, f1 = zero (T), one (T)- 2 z₀
@@ -402,7 +402,7 @@ function _₂F₁continuationalt(a::Number, c::Number, z₀::Number, z::Number)
402
402
end
403
403
404
404
function _₂F₁logsum (a:: Number , b:: Number , z:: Number , w:: Number , s:: Int )
405
- T = promote_type (typeof (a), typeof (b), typeof (z), typeof (w))
405
+ T = float ( promote_type (typeof (a), typeof (b), typeof (z), typeof (w) ))
406
406
cⱼ = 2 digamma (one (T))- digamma (a)- digamma (b)+ s* log1p (- z)
407
407
C, S, j = one (T), cⱼ, 0
408
408
while abs (C) > 10 abs (S)* eps (real (T)) || j ≤ 1
@@ -415,7 +415,7 @@ function _₂F₁logsum(a::Number, b::Number, z::Number, w::Number, s::Int)
415
415
end
416
416
417
417
function _₂F₁logsumalt (a:: Number , b:: Number , z:: Number , w:: Number )
418
- T = promote_type (typeof (a), typeof (b), typeof (z), typeof (w))
418
+ T = float ( promote_type (typeof (a), typeof (b), typeof (z), typeof (w) ))
419
419
d, cⱼ = one (T)- b, 2 digamma (one (T))- digamma (a)- digamma (b)- log (- w)
420
420
C, S, j = one (T), cⱼ, 0
421
421
while abs (C) > 10 abs (S)* eps (real (T)) || j ≤ 1
@@ -428,7 +428,7 @@ function _₂F₁logsumalt(a::Number, b::Number, z::Number, w::Number)
428
428
end
429
429
430
430
function _₂F₁taylor (a:: Number , b:: Number , c:: Number , z:: Number )
431
- T = promote_type (typeof (a), typeof (b), typeof (c), typeof (z))
431
+ T = float ( promote_type (typeof (a), typeof (b), typeof (c), typeof (z) ))
432
432
z₀ = abs (z) < 1 ? ρϵ* sign (z) : sign (z)/ ρϵ
433
433
q₀, q₁ = _₂F₁ (a, b, c, z₀), a* b/ c* _₂F₁ (a+ 1 , b+ 1 , c+ 1 , z₀)
434
434
S₀, zz₀ = q₀, z- z₀
@@ -443,7 +443,7 @@ function _₂F₁taylor(a::Number, b::Number, c::Number, z::Number)
443
443
end
444
444
445
445
function _₃F₂maclaurin (a₁, a₂, a₃, b₁, b₂, z)
446
- T = promote_type (typeof (a₁), typeof (a₂), typeof (a₃), typeof (b₁), typeof (b₂), typeof (z))
446
+ T = float ( promote_type (typeof (a₁), typeof (a₂), typeof (a₃), typeof (b₁), typeof (b₂), typeof (z) ))
447
447
S₀, S₁, j = one (T), one (T)+ (a₁* a₂* a₃* z)/ (b₁* b₂), 1
448
448
while errcheck (S₀, S₁, 10 eps (real (T))) || j ≤ 1
449
449
rⱼ = ((a₁+ j)* (a₂+ j)* (a₃+ j))/ ((b₁+ j)* (b₂+ j)* (j+ 1 ))
@@ -454,7 +454,7 @@ function _₃F₂maclaurin(a₁, a₂, a₃, b₁, b₂, z)
454
454
end
455
455
456
456
function pFqmaclaurin (a:: AbstractVector{S} , b:: AbstractVector{U} , z:: V ) where {S, U, V}
457
- T = promote_type (S, U, V)
457
+ T = float ( promote_type (S, U, V) )
458
458
S₀, S₁, j = one (T), one (T)+ prod (a)* z/ prod (b), 1
459
459
while errcheck (S₀, S₁, 10 eps (real (T))) || j ≤ 1
460
460
rⱼ = inv (j+ one (T))
0 commit comments