Skip to content

Fix to output of scientific notation for real interval field #13634

@tscrim

Description

@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)
0.025000000000000002?
sage: RIF.scientific_notation()
True
sage: RIF(0.025)
0.025000000000000002?
sage: RIF(0.025).str(no_sci=False)
'2.5000000000000002?e-2'

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

sage: RIF(0.025)
0.025000000000000002?
sage: RIF.scientific_notation(True)
sage: RIF(0.025)
2.5000000000000002?e-2

Component: misc

Keywords: real interval field

Author: Travis Scrimshaw

Reviewer: Robert Bradshaw

Merged: sage-5.5.beta1

Issue created by migration from https://trac.sagemath.org/ticket/13634

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions