Function Entry: GCD

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: GCD

Name

gcd

Class

Function

Syntax

(gcd int1 int2)

Arguments and Values

  • int1: integer greater than 0.
  • int2: integer greater than 0.

Description

Returns the greatest common divisor of int1 and int2.

Return Values

An integer.

Side Effects

None.

Examples

  • (gcd 81 57) returns 3.
  • (gcd 12 20) returns 4.

Availability

  • AutoCAD 2026: documented.
  • BricsCAD V26: presumed compatible.
  • Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.