Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hail] Export VCF floats using %g formatter #7745

Merged
merged 3 commits into from Dec 18, 2019

Conversation

@tpoterba
Copy link
Collaborator

tpoterba commented Dec 17, 2019

Fixes #6963.

%e vs %g:

scala> val big = 12345678910112d
big: Double = 1.2345678910112E13

scala> val small = 0.0000000000123123
small: Double = 1.23123E-11

scala> val medium = 1.12345
medium: Double = 1.12345

scala> Array(big, small, medium).foreach { x => println(x.formatted("%.5e")) }
1.23457e+13
1.23123e-11
1.12345e+00

scala> Array(big, small, medium).foreach { x => println(x.formatted("%.6g")) }
1.23457e+13
1.23123e-11
1.12345
Fixes #6963

%e vs %g:

```scala
scala> val big = 12345678910112d
big: Double = 1.2345678910112E13

scala> val small = 0.0000000000123123
small: Double = 1.23123E-11

scala> val medium = 1.12345
medium: Double = 1.12345

scala> Array(big, small, medium).foreach { x => println(x.formatted("%.5e")) }
1.23457e+13
1.23123e-11
1.12345e+00

scala> Array(big, small, medium).foreach { x => println(x.formatted("%.6g")) }
1.23457e+13
1.23123e-11
1.12345
```
@johnc1231

This comment has been minimized.

Copy link
Contributor

johnc1231 commented Dec 17, 2019

Needs a bump

tpoterba added 2 commits Dec 17, 2019
@danking danking merged commit eb89e4c into hail-is:master Dec 18, 2019
1 check passed
1 check passed
ci-test success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.