Proper scaling of both variables and problem functions is very important for successful operation of optimization. Embed uses a relative measure to compare quantities. This means that Embed can handle functions that vary by several orders of magnitude and still perform well. The relative measure is changed to an absolute measure when comparing quantities that are less than one in absolute value. If the cost function or a constraint function operates in a range that is much less than one, these functions should be scaled to bring the values up to one.

Poor scaling can be the cause of inaccurate function values. If terms or factors of the problem functions vary by several orders of magnitude, the result of combining these terms or factors through floating point operations can produce an inaccurate result.

If scaling problems are suspected of causing difficulties, variables should be scaled so that a unit change (changes of 1.0) represents a small but significant change in that variable. In addition, it is advisable to avoid having the constraint or objective functions much more sensitive to some variables than others. A symptom of bad scaling is the presence of very large derivative values. The doscale option provides one type of scaling that is based on gradient values.