Skip to content

Commit c953d2b

Browse files
committed
change name of mycos
1 parent 64d8488 commit c953d2b

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/besselj.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function besselj0(x::T) where T
6565

6666
# the following computes b = cos(x + xn) more accurately
6767
# see src/misc.jl
68-
b = mycos(x, xn)
68+
b = cos_sum(x, xn)
6969
return a * b
7070
end
7171
end
@@ -125,7 +125,7 @@ function besselj1(x::Float64)
125125

126126
# the following computes b = cos(x + xn) more accurately
127127
# see src/misc.jl
128-
b = mycos(x, xn)
128+
b = cos_sum(x, xn)
129129
return a * b
130130
end
131131
end

src/bessely.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function _bessely0_compute(x::Float64)
6969

7070
# the following computes b = sin(x + xn) more accurately
7171
# see src/misc.jl
72-
b = mysin(x, xn)
72+
b = sin_sum(x, xn)
7373
return a * b
7474
end
7575
end
@@ -133,7 +133,7 @@ function _bessely1_compute(x::Float64)
133133

134134
# the following computes b = sin(x + xn) more accurately
135135
# see src/misc.jl
136-
b = mysin(x, xn)
136+
b = sin_sum(x, xn)
137137
return a * b
138138
end
139139
end

src/misc.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# function to more accurately compute cos(x + xn)
2-
# when x >> xn
32
# see https://github.com/heltonmc/Bessels.jl/pull/13
43
# written by @oscardssmith
5-
function mycos(x, xn)
4+
function cos_sum(x, xn)
65
s = x + xn
76
n, r = Base.Math.rem_pio2_kernel(s)
87
lo = r.lo - ((s - x) - xn)
@@ -20,7 +19,7 @@ function mycos(x, xn)
2019
end
2120
end
2221
# function to more accurately compute sin(x + xn)
23-
function mysin(x, xn)
22+
function sin_sum(x, xn)
2423
s = x + xn
2524
n, r = Base.Math.rem_pio2_kernel(s)
2625
lo = r.lo - ((s - x) - xn)
@@ -36,4 +35,4 @@ function mysin(x, xn)
3635
else
3736
return -Base.Math.cos_kernel(y)
3837
end
39-
end
38+
end

0 commit comments

Comments
 (0)