Top
Back: ncratAdd
Forward: ncratMultiply
FastBack:
FastForward:
Up: ncrat_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

7.10.6.6 ncratSubstract

Procedure from library ncrat.lib (see ncrat_lib).

Usage:
ncrat h = ncratSubstract(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 = ncratSubstract(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 = ncratSubstract(f, g);
print(h1);
==> 2*x*y-z
h2 = f - g;
print(h2);
==> 2*x*y-z


Top Back: ncratAdd Forward: ncratMultiply FastBack: FastForward: Up: ncrat_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.