Skip to content

Commit 3cd65ab

Browse files
committed
Fix the docs
1 parent b5c607e commit 3cd65ab

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

src/bicgstabl.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ For BiCGStab(l) this is a less dubious term than "number of iterations";
159159
- `abstol::Real = zero(real(eltype(b)))`,
160160
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
161161
tolerance for the stopping condition
162-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
163-
is the residual in the `k`th iteration;
162+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k A * x_k - b`
163+
is the approximate residual in the `k`th iteration;
164164
!!! note
165165
1. The true residual norm is never computed during the iterations,
166166
only an approximation;

src/cg.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,11 @@ cg(A, b; kwargs...) = cg!(zerox(A, b), A, b; initially_zero = true, kwargs...)
181181
- `abstol::Real = zero(real(eltype(b)))`,
182182
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
183183
tolerance for the stopping condition
184-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
185-
is the residual in the `k`th iteration;
184+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k ≈ A * x_k - b`
185+
is approximately the residual in the `k`th iteration.
186+
!!! note
187+
The true residual norm is never explicitly computed during the iterations
188+
for performance reasons; it may have accumulate rounding errors.
186189
- `maxiter::Int = size(A,2)`: maximum number of iterations;
187190
- `verbose::Bool = false`: print method information;
188191
- `log::Bool = false`: keep track of the residual norm in each iteration.

src/chebyshev.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Solve Ax = b for symmetric, definite matrices A using Chebyshev iteration.
120120
- `abstol::Real = zero(real(eltype(b)))`,
121121
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
122122
tolerance for the stopping condition
123-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
123+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
124124
is the residual in the `k`th iteration;
125125
- `maxiter::Int = size(A, 2)`: maximum number of inner iterations of GMRES;
126126
- `Pl = Identity()`: left preconditioner;

src/gmres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Solves the problem ``Ax = b`` with restarted GMRES.
156156
- `abstol::Real = zero(real(eltype(b)))`,
157157
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
158158
tolerance for the stopping condition
159-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
159+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
160160
- `restart::Int = min(20, size(A, 2))`: restarts GMRES after specified number of iterations;
161161
- `maxiter::Int = size(A, 2)`: maximum number of inner iterations of GMRES;
162162
- `Pl`: left preconditioner;

src/idrs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ shadow space.
2727
- `abstol::Real = zero(real(eltype(b)))`,
2828
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
2929
tolerance for the stopping condition
30-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
30+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
3131
is the residual in the `k`th iteration;
3232
- `maxiter::Int = size(A, 2)`: maximum number of iterations;
3333
- `log::Bool`: keep track of the residual norm in each iteration;

src/minres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Solve Ax = b for (skew-)Hermitian matrices A using MINRES.
178178
- `abstol::Real = zero(real(eltype(b)))`,
179179
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
180180
tolerance for the stopping condition
181-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
181+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
182182
is the residual in the `k`th iteration
183183
!!! note
184184
The residual is computed only approximately.

src/qmr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ Solves the problem ``Ax = b`` with the Quasi-Minimal Residual (QMR) method.
240240
- `abstol::Real = zero(real(eltype(b)))`,
241241
`reltol::Real = sqrt(eps(real(eltype(b))))`: absolute and relative
242242
tolerance for the stopping condition
243-
`|r_k| / |r_0| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
243+
`|r_k| ≤ max(reltol * resnorm, abstol)`, where `r_k = A * x_k - b`
244244
- `log::Bool`: keep track of the residual norm in each iteration;
245245
- `verbose::Bool`: print convergence information during the iteration.
246246

0 commit comments

Comments
 (0)