Figure 3 shows a contour plot of the relative error in
K
0
,
j
K
0
K
ref
j
=K
ref
, where
K
0
(
x; y
) =
1
p
y
x
2
+
y
2
. The contour drawn with a solid line marks the b oundary of the region where
K
0
has
a relative error less than 10
4
. Other contours are shown by dotted lines. The dashed lines are
x
= 146
:
7
y
and
x
2
= 15100 + 40
y
3
:
6
y
2
which provide readily-calculated approximations to
this boundary. Figure 4 is a similar plot of
j
L
0
L
ref
j
=L
ref
where
L
0
(
x; y
) =
1
p
x
x
2
+
y
2
. The
dashed line is
x
= 146
:
7
y
which can be used as a b oundary to ensure the relative errors on
both
K
(
x; y
) and
L
(
x; y
) are less than 10
4
. Similar plots can be used to demonstrate that for
2
R
5, the region where the relative errors on b oth
K
0
(
x; y
) and
L
0
((
x; y
) are both less than
10
R
is bounded by the line
x
= 1
:
51 exp(1
:
144
R
)
y
.
Likewise, Figure 5 is a plot of
j
K
1
K
ref
j
=K
ref
where
K
1
(
x; y
) =
K
(
x; y
) calculated using the
W4 algorithm for Region I. The short-dashed lines are
x
= 14
:
67
y
and
x
2
= 164
4
:
3
y
1
:
8
y
2
which are suggested revised boundaries. The long-dashed line in b oth Figures 5 and 6 is
x
=
15
y
, the Region I b oundary used by Humlcek. Figure 6 is a plot of
j
L
1
L
ref
j
=L
ref
where
L
1
(
x; y
) =
L
(
x; y
) calculated using the W4 algorithm for Region I. Note the large relative error
for
x
5,
y <
10
6
. (The 10
2
contour in the gure deliberately exagerates the area concerned).
In this section of the domain the use of a computationally-demanding algorithm will have little
or no impact on the eciency of line-by-line applications. The short-dashed line is
x
= 14
:
67
y
as in Figure 5. It can b e demonstrated that for 2
R
5 and
y >
10
6
, the region where
the relative errors on b oth
K
1
(
x; y
) and
L
1
(
x; y
) are less than 10
R
is bounded by the line
x
= 1
:
6 exp(0
:
554
R
)
y
.
Figure 7 is a plot of
j
K
2
K
ref
j
=K
ref
where
K
2
(
x; y
) =
K
(
x; y
) calculated using the W4
algorithm for Region II. The short-dashed line is
x
= 6
:
8
y
and the long-dashed line is again the
Humlcek boundary,
x
= 5
:
5
y
. Both these boundaries include an area near the
y
axis where the
relative error is greater than 10
4
. Figure 8 is a plot of
j
L
2
L
ref
j
=L
ref
where
L
2
(
x; y
) =
L
(
x; y
)
calculated using the W4 algorithm for Region I I with the Humlcek b oundary shown with a long-
dashed line and
x
= 6
:
8
y
with a short dashed line. In this case no attempt has been made to
parameterise the position of the new boundary in terms of the required relative error. Instead
a single b oundary was chosen such that the relative error on b oth
K
2
(
x; y
) and
L
2
(
x; y
) is less
than 10
5
for
y >
10
6
.
Figure 9 is a plot of
j
K
3
K
ref
j
=K
ref
where
K
3
(
x; y
) =
K
(
x; y
) calculated using the W4
algorithm for Region II I. The long-dashed lines are again the Humlcek b oundaries,
x
= 5
:
5
y
and 0
:
195
x
= 0
:
176 +
y
. The short-dashed lines are
x
= 6
:
8
y
,
x
= 2
:
4
y
and
x
= 3
:
097
y
0
:
45,
the rst two of which, together with the
y
axis enclose a region where the relative error of
K
3
is
less than 10
5
. Figure 10 is a plot of
j
L
3
L
ref
j
=L
ref
where
L
3
(
x; y
) =
L
(
x; y
) calculated using
the W4 algorithm for Region I II with the Humlcek boundaries shown by long-dashed lines. The
short-dashed lines,
x
= 6
:
8
y
and
x
= 3
:
097
y
0
:
45 with the
y
axis enclose a region where the
relative error in both
K
3
and
L
3
is less than 10
5
.
The HUMLIK subroutine (with
R
= 4 and the calculation of
L
removed) was used in place
of code based on Schreier for some line-by-line calculations. Execution time was approximately
halved without loss of accuracy in the result.
The co de is deliberately written so that it can easily b e translated without loss of eciency
into other languages by those unfamiliar with Fortran. The '
&
' character is used only as a
statement continuation character. Comments are introduced either by a '
*
' character in column
1 or a '
!
' character in column 73. Upp er and lower case characters are regarded as equivalent.
Lines containing executable statements in lower case can b e removed for greater execution sp eed if
the calculation of
L
is not required. On some systems, extended precision arithmetic is no slower
than single precision. However, it should b e noted that re-co ding in extended precision and
increasing the precision of the constants used in the co de do es not give a signicant improvement
in the accuracy of the results.
4