|
7.10.6.7 ncratMultiply
Procedure from library ncrat.lib (see ncrat_lib).
- Usage:
- ncrat h = ncratMultiply(f, g);
f, g both of type ncrat
- Return:
- h = f * g
- Note:
- operator '*' for ncrat is overloaded
with this procedure, hence
ncrat h = f * g;
yields the same result as
ncrat h = ncratMultiply(f, g);
Example:
| LIB "ncrat.lib";
ncInit(list("x", "y", "z"));
ncrat f = ncratFromString("2*x*y");
print(f);
==> 2*x*y
ncrat g = ncratFromString("z");
print(g);
==> z
ncrat h1, h2;
h1 = ncratMultiply(f, g);
print(h1);
==> 2*x*y*z
h2 = f * g;
print(h2);
==> 2*x*y*z
|
|