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

[printing] Sufficiently long (npi) Doubles print w/ no decimal point #98

Open
harold opened this issue Apr 18, 2024 · 3 comments
Open

Comments

@harold
Copy link
Collaborator

harold commented Apr 18, 2024

(def ^:dynamic *number-format* "%.4G")

This line leads to this unexpected (to Carsten and I) result:

user> (tech.v3.datatype.pprint/format-object (Double. 1.0))
"1.000"
user> (tech.v3.datatype.pprint/format-object (Double. 11.0))
"11.00"
user> (tech.v3.datatype.pprint/format-object (Double. 111.0))
"111.0"
user> (tech.v3.datatype.pprint/format-object (Double. 1111.0))
"1111"

Which in turn leads to some strange printing of columns in TMD.

@harold
Copy link
Collaborator Author

harold commented Apr 18, 2024

@behrica
Copy link
Contributor

behrica commented Apr 18, 2024

what is funny", that for larger number it works "somehow":

(tech.v3.datatype.pprint/format-object (Double. 12345.0))
"1.235E+04"

So it is precisely on number which have "4-digits dot 1-digit"

@behrica
Copy link
Contributor

behrica commented Apr 18, 2024

Main issue is "confusion" about the column type when "looking" at print of a printed dataset/column

My case was especially confusing, because it had column type "object",
so it took me a while to see that object was "java.lang.Double" and not "java.lang.Integer"

I had row filters with predicates like this (= 2016 ....) and could not understand why they do not work.

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

No branches or pull requests

2 participants