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

%064b format doesn't deal with negatives #3716

Closed
p6rt opened this issue Mar 4, 2015 · 6 comments
Closed

%064b format doesn't deal with negatives #3716

p6rt opened this issue Mar 4, 2015 · 6 comments

Comments

@p6rt
Copy link

@p6rt p6rt commented Mar 4, 2015

Migrated from rt.perl.org#123979 (status was 'resolved')

Searchable as RT123979$

@p6rt
Copy link
Author

@p6rt p6rt commented Mar 4, 2015

From @TimToady

printf "%064b", -100
00000000000000000000000000000000000000000000000000000000-1100100>

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Apr 11, 2015

From @usev6

In case someone else looks at this ticket​: I created a branch "sprintf" for nqp, in which I tried a first stab at the above problem (the evaluation works in the branch). I plan to look at other directives as well -- therefore the branch.

I also added a new test file S32-str/sprintf-b.t with in-depth tests for "%b" to roast (not in t/spectest.data in Rakudo, yet). Maybe I went to far with testing different combinations of flags, but the tests were helpful for me while working on sprintf.nqp.

Reviews/comments are very welcome.

--
Christian

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Apr 11, 2015

The RT System itself - Status changed from 'new' to 'open'

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Dec 1, 2017

From @AlexDaniel

It is actually fixed now​:

¦2015.12,b2fbf893db^​:
«00000000000000000000000000000000000000000000000000000000-1100100»

¦b2fbf89,HEAD(5929887)​:
«-000000000000000000000000000000000000000000000000000000001100100»

That comes from this bump​: (2017-11-13) rakudo/rakudo@b2fbf89

And in nqp repo it seems to be this merge​: Raku/nqp@a09c787

So the aforementioned sprintf branch was merged!

I think a test won't hurt.

On 2015-04-11 14​:29​:11, bartolin@​gmx.de wrote​:

In case someone else looks at this ticket​: I created a branch
"sprintf" for nqp, in which I tried a first stab at the above problem
(the evaluation works in the branch). I plan to look at other
directives as well -- therefore the branch.

I also added a new test file S32-str/sprintf-b.t with in-depth tests
for "%b" to roast (not in t/spectest.data in Rakudo, yet). Maybe I
went to far with testing different combinations of flags, but the
tests were helpful for me while working on sprintf.nqp.

Reviews/comments are very welcome.

Loading

@p6rt
Copy link
Author

@p6rt p6rt commented Dec 1, 2017

From @usev6

On Fri, 01 Dec 2017 10​:57​:33 -0800, alex.jakimenko@​gmail.com wrote​:

It is actually fixed now​:

¦2015.12,b2fbf893db^​:
«00000000000000000000000000000000000000000000000000000000-1100100»

¦b2fbf89,HEAD(5929887)​:
«-000000000000000000000000000000000000000000000000000000001100100»

That comes from this bump​: (2017-11-13)
rakudo/rakudo@b2fbf89

And in nqp repo it seems to be this merge​:
Raku/nqp@a09c787

So the aforementioned sprintf branch was merged!

I think a test won't hurt.

I've added a test for sprintf('%064b', -100) to S32-str/sprintf.t with commit Raku/roast@26cacb1

I'm closing this ticket as 'resolved'.

Loading

@p6rt p6rt closed this Dec 1, 2017
@p6rt
Copy link
Author

@p6rt p6rt commented Dec 1, 2017

@usev6 - Status changed from 'open' to 'resolved'

Loading

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

Successfully merging a pull request may close this issue.

None yet
1 participant