Computer Science, asked by bhaumikpapri20, 1 month ago

Java Program
Write a program to use and implement the power function Double pow ( double x, int y) .
Do not use Math.pow()​
Pls don't spam. Answer fast

Answers

Answered by sumangurum08
0

Answer:

The java.lang.pow() is used to calculate a number raise to the power of some other number. This function accepts two parameters and returns the value of first parameter raised to the second parameter. There are some special cases as listed below:

If the second parameter is positive or negative zero then the result will be 1.0.

If the second parameter is 1.0 then the result will be same as that of the first parameter.

If the second parameter is NaN then the result will also be NaN.

Syntax:

public static double pow(double a, double b)

Parameter:

a : this parameter is the base

b : this parameter is the exponent.

Return :

This method returns ab.

Hope it helps you!!!!!!

Similar questions