#1678: minor doc fixes from a long-ago email
---------------------------------+-----------------------------
Reporter: was | Owner: tba
Type: defect | Status: new
Priority: major | Milestone: sage-wishlist
Component: documentation | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+-----------------------------
Changes (by kcrisman):
* upstream: => N/A
Comment:
20 - doesn't crash, though very long hang, probably because it has an
incredibly naive algorithm. See #17372.
19 - ??? I think I know what is meant, though.
{{{
sage: X = 100000000000000000000000000000000000000000000000000^2+1
sage: s = RealField(5000)(X).sqrt()
sage: print "%.4f"%s
100000000000000007629769841091887003294964970946560.0000 # really not
close to the square root
sage: RealField(5000)(X)
1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e100
sage: _.sqrt()
1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000049999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000062499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999996093750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000273437499999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999979492187500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001611328124999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999869079589843750000000000000000000000000000000000000000000000000000000000000000000000000000000000000010910034179687499999999999999999999999999999999999999999999999999999999999999999999999999999999999999072647094726562500000000000000000000000000000000000000000000000000000000000000000000000000000000000080089569091796874999999999999999999999999999999999999999999999999999999999999999999999999999999999992992162704467773437500000000000000000000000000000000000000000000000000000000000000000000000000000000619924068450927734374999999999999999999999999999999999999999999999999999999999999999999999999999999944649636745452880859375000000000000000000000000000000000000000000000000000000000000000000000000000005e50
sage: _^2
1.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e100
}}}
Well, that's what you get when you do float formatting, as it's not a
float. In fact,
{{{
print "%f"%100000000000000000000000000000000000000000000000000
}}}
so invalid, or at least not fixable by us, I think.
18 - this is a pure Python error which we could in principle try to catch,
but there are SO many places you'd have to do it. I think wontfix.
17 - valid and truly a problem in many interesting places. I don't know
how to fix that other than education, though; removing "range" from
everywhere is not so good. This has been discussed before, whether
`srange` or `range` is better - well, each has its uses.
16 - I can't reproduce this, and with formatting it's buyer beware, I
think, as that is not a "basic" thing in Sage, but rather for people who
actually know something about programming.
{{{
sage: print "N = %d"
%1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111112222222222222
N =
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000111111112222222222222
}}}
15 - absolutely, http://sagemath.org/doc/tutorial/interactive_shell.html
#timing-commands should have timeit mentioned.
10 - This is really no longer valid, the tutorial has changed so much.
9 - I don't know what this means, but it is true that there are external
links to Python docs. In principle, we could include them - see #10831 -
but I don't think that is necessary here.
11 - I guess we could add an example for `sqrt(2.)` or `sqrt(4.)`.
12 - I don't get this question.
13 - this is tab-completion. Perhaps that didn't exist yet then.
14 - no longer valid for `sqrt` and we are making progress updating doc in
cases where it might be valid, way too big for any one ticket.
----
Summary of what could still be done here:
* Education on range versus srange
* Mention `timeit` in the tutorial
* Include example in `sqrt` for `sqrt(2.)` or `sqrt(4.)` or both
--
Ticket URL: <http://trac.sagemath.org/ticket/1678#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.