// file: $isip/doc/examples/class/math/scalar/math_scalar_example_01/example.cc // version: $Id: example.cc 5953 2000-12-17 18:17:48Z hamaker $ // // isip include files // #include #include // main program starts here: // this program demonstrates a few simple functions of the scalar objects // and how the resultant objects change depending on the prototype of the // function called. // int main () { // declare the objects we will work with // Float x(3.0); Float y; Float z; // compute the factorial of x and assign it to y: // note that both y and x are now equal to 3! // y.assign(x.factorial()); // compute y cubed and assign it to z: // note that this time, we do not explicitly call the assign method. // the assignment is implicit in the method call. y is unchanged. // z.pow(y, 3.0); // output the values to the screen // x.debug(L"x=3!"); y.debug(L"y = x! = 3!"); z.debug(L"z = y**3 = (x!)**3 = (3!)**3"); // exit gracefully // Integral::exit(); }