Top
Back: D.2.2.2 ASCII
Forward: D.2.2.4 binomial
FastBack: D. SINGULAR libraries
FastForward: E. Release Notes
Up: D.2.2 general_lib
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

D.2.2.3 absValue

Procedure from library general.lib (see general_lib).

Usage:

absValue(c); c int, number or poly

Return:

absValue(c); the absolute value of c

Note:

absValue(c)=c if c>=0; absValue=-c if c<=0.
So the function can be applied to any type, for which comparison
operators are defined.

Example:

 
LIB "general.lib";
ring r1 = 0,x,dp;
absValue(-2002);
→ 2002
poly f=-4;
absValue(f);
→ 4

See also: boolean expressions.


Top Back: D.2.2.2 ASCII Forward: D.2.2.4 binomial FastBack: D. SINGULAR libraries FastForward: E. Release Notes Up: D.2.2 general_lib Top: Singular 2-0-4 Manual Contents: Table of Contents Index: F. Index About: About This Document
            User manual for Singular version 2-0-4, October 2002, generated by texi2html.