HiLander | mot_: <HiLander> line 27 is wrong |

mot_ | see how i set n to the return value of int() ? how is 27 wrong? |

thermoplyae | Maybe 7 is too far out on the Taylor series Try something like .25 |

HiLander | also, i'm not seeing anythign wrong with intermediate computations |

mot_ | i know int i and inc() are the same, but like i said it's eventually going to be a recursive function |

HiLander | thermoplyae's comment is probably dead on |

mot_ | well i just have to be able to compute sin(x) |

thermoplyae | I love being dead on |

HiLander | then you better go farther than 5 |

mot_ | i'm testing it against the cmath library sin() function and my numbers are wildly, wildy off |

thermoplyae | Please try .25 :( |

HiLander | you certainly need that each term is less than 1, so you need (2n+1)! > X^(2n+1) |

ailndx | -1^n * X^(2n+1)/(2n+1)! is that some sine approximation formula? |

thermoplyae | ailndx: Taylor series |

whaleofconfusion | the problem is you are setting the result to X as HiLander has been saying |

mot_ | w00t i fixed it (by doing my iterations of the series) |

whaleofconfusion | also that your inc function is stupid |

mot_ | i was just doing 0-5, 0-10 gives a better (almost 99% accurate) approximation |

thermoplyae | I love being dead on |

mot_ | whaleofconfusion, yes, i know, but it will be useful when i re-write the function recursively. |

JabberWalkie | yeah!...stupid. |

whaleofconfusion | why would you want to write it recursively |

mot_ | because i have to (because my professor is douche) |

JabberWalkie | good reason |

HiLander | no, it makes sense it allows for precision to be handled on the fly |

whaleofconfusion | and you should not use the inc function |

HiLander | instead of ahead of time |

whaleofconfusion | you should just use i |

thermoplyae | hmm |

whaleofconfusion | C++ is not made for recursion |

thermoplyae | Seems like it would be faster to just shift the argument over into [-pi, pi] and then use the method he has now |

mot_ | amazing, it works i just needed to do more iterations |

thermoplyae | Rather than decide he needs to go out to the 101th term |