Skip to content

uses scientific notation when not necessary #1

Description

@goldmanm

When inputting to_precision(132,2), I would expect it to return '130', but it actually gives '1.3e+2'. To my knowledge, both have the valid amount of significant figures, and the first one is easier to read. We might want to add a trailing zeros check.

I tried it on python 2.7 and 3.4 and got the same result.

Thanks so much for sharing this. I really like the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions