Trig functions in java
Calculating of PI from sin() function in Java - Mathematics Stack Exchange
When should I use the angle in radians or in degrees when calculating sine(angle)?
How do I, by hand, figure out what Sin(x) is ?
Videos
I was experimenting in bluej, and I found that trig functions take in radians as the unit. I know I can convert the answer to degrees, but that introduces a level of inaccuracy because pi is used, being an irrational number. Are there trig functions that have parameters that are measured in degrees and not radians?
Sorry, but this is not a good idea. The formula that you saw essentially expresses that $$\sin x\approx x$$ when $x$ is small, and the smaller $x$ the more exact the approximation. It is valid for angles in radians.
When the angles are in degrees, this relation becomes
$$\sin°x\approx \frac{\pi x}{180}$$ where $\sin°$ denotes the sine of an angle in radians. So you hope to evaluate
$$\pi\approx180\frac{\sin°x}x.$$
If the function $\sin°$ is not available, you will have to emulate it with an explicit conversion, using
$$\sin°x=\sin\frac{\pi x}{180},$$ so that
$$\pi\approx180\frac{\sin\dfrac{\pi x}{180}}x.$$
So, not only this does not allow you to compute $\pi$ as it requires preliminary knowlegde of $\pi$, but it will do that in a very inefficient and inaccurate way, actually replacing $cx/x$ by $\sin cx/x$. You will spend much energy to go round in circles.
Even when a $\sin°$ function is available, this approach is wrong because the $\sin°$ will do the conversion from degrees to radians anyway (using a hard-coded value of $\pi$), and you will have to use an angle so small that $\sin x=x$ numerically, and there is no more point computing the sine.
A less "schizophrenic" approach is using
$$\pi=4\arctan1$$ (in radians).
I am assuming your sin(x) function takes radians, as stated in the OP. Start by assigning x = 3 and then iterate the statement x = x + sin(x) a few times (three iterations should work well). When you are done, x will contain a good approximation to $\pi$.
How does it work? We are using "fixed point iteration" to approximate a root of $x = x + \sin(x)$ near $x = 3$. Reference: Wikipedia, "Fixed-point iteration"