Problem with trigonometric functions in Lobster

What happens

I’m trying to do the problem #74 of codeabbey, but results with many decimals are a little bit different

What do you understand or find about that problem

For this problem, codeabbey results require to be calculated with an accuracy of 1e-7 or better. Trigonometric functions are defined as infinite series which results are more precise as long is the series. I think the precision developed for Lobster is not enough to achieve the codeabbey results

You make any workaround? What did you do?

I calculated the same in WolframAlpha manually and I got exactly the same results that are in codeabbey, so that’s why I think it’s a problem with the Lobster functions precision. I can’t develop my own trigonometric functions because if series are shorter the result could be different, and if are longer the result could be different too.


Codeabbey problem:

This is what I got
Screenshot from 2021-03-23 12-04-15

and what should be
Screenshot from 2021-03-23 12-02-58

And the operations I’m doing are


and you can check their results in

I need help with

I need to know what I should do, because I need the same values to submit successfully the problem, or if I should find another exercise because of the limitations of the functions.

Hi @season-embodiment,
I think that maybe you could implement an algorithm which using a numerical method as bisection, newton or another allowed you to get a more accurate result.

Here, you can find a theoretical explanation about bisection and newton methods which you could implement to get a nearer result to the expected one.