ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Functions
Arithmetic
Conversion
Color
Trigonometric
sin
cos
sincos
tan
cotan
sinh
cosh
tanh
cotanh
asin
acos
atan
acot
asinh
acosh
atanh
acoth
exp
ln
log
log10
atan2
arg
cosxx
Miscellaneous
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Predefined Functions - sincos

Function name:sincos - Calculate sine and cosine
Synopsis:sincos(x)

Input data type Output data type
real complex
complex unsupported
quaternion unsupported


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);