Skip to content
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

Fix some typos #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ The authors release the source codes associated with the Paper
under terms of the GNU Lesser General Public License version 2
or any later version, OR under the Apache License, Version 2.0.

A custom in the scientific comunity is (regardless of the licence
A custom in the scientific community is (regardless of the licence
you chose to use or distribute this software under)
that if this code was important in the scientific process or
for the results of your scientific work, we kindly ask you for the
appropriate citation of the Paper (Skowron & Gould 2012), and
we would be greatful if you pass the information about
we would be grateful if you pass the information about
the proper citation to anyone whom you redistribute this software to.


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ License or the GNU Lesser General Public License version 3 or any later version,
at your option. These are the same licenses used by the General Complex
Polynomial Root Solver.

A custom in the scientific comunity is (regardless of the licence you chose to
A custom in the scientific community is (regardless of the licence you chose to
use or distribute this software under) that if this code was important in the
scientific process or for the results of your scientific work, we kindly ask you
for the **appropriate citation** of the paper Skowron & Gould 2012
(http://arxiv.org/abs/1203.1034), and we would be greatful if you pass the
(http://arxiv.org/abs/1203.1034), and we would be grateful if you pass the
information about the proper citation to anyone whom you redistribute this
software to.

Expand Down
22 changes: 11 additions & 11 deletions src/PolynomialRoots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
# (http://www.astrouw.edu.pl/~jskowron/cmplx_roots_sg/) by Jan Skowron and
# Andrew Gould.
#
# A custom in the scientific comunity is (regardless of the licence you chose to
# A custom in the scientific community is (regardless of the licence you chose to
# use or distribute this software under) that if this code was important in the
# scientific process or for the results of your scientific work, we kindly ask
# you for the appropriate citation of the paper Skowron & Gould 2012 (see
# below), and we would be greatful if you pass the information about the proper
# below), and we would be grateful if you pass the information about the proper
# citation to anyone whom you redistribute this software to.
#
### References:
Expand Down Expand Up @@ -200,7 +200,7 @@ function newton_spec(poly::AbstractVector{Complex{T}}, degree::Integer,
c_zero = zero(Complex{T})
stopping_crit2 = zero(promote_type(T,E))
for i = 1:MAX_ITERS
# Prepare stoping criterion. Calculate value of polynomial and its
# Prepare stopping criterion. Calculate value of polynomial and its
# first two derivatives
if mod(i, 10) == 1 # Calculate stopping criterion every ten iterations
p, dp, ek = eval_poly_der_ek(root, poly, degree, c_zero)
Expand Down Expand Up @@ -263,7 +263,7 @@ function laguerre(poly::AbstractVector{Complex{T}}, degree::Integer,
two_n_div_n_1 = 2 / n_1_nth
c_one_nth = complex(one_nth)
for i = 1:MAX_ITERS
# calculate value of polynomial and its first two derivatives and prepare stoping
# calculate value of polynomial and its first two derivatives and prepare stopping
# criterion
p, dp, d2p_half, ek = eval_poly_der2_ek(root, poly, degree, c_zero)
iter=iter+1
Expand Down Expand Up @@ -294,7 +294,7 @@ function laguerre(poly::AbstractVector{Complex{T}}, degree::Integer,
denom = c_one_nth - n_1_nth*denom_sqrt
end
end
if denom == 0 # test if demoninators are > 0.0 not to divide by zero
if denom == 0 # test if denominators are > 0.0 not to divide by zero
dx::Complex{T} = (abs(root) + 1) * cis(T(FRAC_JUMPS[trunc(Integer, mod(i,FRAC_JUMP_LEN)) + 1]) * 2 * pi) # make some random jump
else
dx = fac_netwon / denom
Expand Down Expand Up @@ -342,7 +342,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
for i = 1:MAX_ITERS
lasti = i
# calculate value of polynomial and its first two derivatives and prepare
# stoping criterion
# stopping criterion
p, dp, d2p_half, ek = eval_poly_der2_ek(root, poly, degree, c_zero)
abs2p = abs2(p)
iter = iter + 1
Expand Down Expand Up @@ -381,7 +381,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
denom = c_one_nth - n_1_nth*denom_sqrt
end
end
if denom == 0 #test if demoninators are > 0.0 not to divide by zero
if denom == 0 # test if denominators are > 0.0 not to divide by zero
dx = (abs(root) + 1) * cis(T(FRAC_JUMPS[trunc(Integer, mod(i,FRAC_JUMP_LEN)) + 1]) * 2 * pi) # make some random jump
else
dx = fac_netwon / denom
Expand Down Expand Up @@ -417,7 +417,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
lasti = i
# calculate value of polynomial and its first two derivatives
if mod(i - j, 10) == 0
# prepare stoping criterion
# prepare stopping criterion
p, dp, d2p_half, ek = eval_poly_der2_ek(root, poly, degree, c_zero)
stopping_crit2 = abs2(epsilon*ek)
else
Expand All @@ -441,7 +441,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
else
good_to_go = false # reset if we are outside the zone of the root
end
if dp == 0 #test if demoninators are > 0.0 not to divide by zero
if dp == 0 #test if denominators are > 0.0 not to divide by zero
dx = (abs(root) + 1) * cis(T(FRAC_JUMPS[trunc(Integer, mod(i,FRAC_JUMP_LEN)) + 1]) * 2 * pi) # make some random jump
else
fac_netwon = p / dp
Expand Down Expand Up @@ -480,7 +480,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
if mode == 0 # NEWTON'S METHOD
for i = j:j+10 # do only 10 iterations the most, then go back to full Laguerre's
# calculate value of polynomial and its first two derivatives
if i == j # calculate stopping crit only once at the begining
if i == j # calculate stopping crit only once at the beginning
p, dp, ek = eval_poly_der_ek(root, poly, degree, c_zero)
stopping_crit2 = abs2(epsilon*ek)
else #
Expand All @@ -504,7 +504,7 @@ function laguerre2newton(poly::AbstractVector{Complex{T}}, degree::Integer,
else
good_to_go = false # reset if we are outside the zone of the root
end
if dp == 0 # test if demoninators are > 0.0 not to divide by zero
if dp == 0 # test if denominators are > 0.0 not to divide by zero
dx = (abs(root) + 1) * cis(T(FRAC_JUMPS[trunc(Integer, mod(i,FRAC_JUMP_LEN)) + 1]) * 2 * pi) # make some random jump
else
dx = p / dp
Expand Down