2011-03-31, 08:16 PM
Ok I have a harder one now, I have to get the sine function, based on this equation:
![[Image: seno.png]](http://localhostr.com/file/zDUCRQj/seno.png)
the input variables are x and p, p being precision, where the difference between the abs of 2 consecutive values has to be lower than p for the thing to be precise.
Once again, ignore my annotations as they are in spanish, and there's a lot of them:#neutros y contadores
x: 0.5236
p: 0.01
output:0.500003192986
When I try it out, it looks like there's a problem with my 'frac' that goes to 0 and reaches an endless loop.
Any ideas on how to make it work?
![[Image: seno.png]](http://localhostr.com/file/zDUCRQj/seno.png)
the input variables are x and p, p being precision, where the difference between the abs of 2 consecutive values has to be lower than p for the thing to be precise.
Once again, ignore my annotations as they are in spanish, and there's a lot of them:#neutros y contadores
Spoiler
the example given to us is:x: 0.5236
p: 0.01
output:0.500003192986
When I try it out, it looks like there's a problem with my 'frac' that goes to 0 and reaches an endless loop.
Any ideas on how to make it work?

