You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Numerical routines for computing Bessel functions and modified Bessel functions
6
6
7
7
The goal of the library is to provide high quality numerical implementations of Bessel functions with high accuracy without comprimising on computational time. In general, we try to match (and often exceed) the accuracy of other open source routines such as those provided by [SpecialFunctions.jl](https://github.com/JuliaMath/SpecialFunctions.jl). There are instances where we don't quite match that desired accuracy (within a digit or two) but in general will provide implementations that are 5-10x faster (see [benchmarks](https://github.com/heltonmc/Bessels.jl/edit/update_readme/README.md#benchmarks)).
8
8
9
-
The library currently only supports Bessel functions and modified Bessel functions of the first and second kind for negative or positive real arguments and integer and noninteger orders. We plan to support complex arguments in the future. An unexported gamma function is also provided.
9
+
The library currently only supports Bessel functions and modified Bessel functions of the first and second kind for positive real arguments and integer and noninteger orders. Negative arguments are also supported only if the return value is real. We plan to support complex arguments in the future. An unexported gamma function is also provided.
10
10
11
11
# Quick start
12
12
@@ -119,26 +119,26 @@ julia> besselk1(x)
119
119
120
120
### Support for negative arguments
121
121
122
-
Support is also provided for negative arguments and orders. However, if you use negative arguments, **real arguments could produce complex outputs**. See https://github.com/heltonmc/Bessels.jl/issues/30 for more details.
122
+
Support is provided for negative arguments and orders only if the return value is real. A domain error will be thrown if the return value is complex. See https://github.com/heltonmc/Bessels.jl/issues/30 for more details.
123
123
124
124
```julia
125
-
julia>besselj(-1.4, 12.1)
126
-
0.1208208567052962
127
-
128
-
julia>besselj(5.8, -12.1)
129
-
-0.17685468273930427+0.12849244828700035im
130
-
131
-
julia>besselj(-2.8, -12.1)
132
-
0.1785554860917274+0.1297281542543098im
133
-
134
-
julia>bessely(5.8, -12.1)
135
-
-0.08847808383435121-0.41799245618068837im
136
-
137
-
julia>bessely(-2.8, -12.1)
138
-
0.05892453605716959+0.31429979079493564im
139
-
140
-
julia>besselk(-2.8, -12.1)
141
-
-2.188744151278995e-6-46775.597252033134im
125
+
julia>(v,x) =13.0, -1.0
126
+
julia>besseli(v,x)
127
+
-1.9956316782072008e-14
128
+
129
+
julia> (v, x) =-14.0, -9.9
130
+
julia>besseli(v,x)
131
+
0.2892290867115618
132
+
133
+
julia> (v,x) =12.6, -3.0
134
+
julia>besseli(v,x)
135
+
ERROR: DomainError with -3.0:
136
+
Complex result returned for real arguments. Complex arguments are currently not supported
0 commit comments