#18077: fix log2 help
---------------------------------+------------------------
Reporter: rws | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.6
Component: documentation | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
---------------------------------+------------------------
Comment (by deinst):
Replying to [comment:3 kcrisman]:
> > On a not entirely unrelated note: The format of the help has changed
somewhat from what is written in the tutorial.
>
> Can you be more specific?
I thought I had answered this a while ago. Obviously I got distracted.
The tutorial help for tan (gotten locally from
`file:///Users/davideinstein/projects/sage/src/doc/output/html/en/tutorial/tour_help.html`
looks like:
{{{
sage: tan?
Type: <class 'sage.calculus.calculus.Function_tan'>
Definition: tan( [noargspec] )
Docstring:
The tangent function
EXAMPLES:
sage: tan(pi)
0
sage: tan(3.1415)
-0.0000926535900581913
sage: tan(3.1415/4)
0.999953674278156
sage: tan(pi/4)
1
sage: tan(1/2)
tan(1/2)
sage: RR(tan(1/2))
0.546302489843790
}}}
If I run `tan?` in sage 6.7 I get
{{{
Type: Function_tan
String form: tan
File: ~/projects/sage/local/lib/python2.7/site-
packages/sage/functions/trig.py
Docstring:
The tangent function.
EXAMPLES:
sage: tan(pi)
0
sage: tan(3.1415)
-0.0000926535900581913
sage: tan(3.1415/4)
0.999953674278156
sage: tan(pi/4)
1
sage: tan(1/2)
tan(1/2)
sage: RR(tan(1/2))
0.546302489843790
We can prevent evaluation using the "hold" parameter:
sage: tan(pi/4,hold=True)
tan(1/4*pi)
To then evaluate again, we currently must use Maxima via
"sage.symbolic.expression.Expression.simplify()":
sage: a = tan(pi/4,hold=True); a.simplify()
1
TESTS:
sage: conjugate(tan(x))
tan(conjugate(x))
sage: tan(complex(1,1)) # rel tol 1e-15
(0.2717525853195118+1.0839233273386946j)
Init docstring:
The tangent function.
EXAMPLES:
sage: tan(pi)
0
sage: tan(3.1415)
-0.0000926535900581913
sage: tan(3.1415/4)
0.999953674278156
sage: tan(pi/4)
1
sage: tan(1/2)
tan(1/2)
sage: RR(tan(1/2))
0.546302489843790
We can prevent evaluation using the "hold" parameter:
sage: tan(pi/4,hold=True)
tan(1/4*pi)
To then evaluate again, we currently must use Maxima via
"sage.symbolic.expression.Expression.simplify()":
sage: a = tan(pi/4,hold=True); a.simplify()
1
TESTS:
sage: conjugate(tan(x))
tan(conjugate(x))
sage: tan(complex(1,1)) # rel tol 1e-15
(0.2717525853195118+1.0839233273386946j)
Call docstring:
Wrapper around "BuiltinFunction.__call__()" which converts Python
>>``<<int``s which are returned by Ginac to Sage Integers.
This is needed to fix http://trac.sagemath.org/10133, where Ginac
evaluates "sin(0)" to the Python int "0":
sage: from sage.symbolic.function import BuiltinFunction
sage: out = BuiltinFunction.__call__(sin, 0)
sage: out, parent(out)
(0, <type 'int'>)
With this wrapper we have:
sage: out = sin(0)
sage: out, parent(out)
(0, Integer Ring)
However, if all inputs are Python types, we do not convert:
sage: out = sin(int(0))
sage: (out, parent(out))
(0, <type 'int'>)
sage: out = arctan2(int(0), float(1))
sage: (out, parent(out))
(0, <type 'int'>)
sage: out = arctan2(int(0), RR(1))
sage: (out, parent(out))
(0, Integer Ring)
}}}
The `Type:` is shorter. The module information is now in the new `File:`
line.
The `Definition:` has been kidnapped by aliens, possibly replaced by the
less informative `String Form:`.
The `Init Docstring` and `Call Docstring` have been added.
--
Ticket URL: <http://trac.sagemath.org/ticket/18077#comment:4>
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.