id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc	lang	patch	platform
1284	Integer PMC missing math methods	coke	whiteknight	"IMO, this code:

{{{
.sub main
  $P1 = box 1.0
  $N1 = $P1.'exp'()
  say $N1
  $P1 = box 1
  $N1 = $P1.'exp'()
  say $N1
.end
}}}

should print 
2.71828182845905
2.71828182845905

... but it dies with:

{{{
2.71828182845905
Method 'exp' not found for invocant of class 'Integer'
}}}

Clearly, exp isn't defined on Integer, but IMO, all the math methods defined on Float should be defined on Integer. (otherwise, given an arbitrary numeric PMC, we have to jump through hoops.

(Alternatively, we can remove these methods from the Float PMC and rely on the opcodes.)

This becomes even more confusing when you take in the morphing of the core types - a PMC that was a Float can morph into an Integer which is then unable to invoke the various methods.

This issue was originally opened as http://rt.perl.org/rt3/Ticket/Display.html?id=38896"	todo	assigned	normal		core	master	medium						all
