# New Ticket Created by  Zoffix Znet 
# Please include the string:  [perl #127044]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127044 >


is-prime coerces its argument into an Int, which produces some false results:

<ZoffixWin> m: say is-prime (2.5)
<camelia> rakudo-moar 9441bb: OUTPUT«True␤»
<ZoffixWin> m: say is-prime '2.4242'
<camelia> rakudo-moar 9441bb: OUTPUT«True␤»

Relevant IRC conversation: http://irclog.perlgeek.de/perl6/2015-12-27#i_11785594

Code in question: 
https://github.com/rakudo/rakudo/blob/b69aa55c5ca36d1df2f5c837df86a9daa50164dc/src/core/Int.pm#L392

Reply via email to