Functions, prefixes, and algebraic operators

Equations and parameters

You can use equations wherever you can enter a numeric value. For example, you can write equations in the Edit Dimensions dialog box, feature dialog boxes, and the Parameters dialog box. Equations can vary in complexity, and you can use them to calculate feature sizes, calculate assembly constraints offsets or angles, or simulate motion among several components.

Equations can be simple or contain many algebraic operators, prefixes, and functions. For example, here is a simple equation:

2 ul *(6+3)

The following complex equation uses internal parameters such as pi:

(PI rad/5 ul +(25 deg *PI rad)/180 deg))

Algebraic operators

The following are the algebraic operators supported by ProdName.

+
addition
-
subtraction
%
floating point modulo
*
multiplication
/
division
^
power
( or )
expression delimiters
;
delimiter for multi-argument functions

Unit prefixes

The following table lists the unit prefixes supported by ProdName.

exa
Symbol E

Value1.0e18

peta
Symbol P

Value1.0e15

tera
Symbol T

Value 1.0e12

giga
Symbol G

Value 1.0e9

mega
Symbol M

Value 1.0e6

kilo
Symbol k

Value 1.0e3

hecto
Symbol v

Value1.0e2

deca
Symbol da

Value 1.0e1

deci
Symbol d

Value 1.0e-1

centi
Symbol c

Value 1.0e-2

milli
Symbol m

Value 1.0e-3

micro
Symbol micro

Value 1.0-6

nano
Symbol n

Value 1.0-9

Pi co
Symbol p

Value 1.0e-12

femto
Symbol f

Value 1.0-15

atto
Symbol a

Value 1.0e-18

When you use unit prefixes in an equation, enter the prefix symbol. Do not enter the prefix itself. For example, an equation that includes the unit "nanometer" might look like this equation: 3.5 ul * 2.6 nm.

When you add the unit prefix for name to the meter unit, your equation is calculated based on the length of 2.6 nanometers.

Note: Prefix symbols are case sensitive. Enter them exactly as they appear in the previous table.

Functions

You can use the following functions in edit boxes.

Syntax

Returns Unit Type

Expected Unit Type

cos(expr)

unitless

angle

sin(expr)

unitless

angle

tan(expr)

unitless

angle

acos(expr)

angle

unitless

asin(expr)

angle

unitless

atan(expr)

angle

unitless

cosh(expr)

unitless

angle

sinh(expr)

unitless

angle

tanh(expr)

unitless

angle

acosh(expr)

unitless

unitless

asinh(expr)

unitless

unitless

atanh(expr)

unitless

unitless

sqrt(expr)

unit^1/2

any

sign(expr)

unitless

any (Return 0 if negative, 1 if positive.)

exp(expr)

unitless

any (Return exponential power of expression: for example, return 2 for 100, 3 for 1000, and so on.)

floor(expr)

unitless

unitless (Next lowest whole number.)

ceil(expr)

unitless

unitless (Next highest whole number.)

round(expr)

unitless

unitless (Closest whole number.)

abs(expr)

any

any

max(expr1;expr2)

any

any

min(expr1;expr2)

any

any

ln(expr)

unitless

unitless

log(expr)

unitless

unitless

pow(expr1;expr2)

unit^expr2

Can construct unit valid equation that can go invalid "pow(3.0; d12)". Decimal powers rounds at eighth decimal place.

any and unitless, respectively

random(expr)

unitless

unitless

isolate(expr;unit;unit)

any

any

Note: Function names are case sensitive. Enter them exactly as they appear in the previous table.

Reserved system parameters

The following are the reserved system parameters supported by ProdName.
PI
Value3.14159265358979323846264338328
E
Value 2.71828182845904523536

Unit types

The unit type that you use with an equation depends on the type of data that you are evaluating. For example, to evaluate a linear or angular value, you typically use a unit type of millimeters, inches, or degrees (mm, in, or deg).

Some equations must return a unitless value, for example, an equation to solve the number of occurrences in a pattern. You designate a unitless value with the characters ul. For example, 5 ul means that the equation has been evaluated and returned the number 5, as in the number of occurrences in a pattern.

Note: Keep units consistent within equations containing parameters that represent different unit types. You can do this using the Isolate function. For example, to calculate the number of occurrences for a pattern that is based on one occurrence for each unit of a parameter named Width, your linear equation would be:

isolate(Width;mm;ul)

The number of Occurrences value in a dialog box requires a unitless (ul) result, but you are referencing the unit width, which is a linear value. Convert the Width parameter to a unitless value.