-
Notifications
You must be signed in to change notification settings - Fork 27
Make pochhammer more robust #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 15 commits
5814f60
99d1d6b
e2825ea
422a992
cdb83dd
2c0dc6e
ed9f733
c140788
b56c1a5
d98a398
8d1839b
8336ae1
54c0bd0
4ab2f19
6acfdee
31d5218
2d371f2
055248f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using FastTransforms | ||
using Compat.Test | ||
import FastTransforms.pochhammer | ||
|
||
const sqrtpi = 1.772453850905516027298 | ||
|
||
@testset "Pochhammer" begin | ||
@test pochhammer(2,3) == 24 | ||
@test pochhammer(0.5,3) == 0.5*1.5*2.5 | ||
@test pochhammer(0.5,0.5) == 1/sqrtpi | ||
@test pochhammer(0,1) == 0 | ||
@test pochhammer(-1,2) == 0 | ||
@test pochhammer(-5,3) == -60 | ||
@test pochhammer(-1,-0.5) == 0 | ||
@test 1.0/pochhammer(-0.5,-0.5) == 0 | ||
@test pochhammer(-1+0im,-1) == -2 | ||
@test pochhammer([2,-5,-1],3) == [24,-60,0] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. vector-valued arguments should be deprecated in favour of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So can There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be deprecated, though that can be done separately. Yes abstract arrays support broadcastibg |
||
@test pochhammer([-1,-0.5],-0.5) == [0,-Inf] | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add complex tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gamma
is nonzero and holomorphic except the singularities, so complex tests don't make any difference, I suppose. I skipped array tests, though. Maybe add some array testsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean complex types but at integers:
ogamma(-1+0im)