Predefined Functions - sincos
Description: Quite often one needs to calculate the sine and cosine of the same argument. Due to that, even processors have a special instruction which calculates the sine and cosine of an argument at once. This also has some speed advantage (depending on the processor). As such, ChaosPro now offers that function. Given a real argument ChaosPro calculates the sine and cosine of that argument. The result is stored in a complex number: The real part of that complex number contains the sine of the argument, and the imaginary part contains the cosine of the argument. So you typically write: cx=sincos(a); sin_a=real(cx); cos_a=imag(cx); |