Skip to content

Commit 5794483

Browse files
authored
fixes #1006 (#1041)
1 parent f495d48 commit 5794483

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

xml/chapter2/section4/subsection2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ function magnitude_rectangular(z) {
230230
square(imag_part_rectangular(z)));
231231
}
232232
function angle_rectangular(z) {
233-
return math_atan(imag_part_rectangular(z),
233+
return math_atan2(imag_part_rectangular(z),
234234
real_part_rectangular(z));
235235
}
236236
function make_from_real_imag_rectangular(x, y) {
@@ -297,7 +297,7 @@ function angle_polar(z) { return tail(z); }
297297
function make_from_real_imag_polar(x, y) {
298298
return attach_tag("polar",
299299
pair(math_sqrt(square(x) + square(y)),
300-
math_atan(y, x)));
300+
math_atan2(y, x)));
301301
}
302302
<ALLOW_BREAK/>
303303
function make_from_mag_ang_polar(r, a) {

xml/chapter2/section4/subsection3.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ function install_rectangular_package() {
362362
return math_sqrt(square(real_part(z)) + square(imag_part(z)));
363363
}
364364
function angle(z) {
365-
return math_atan(imag_part(z), real_part(z));
365+
return math_atan2(imag_part(z), real_part(z));
366366
}
367367
function make_from_mag_ang(r, a) {
368368
return pair(r * math_cos(a), r * math_sin(a));
@@ -508,7 +508,7 @@ function install_polar_package() {
508508
}
509509
function make_from_real_imag(x, y) {
510510
return pair(math_sqrt(square(x) + square(y)),
511-
math_atan(y, x));
511+
math_atan2(y, x));
512512
}
513513

514514
// interface to the rest of the system
@@ -1551,7 +1551,7 @@ function make_from_real_imag(x, y) {
15511551
: op === "magnitude"
15521552
? math_sqrt(square(x) + square(y))
15531553
: op === "angle"
1554-
? math_atan(y, x)
1554+
? math_atan2(y, x)
15551555
: error(op, "unknown op -- make_from_real_imag");
15561556
}
15571557
return dispatch;
@@ -1567,7 +1567,7 @@ function make_from_real_imag(x, y) {
15671567
: op === "magnitude"
15681568
? math_sqrt(square(x) + square(y))
15691569
: op === "angle"
1570-
? math_atan(y, x)
1570+
? math_atan2(y, x)
15711571
: error(op, "unknown op -- make_from_real_imag");
15721572
}
15731573
return dispatch;
@@ -1696,7 +1696,7 @@ function install_rectangular_package() {
16961696
square(imag_part(z)));
16971697
}
16981698
function angle(z) {
1699-
return math_atan(imag_part(z), real_part(z));
1699+
return math_atan2(imag_part(z), real_part(z));
17001700
}
17011701
function make_from_mag_ang(r, a) {
17021702
return pair(r * math_cos(a), r * math_sin(a));
@@ -1730,7 +1730,7 @@ function install_polar_package() {
17301730
}
17311731
function make_from_real_imag(x, y) {
17321732
return pair(math_sqrt(square(x) + square(y)),
1733-
math_atan(y, x));
1733+
math_atan2(y, x));
17341734
}
17351735

17361736
// interface to the rest of the system

xml/chapter2/section5/subsection2.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ function install_rectangular_package() {
481481
square(imag_part(z)));
482482
}
483483
function angle(z) {
484-
return math_atan(imag_part(z), real_part(z));
484+
return math_atan2(imag_part(z), real_part(z));
485485
}
486486
function make_from_mag_ang(r, a) {
487487
return pair(r * math_cos(a), r * math_sin(a));
@@ -515,7 +515,7 @@ function install_polar_package() {
515515
}
516516
function make_from_real_imag(x, y) {
517517
return pair(math_sqrt(square(x) + square(y)),
518-
math_atan(y, x));
518+
math_atan2(y, x));
519519
}
520520

521521
// interface to the rest of the system

0 commit comments

Comments
 (0)