Skip to content

Commit 3b62578

Browse files
committed
Small doc tweak in SetDelayed; fix test msg typo
1 parent 7464033 commit 3b62578

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

mathics/builtin/assignment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ class SetDelayed(Set):
550550
= p[3]
551551
>> f[-3]
552552
= f[-3]
553-
It also works if the condition is set in the LHS
553+
It also works if the condition is set in the LHS:
554554
>> F[x_, y_] /; x < y /; x>0 := x / y;
555555
>> F[x_, y_] := y / x;
556556
>> F[2, 3]

mathics/builtin/compilation.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ class Compile(Builtin):
2323
<dd>Compiles assuming each $xi$ matches type $ti$.
2424
</dl>
2525
26+
Compilation is performed using llvmlite , or Python's builtin
27+
"compile" function.
28+
29+
2630
>> cf = Compile[{x, y}, x + 2 y]
2731
= CompiledFunction[{x, y}, x + 2 y, -CompiledCode-]
2832
>> cf[2.5, 4.3]
@@ -59,8 +63,7 @@ class Compile(Builtin):
5963
#> cf[0, -2]
6064
= 0.5
6165
62-
Loops and variable assignments are supported as python (not llvmlite)
63-
functions
66+
Loops and variable assignments are supported usinv Python builtin "compile" function:
6467
>> Compile[{{a, _Integer}, {b, _Integer}}, While[b != 0, {a, b} = {b, Mod[a, b]}]; a] (* GCD of a, b *)
6568
= CompiledFunction[{a, b}, a, -PythonizedCode-]
6669
"""

mathics/builtin/numeric.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ class NIntegrate(Builtin):
419419
"""
420420
<dl>
421421
<dt>'NIntegrate[$expr$, $interval$]'
422-
<dd>returns a numeric approximation to the definite integral of $expr$ with limits $iterval and with a precision of $prec$ digits.
422+
<dd>returns a numeric approximation to the definite integral of $expr$ with limits $interval$ and with a precision of $prec$ digits.
423423
424424
<dt>'NIntegrate[$expr$, $interval1$, $interval2$, ...]'
425425
<dd>returns a numeric approximation to the multiple integral of $expr$ with limits $interval1$, $interval2$ and with a precision of $prec$ digits.
@@ -433,7 +433,7 @@ class NIntegrate(Builtin):
433433
= 2.50663
434434
435435
>> Table[1./NIntegrate[x^k,{x,0,1},Tolerance->1*^-6], {k,0,6}]
436-
: The especified method failed to return a number. Falling back into the internal evaluator.
436+
: The specified method failed to return a number. Falling back into the internal evaluator.
437437
= {1., 2., 3., 4., 5., 6., 7.}
438438
439439
>> NIntegrate[1 / z, {z, -1 - I, 1 - I, 1 + I, -1 + I, -1 - I}, Tolerance->1.*^-4]

0 commit comments

Comments
 (0)