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

infix:<%> should return Rat when it can in Rakudo #3409

Closed
p6rt opened this issue Jun 6, 2014 · 7 comments
Closed

infix:<%> should return Rat when it can in Rakudo #3409

p6rt opened this issue Jun 6, 2014 · 7 comments

Comments

@p6rt
Copy link

p6rt commented Jun 6, 2014

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

Searchable as RT122053$

@p6rt
Copy link
Author

p6rt commented Jun 6, 2014

From @masak

<xfix> r​: say 4.8 % 1
<camelia> rakudo-jvm 28d672​: OUTPUT«0.7999999999999998␤»
<camelia> ..rakudo-{parrot,moar} 28d672​: OUTPUT«0.8␤»
<masak> r​: say (4.8 % 1).WHAT
<camelia> rakudo-{parrot,jvm,moar} 28d672​: OUTPUT«(Num)␤»
<masak> why is that Num and not Rat?
<masak> r​: say (4.8 / 1).WHAT
<camelia> rakudo-{parrot,jvm,moar} 28d672​: OUTPUT«(Rat)␤»
<masak> if infix​:</> gives Rat, shouldn't infix​:<%>, too?
<masak> avoiding the 0.7999999999999998 above.
<moritz> IMHO it should follow the same "only use Num if there's
already one Num" philosophy
<masak> yeah.
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Nov 24, 2014

From @usev6

The behaviour hasn't changed​:

$ perl6 -e 'say (4.8 % 1).WHAT'
(Num)

I added a test (fudged 'todo') to S03-operators/arith.t with commit Raku/roast@aad869406e

1 similar comment
@p6rt
Copy link
Author

p6rt commented Nov 24, 2014

From @usev6

The behaviour hasn't changed​:

$ perl6 -e 'say (4.8 % 1).WHAT'
(Num)

I added a test (fudged 'todo') to S03-operators/arith.t with commit Raku/roast@aad869406e

@p6rt
Copy link
Author

p6rt commented Nov 24, 2014

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

@p6rt
Copy link
Author

p6rt commented Jan 13, 2015

From @usev6

This works now​:

$ perl6 -e 'say (4.8 % 1).WHAT'
(Rat)
$ perl6 -e 'say 4.8 % 1'
0.8

The tests in S03-operators/arith.t where unfudged with commit Raku/roast@95a6419afb

I'm closing this ticket now.

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 13, 2015

From @usev6

This works now​:

$ perl6 -e 'say (4.8 % 1).WHAT'
(Rat)
$ perl6 -e 'say 4.8 % 1'
0.8

The tests in S03-operators/arith.t where unfudged with commit Raku/roast@95a6419afb

I'm closing this ticket now.

@p6rt
Copy link
Author

p6rt commented Jan 13, 2015

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

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

No branches or pull requests

1 participant