Skip to content

reconsider how floating point values are printed #960

@williamstein

Description

@williamstein
some f-p values are printed like integers, which may confuse the user
 (especially if one copies them with the mouse):
 sage: 2.0^46
 70368744177664.0
 sage: 2.0^47
 140737488355328
 I would expect '140737488355328.' or '1.40737488355328e14' in the 2nd case.
 By the way, typing 140737488355328.0 outputs itself, which is inconsistent,
 since 140737488355328.0-2.0^47 gives 0.0000000000000000.

 Compare also:
 sage: 2.0^99
 633825300114115000000000000000
 sage: 2.0^100
 1.26765060022823e30

My 2 cents,
Paul Z.

Component: basic arithmetic

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions