Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc doc-related changes #1051

Merged
merged 5 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ jobs:
pip install pyocr # from full
pip install -e .[dev]
make pytest gstest
make doctest
make doctest DOCTEST_OPTIONS="--exclude WordCloud"
# make check
15 changes: 6 additions & 9 deletions mathics/builtin/atomic/numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ class Precision(Builtin):
</dl>

<i>Note that the result could be slightly different than the obtained \
in WMA, due to differencs in the internal representation of the real numbers.</i>
in WMA, due to differences in the internal representation of the real numbers.</i>

The precision of an exact number, e.g. an Integer, is 'Infinity':

Expand All @@ -792,25 +792,22 @@ class Precision(Builtin):
>> Precision[0.5]
= MachinePrecision

In compound expressions, the 'Precision' is fixed by the number with
In compound expressions, the 'Precision' is fixed by the number with \
the lowest 'Precision':
>> Precision[{{1, 1.`},{1.`5, 1.`10}}]
= 5.

For non-zero Real values, it holds in general:

'Accuracy'[$z$] == 'Precision'[$z$] + 'Log'[$z$]
In general, 'Accuracy'[$z$] == 'Precision'[$z$] + 'Log'[$z$] \
for non-zero Real values:

>> (Accuracy[z] == Precision[z] + Log[z])/.z-> 37.`
= True

The case of `0.` values is special. Following WMA, in a Machine Real\
representation, the precision is set to 'MachinePrecision':
Following WMA, values in Machine Real representation starting with '0.' are values are special:
>> Precision[0.]
= MachinePrecision

On the other hand, for a Precision Real with fixed accuracy,\
the precision is evaluated to 0.:
On the other hand, for a Precision Real with fixed accuracy, the precision is evaluated to '0.':
>> Precision[0.``3]
= 0.

Expand Down
1 change: 1 addition & 0 deletions mathics/builtin/atomic/symbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ class Information(PrefixOperator):
<dt>'Information[$symbol$]'
<dd>Prints information about a $symbol$
</dl>

'Information' does not print information for 'ReadProtected' symbols.

'Information' uses 'InputForm' to format values.
Expand Down
Loading
Loading