Singular Manual: magnitude

| #### D.11.4.7 magnitude Procedure from library `findifs.lib` (see findifs_lib). Usage: magnitude(P); P a poly Return: poly Purpose: compute the square of the magnitude of a complex expression Assume: i is the variable of a basering Example:
    LIB "findifs.lib";
    ring r = (0,d),(g,i,sin,cos),dp;
    poly P = d*i*sin - g*cos +d^2*i;
    NF( magnitude(P), std(i^2+1) );
    ==> g^2*cos^2+(d^2)*sin^2+(2*d^3)*sin+(d^4)

User manual for Singular version 4.4.1, 2025, generated by texi2html.