Chapter 10

Performing Mathematical Tasks

A lot of the analysis performed on databases requires some type of math. Even theoretically simple tasks can require some use of math. In some cases, you might not even think about the math connection because it hides in the background. The math might occur because you've called on one of the IDEAScript functions, used a task object, or relied on a calculated field. In short, you need to know something about the math functionality that IDEAScript provides as part of working with databases.

Many applications never do anything more than simple math. The basic math functions of add, subtract, multiply, and divide can perform powerful and interesting tasks when combined. Equations that would drive the average human crazy are quite simple for the computer when properly defined. These equations often consist of nothing more than simple math performed repetitively to produce a specific result. Most monetary calculations are nothing more than simple math applied in a specific manner.

Sometimes you do need to perform complex math. For example, when working with area, you might need to use trigonometric functions. A special function helps you obtain the square root of a number, which is part of many math calculations. IDEAScript provides a number of advanced math functions that make it easier to perform tasks that would ordinarily require some very fancy coding. Imagine trying to create a successive approximation routine for finding the square root ...