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)returns3.(gcd 12 20)returns4.
Availability
- AutoCAD 2026: documented.
- BricsCAD V26: presumed compatible.
- Status: AutoCAD documented; BricsCAD presumed-both pending Phase 4 verification.
Source Notes
- [gcd (AutoLISP 2026)](https://help.autodesk.com/cloudhelp/2026/ENU/AutoCAD-AutoLISP-Reference/files/GUID-3F748964-B6D7-4136-92D5-81A7DD02ED4A.htm)
- Status: documented (Phase 3 body fill).