Top
Back: 5.1.38 freemodule
Forward: 5.1.40 gen
FastBack: 5. Functions and system variables
FastForward: 6. Tricks and pitfalls
Up: 5.1 Functions
Top: Singular 2-0-4 Manual
Contents: Table of Contents
Index: F. Index
About: About This Document

5.1.39 gcd

Syntax:

gcd ( int_expression, int_expression )
gcd ( number_expression, number_expression )
gcd ( poly_expression, poly_expression )

Type:

the same as the type of the arguments

Purpose:

computes the greatest common divisor.

Note:

Not implemented for the coefficient fields real and finite fields of type (p^n,a).
The gcd of two numbers is their gcd as integer numbers or polynomials, otherwise it is not defined.

Example:
 
  gcd(2,3);
→ 1
  ring r=0,(x,y,z),lp;
  gcd(3x2*(x+y),9x*(y2-x2));
→ x2+xy
  gcd(number(6472674604870),number(878646537247372));
→ 2

See extgcd; int; number; poly.


Top Back: 5.1.38 freemodule Forward: 5.1.40 gen FastBack: 5. Functions and system variables FastForward: 6. Tricks and pitfalls Up: 5.1 Functions 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.