Saturday, November 27, 2010

Java Tutorial #6

0
More of Math Class Function in Java Programming

Build in Function for Ceiling and Floor Value
  Math.ceil(value); , Math.floor(value); is the reserved words for finding the ceiling and the floor value.  This is also known as nearest value function.  This can find the nearest up and down value of a number.  Consider the example below.

Build in Function for Power
   One of the commonly used function in Java is the Power function.  Usually used for exponential functions and inverse function mainly concerned for trigonometry functions.  Math.pow(base, exponent); is the reserved word for it.  See example below.

Build in Function for Square Root
    Also the same with the Power function this is one of the easiest yet most applicable function widely used today.  Mainly this is concerned for different mathematical computation.  Math.sqrt(value); is the reserved word for it.



You can now explore some of the Math class by using them one by one. Hope this topic helps you out.

No Response to "Java Tutorial #6"

Post a Comment