10.06.2016 Views

eldo_user

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Once assigned an initial value, variables can be reassigned with the = operator:<br />

set a = 2.0<br />

set b = 3.0<br />

a = a + b/2<br />

Eldo Control Language<br />

Statement Overview<br />

Note<br />

+=, -=, *=, /=, … operators are also available (a = a + b/2 is equivalent to writing a += b/2).<br />

Related Topics<br />

Variables<br />

Numbers<br />

Generally, numerical variables are double-precision floating point numbers. If a number is used<br />

as an index to address a vector, it is automatically truncated to a signed 32-bit integer.<br />

Scalar variables holding numbers are similar to (local) .PARAM in regular simulation syntax.<br />

The usual mathematical operators (+, -, *, /, %, **, ++, --, ==, !=, =, &&, ||, !) are<br />

available to form expressions using numbers. A library of mathematical functions is also<br />

available (sin(), cos(), abs(), and so on).<br />

The sensitive functions such as sqrt(), exp(), or log() are protected against floating-point<br />

overflows and so on. If for some reason it is still necessary to use the native exp() function, then<br />

the set of such native functions is available, prefixed with “unsafe_”. For example<br />

“unsafe_exp(1e300)” will blow up.<br />

exp() is calculated accurately until exp(80), beyond which, the function is extrapolated linearly.<br />

Related Topics<br />

Variables<br />

Library of Functions for Tasks<br />

Complex Numbers<br />

Complex numbers are also supported. Operators that work on complex numbers are: “+”, “-”,<br />

“*”, “/”, “++”, “--”, “==”, “!=”.<br />

Complex numbers can be created using the functions ritocomplex or mptocomplex or can be<br />

complex results of a simulation.<br />

Eldo® User's Manual, 15.3 823

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!