Compare commits
No commits in common. "59563610888d79fb3b7b0a27217890036b703453" and "e45b9e8788eca2ed844a79f84d3382612ae0a1a6" have entirely different histories.
5956361088
...
e45b9e8788
3 changed files with 2 additions and 13 deletions
|
@ -9,9 +9,8 @@
|
||||||
I was stuck on how to actually implement the Taylor series without it
|
I was stuck on how to actually implement the Taylor series without it
|
||||||
getting far too big for even a long double, and I'm not sure I ever would
|
getting far too big for even a long double, and I'm not sure I ever would
|
||||||
have thought to just break it out recursively like this. Instead of each
|
have thought to just break it out recursively like this. Instead of each
|
||||||
term being x^n/n!, where we have to figure out both x^n and n!, both of which
|
term being x^n/n!, this says that it's (x/n+1)*(nth term), with a base case
|
||||||
could be massive, we instead say that it's (x/n+1)*(nth term), with a base
|
of x/1! = x. Pretty clever, really.
|
||||||
case (1st term) of x/1! = x. Pretty clever, really.
|
|
||||||
|
|
||||||
Also, really glad I know how to at least read a basic FORTRAN program. This
|
Also, really glad I know how to at least read a basic FORTRAN program. This
|
||||||
probably would have been a little more annoying if I didn't.
|
probably would have been a little more annoying if I didn't.
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
double sin(double x) {
|
|
||||||
return cos(x - M_PI_2);
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
#include <math.h>
|
|
||||||
|
|
||||||
double tan(double x) {
|
|
||||||
return (cos(x - M_PI_2) / cos(x))
|
|
||||||
}
|
|
Loading…
Reference in a new issue