java - Why is math.pow not natively able to deal with ints? (floor/ceil, too) -


I know that in Java (and possibly in other languages), Math.pow is defined on doubles and one Double returns, I'm thinking that the people who wrote java on Earth did not even write an intern-returning method, which is a brainstorming programmer from mathematicians (though it is obviously easy to read Fixable)) I can not help defaults but it seems that CS Is based on Iltaon cause some behind the scenes who do not know me, because otherwise ... huh?

On the subject, the boundary and flooring by definition Returns integers, how do they return ints?

Thank you everyone for helping me understand this. It is completely mild, but has been annoying me for many years.

java.lang.Math is just a port of what the math library does.

For C, I think it comes down to the fact that the CPU has special instructions for the floating point number (but not for integers) for MOT POW.

Of course, the language can still add an int implementation is one in BigIntega, in fact this makes sense, because pow rather than the result Gives results in a large number.

Definition Returns integer ceiling and floor, then how they did not return Ints

Floating point number, int Can represent the integer outside. So if you take a double argument which is too big to fit in int , then it's a good idea to deal with floors Not the way.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -