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 numbers yields unwanted formatting #8445

Closed
XilinJia opened this issue Sep 23, 2014 · 3 comments
Closed

printing numbers yields unwanted formatting #8445

XilinJia opened this issue Sep 23, 2014 · 3 comments
Labels
regression Regression in behavior compared to a previous version

Comments

@XilinJia
Copy link

Just updated to reportedly 0.3.1 but displayed as 0.4.0-dev+543.

println to file now get something like the following. Is this intended? How can I get normal decimals?

162038.8f0,float16(160.2),0.26118204f0

A number like these messes up DataFrames, which considers it as a string which then can not be easily converted to a float. Any advice on what to do?

           _

_ _ ()_ | A fresh approach to technical computing
() | () () | Documentation: https://docs.julialang.org
_ _ | | __ _ | Type "help()" for help.
| | | | | | |/ ` | |
| | |
| | | | (
| | | Version 0.4.0-dev+543 (2014-09-11 13:47 UTC)
/ |_'|||__'| | Commit c79e349 (11 days old master)
|__/ | x86_64-linux-gnu

@ivarne
Copy link
Sponsor Member

ivarne commented Sep 23, 2014

A good advise is to post questions only one place, because the same people are likely to see the question both here and on julia-users. If you still think it is worth the additional noise, you should link the original issue so that we can check if the issue has already been resolved before spending time investigating.

@ivarne ivarne closed this as completed Sep 23, 2014
@JeffBezanson JeffBezanson reopened this Sep 23, 2014
@JeffBezanson JeffBezanson changed the title issues with println to file print yields unwanted formatting Sep 23, 2014
@JeffBezanson JeffBezanson added the regression Regression in behavior compared to a previous version label Sep 23, 2014
@JeffBezanson
Copy link
Sponsor Member

This is a regression probably due to the grisu change. There used to be a print(io,Float32) method in grisu.jl. That was removed and now print is falling back to show for numbers. cc @quinnj

@JeffBezanson JeffBezanson changed the title print yields unwanted formatting printing numbers yields unwanted formatting Sep 23, 2014
@quinnj quinnj closed this as completed in 48b89d6 Sep 23, 2014
JeffBezanson added a commit that referenced this issue Sep 23, 2014
Add back non-typed print methods for Float32/Float16. Fixes #8445
@ivarne
Copy link
Sponsor Member

ivarne commented Sep 23, 2014

@cnbiz Sorry I was too quick on the trigger. I thought I tested print on numbers of different types on 0.3, but it seems that I typed julia instead of ./julia so I got the new erroneous behavior, and thought that was how it had always been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

3 participants