posted 1 year ago

- 1

I'm trying to do this:

using java

I don't know if this is correct or not.

Anyone mind checking?

Here is my code:

using java

I don't know if this is correct or not.

Anyone mind checking?

Here is my code:

posted 1 year ago

Unfortunately, the ranch is a learning site. We are not here to do your homework.

I would recommend testing the two support methods first -- factorial() and power(). Then, after than test the sin() and cos(). For the latter, you can work out each polynomial on paper first (with your calculator), then add print statements in your code to make sure they match. If they don't, you can find the point where they stop matching as you are moving along the polynomial.

Henry

Lindsey Brooks wrote:

The answer is supposed to be 0.4794255 but I got a negative number. What did I do wrong?

Unfortunately, the ranch is a learning site. We are not here to do your homework.

I would recommend testing the two support methods first -- factorial() and power(). Then, after than test the sin() and cos(). For the latter, you can work out each polynomial on paper first (with your calculator), then add print statements in your code to make sure they match. If they don't, you can find the point where they stop matching as you are moving along the polynomial.

Henry