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

You get -0 when dealing with Num, but just 0 when dealing with Int in Rakudo #1662

Closed
p6rt opened this issue Apr 5, 2010 · 4 comments
Closed
Labels

Comments

@p6rt
Copy link

p6rt commented Apr 5, 2010

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

Searchable as RT74070$

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

From @masak

<masak> rakudo​: say -0; say -"0"
<p6eval> rakudo 38db52​: OUTPUT«0␤-0␤»
* masak submits rakudobug
<masak> :D
<ash_> rakudo​: say -+"0";
<p6eval> rakudo 38db52​: OUTPUT«-0␤»
<jnthn> rakudo​: say -0.0;
<p6eval> rakudo 38db52​: OUTPUT«0␤»

It's possible that this is actually "correct" behavior, and that the
actual bug is that prefix​:<+> and prefix​:<-> return Num when they can
return Int. If so, feel free to close this ticket.

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

From @moritz

On Mon Apr 05 10​:00​:03 2010, masak wrote​:

<masak> rakudo​: say -0; say -"0"
<p6eval> rakudo 38db52​: OUTPUT«0␤-0␤»
* masak submits rakudobug
<masak> :D
<ash_> rakudo​: say -+"0";
<p6eval> rakudo 38db52​: OUTPUT«-0␤»
<jnthn> rakudo​: say -0.0;
<p6eval> rakudo 38db52​: OUTPUT«0␤»

It's possible that this is actually "correct" behavior,

I think it is. Floating point numbers spec +0.0 and -0.0, integers not.

and that the
actual bug is that prefix​:<+> and prefix​:<-> return Num when they can
return Int. If so, feel free to close this ticket.

Yes, we have another ticket for that, so no need to keep this one open.

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

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

@p6rt
Copy link
Author

p6rt commented Apr 5, 2010

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

@p6rt p6rt closed this as completed Apr 5, 2010
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant