title: Python: Calculate sine/cosine with a precision of up to 1 million digits
body: <p>Question is pretty self-explanatory. I've seen a couple of examples for pi but not for trigo functions. Maybe one could use a Taylor series <a href="https://stackoverflow.com/questions/19797951/calculate-sine-and-cosine-functions-with-precision">as done here</a> but I'm not entirely sure how to implement that in python. Especially how to store so many digits.
  I should mention: this ideally would run on vanilla python i.e. no numpy etc.</p>
  
  <p>Thanks!</p>
  
  <p>Edit: as said, I know the question has been asked before but it's in java and I was looking for a python implementation :)</p>
  
  <p>Edit 2: wow I wasn't aware people here can be so self-absorbed. I did try several approaches but none would work. I thought this a place you can ask for advice, guess I was wrong</p>
  
  <p>last edit: For anyone who might find this useful: many angles can be calculated as a multiple of sqrt(2), sqrt(3) and Phi (1.61803..) Since those numbers are widely available with a precision up to 10mio digits, it's useful to have them in a file and read them in your program directly</p>