-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
printf: fix "%.0f" formatting bug [closes #1081]
- Loading branch information
1 parent
8f45f12
commit a6ad7ef
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a6ad7ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure if it was this commit that did it, but now the sprintf statement in my code is broken. Here is the error:
in anonymous: int_dec not defined
in anonymous at no file
in fprintf at printf.jl:774
in fprintf at printf.jl:775
in sprint at io.jl:265
in sprint at io.jl:269
in sprintf at printf.jl:777
The sprintf call looks like this:
sprintf( "*** %4d %4d %4d %4d %4d %4d\tMAP = %.3f\t%.3f\t%.3f\t%s", iter1, iter2,
tries, wind, shft, size( pssm, 1 ), best_MAP, MAP, best_MAP_2, pssm_string )
where best_MAP, MAP, and best_MAP_2 are all Floats.
git-reset -ing back to the commit right before this one fixes the error.
a6ad7ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, sorry about that. I actually just introduced a new printf interface in 04f542d. Basically, just stick an
@
sign in front of that call and you should be all good (and much, much faster too). Let me know if it works.a6ad7ef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, also, it wasn't this commit that caused the problem, but rather, 0213f82. Close enough.