#7682: Customize printing of real numbers
---------------------------+------------------------------------------------
Reporter: jason | Owner: AlexGhitza
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.5
Component: numerical | Keywords:
Author: Jason Grout | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by cwitty):
So do you propose eliminating the sci_not options to RealField?? Do you
propose eliminating the arguments to the str function?
Yes, my vote would be to eliminate sci_not in {{{RealField}}}. No, I
don't see any reason to eliminate the arguments to str(); if you want to
convert a single number to a string in some special way (with scientific
notation, say), then it's a lot easier to call
.str(scientific_notation='always') than to type something like:
{{{
old = sage.rings.real_mpfr._PRINT_OPTIONS['scientific_notation']
sage.rings.real_mpfr._PRINT_OPTIONS['scientific_notation'] = 'always'
foostr = foo.str()
sage.rings.real_mpfr._PRINT_OPTIONS['scientific_notation'] = old
}}}
Further comments:
I haven't really reviewed the actual patch, but I did just notice that the
new docstring for .str() has no doctests for no_sci. I think it should
end with something like:
{{{
TESTS:
Here we test the deprecated no_sci argument to .str()::
}}}
followed by the tests for no_sci that used to be there (assuming there
were some, I haven't actually checked).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7682#comment:34>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.