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

printf printing beyond bounds #8954

Closed
christarazi opened this issue Nov 9, 2014 · 2 comments
Closed

printf printing beyond bounds #8954

christarazi opened this issue Nov 9, 2014 · 2 comments

Comments

@christarazi
Copy link

As I was playing around with Arbitrary Precision Arithmetic and tried to print sqrt(2), julia began to return strings way beyond its relevant scope.

Code:

with_bigfloat_precision(2048) do
    x = BigFloat(sqrt(2))
    @printf("%.1024f", x)
end

This would return:
screenshot from 2014-11-09 14 06 32

Setting printf to print up to 10,000 will print a section of the documentation, really strange.

@christarazi christarazi changed the title printf printing beyonds bounds printf printing beyond bounds Nov 9, 2014
@nolta nolta closed this as completed in a015cce Nov 10, 2014
@ivarne
Copy link
Member

ivarne commented Nov 10, 2014

This seems like an obvious @JuliaBackports

nolta added a commit that referenced this issue Nov 19, 2014
backport of a015cce
Conflicts:
	base/printf.jl
@tkelman
Copy link
Contributor

tkelman commented Nov 19, 2014

backported in 76522d7

waTeim pushed a commit to waTeim/julia that referenced this issue Nov 23, 2014
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

3 participants