Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

hrs: kill exponential notation #2370

Open
aboodman opened this issue Aug 15, 2016 · 4 comments
Open

hrs: kill exponential notation #2370

aboodman opened this issue Aug 15, 2016 · 4 comments
Assignees

Comments

@aboodman
Copy link
Contributor

aboodman commented Aug 15, 2016

OK after living with this for awhile, the exponential notation in the human readable serialization (output of tools like noms show, and noms diff) is basically never useful and doesn't get easier to read. And in most cases it's more characters anyway. Let's just print out the value in the normal human way.

@kalman
Copy link
Contributor

kalman commented Aug 18, 2016

@arv pointed out, and after looking at the patch, the numbers still look weird in some circumstances.

Observation #1: Part of the weirdness is that numbers like 1200000 get turned into 1.2e6. It would look better, if perhaps unscientific, to render it as 12e5.
Observation #2: Exponents are most useful in powers of 3, so 1200000 get turned into 1200e3.
Observation #3: By default Go turns anything > 1e6 into an exponent.

Strawman: what if the formatting were: render only an exponent which is a multiple of 3, if that number is >6 or <-6, and don't break up large numbers into decimals.

@aboodman
Copy link
Contributor Author

I think we should just alway spell the number out long form. No exponential notation ever.

There are cases where this will be ridiculous but we can solve them later when someone asks. In 99.9999999% of cases (note, not 9.999999%e1) just showing number in normal human way will be most useful.

@kalman
Copy link
Contributor

kalman commented Aug 18, 2016

Ok. I have a patch for this.

@aboodman
Copy link
Contributor Author

aboodman commented Sep 3, 2017

Isn't this done now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants