Opened 10 years ago

Closed 10 years ago

#13634 closed defect (fixed)

Fix to output of scientific notation for real interval field

Reported by: tscrim Owned by: tscrim
Priority: major Milestone: sage-5.5
Component: misc Keywords: real interval field
Cc: Merged in: sage-5.5.beta1
Authors: Travis Scrimshaw Reviewers: Robert Bradshaw
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

GitHub link to the corresponding issue

Description (last modified by tscrim)

Currently if you set scientific notation for the real interval field, it does not print in scientific notation.

sage: RIF.scientific_notation(True)
sage: RIF(0.025)
sage: RIF.scientific_notation()
sage: RIF(0.025)
sage: RIF(0.025).str(no_sci=False)

This is caused by not checking when no_sci option is None (and then checking the parent). After patch:

sage: RIF(0.025)
sage: RIF.scientific_notation(True)
sage: RIF(0.025)

Attachments (1)

trac_13634-RIF_sci_notation_fix-ts.patch (7.8 KB) - added by tscrim 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by tscrim

Status: newneeds_review

Please review.

comment:2 Changed 10 years ago by tscrim

Description: modified (diff)

comment:3 Changed 10 years ago by robertwb

Minor nit: I'd prefere "not no_sci" to "no_sci == False" in case the user passes a value like 0. But other than that, looks good (including the nice docstring cleanups).

comment:4 Changed 10 years ago by robertwb

Reviewers: Robert Bradshaw

Changed 10 years ago by tscrim

comment:5 Changed 10 years ago by tscrim

Changed. Thank you.

comment:6 Changed 10 years ago by robertwb

Status: needs_reviewpositive_review

comment:7 Changed 10 years ago by jdemeyer

Merged in: sage-5.5.beta1
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.