Skip to content

Commit c789a2c

Browse files
authored
bug on random/math_random removed (#732)
1 parent 632a179 commit c789a2c

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

javascript/latexContent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const title = `\\begin{titlepage}
3131
\\pagestyle{chapter-open}
3232
`;
3333

34-
export const preamble = `\\documentclass[nocrop,7x10]{../mitpress/mit}
34+
export const preamble = `\\documentclass[7x10]{../mitpress/mit}
3535
% use: option nocrop to remove cropmarks
3636
% also remember: hyperref in mitpress/mit.cls: switch to black/black/black (line 1851)
3737
%

xml/chapter3/section1/subsection2.xml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -539,16 +539,22 @@ function random_gcd_test(trials, initial_x) {
539539
<SCHEME>procedure</SCHEME>
540540
<JAVASCRIPT>function</JAVASCRIPT>
541541
</SPLITINLINE>
542-
implements this in terms of the <SCHEMEINLINE>random</SCHEMEINLINE>
542+
implements this in terms of the
543543
<SPLITINLINE>
544-
<SCHEME>procedure</SCHEME>
545-
<JAVASCRIPT>function</JAVASCRIPT>
544+
<SCHEME>
545+
<SCHEMEINLINE>random</SCHEMEINLINE>
546+
procedure
547+
</SCHEME>
548+
<JAVASCRIPT>
549+
<JAVASCRIPTINLINE>math_random</JAVASCRIPTINLINE>
550+
function
551+
</JAVASCRIPT>
546552
</SPLITINLINE>
547553
used in section<SPACE/><REF NAME="sec:primality"/>, which returns a
548-
nonnegative number less than its
554+
nonnegative number less
549555
<SPLITINLINE>
550556
<SCHEME>
551-
input.<FOOTNOTE>
557+
than its input.<FOOTNOTE>
552558
MIT Scheme
553559
<INDEX>MIT Scheme<SUBINDEX><ORDER>random</ORDER><SCHEMEINLINE>random</SCHEMEINLINE></SUBINDEX></INDEX>
554560
provides such a
@@ -565,7 +571,7 @@ function random_gcd_test(trials, initial_x) {
565571
decimal value.</FOOTNOTE>
566572
</SCHEME>
567573
<JAVASCRIPT>
568-
input.
574+
than<SPACE/>1.
569575
</JAVASCRIPT>
570576
</SPLITINLINE>
571577
<SNIPPET POSTPADDING="no">
@@ -581,7 +587,7 @@ function random_gcd_test(trials, initial_x) {
581587
<JAVASCRIPT>
582588
function random_in_range(low, high) {
583589
const range = high - low;
584-
return low + random(range);
590+
return low + math_random() * range;
585591
}
586592
</JAVASCRIPT>
587593
</SNIPPET>

0 commit comments

Comments
 (0)