User Commands  - gcd (1)

NAME

gcd(1f) - [NUMBERS] display greatest common divisor of a list of whole numbers (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

gcd [NUMBERS]...

DESCRIPTION

Print the gcd (Greatest Common Divisor) of a list of integer whole NUMBERS. If none are specified on the command line, read them from standard input, one list per line.

Typically, the numbers must be positive integers where

2 <= NUMBER <= (2**31)-1 or 2147483647.

but if the result would be larger than (2**31)-1 an error is returned

OPTIONS

NUMBERS
  list of numbers whose greatest common divisor is to be determined
--help display this help and exit
--version
  output version information and exit
--verbose
  produce verbose answer instead of simple integer result

EXAMPLES

Sample Usage:

  gcd 10 34 82
  2

gcd 10 34 82 -verbose 2=gcd([10,34,82])

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 gcd (1) February 23, 2025
Generated by manServer 1.08 from 766d36e5-fa3c-495d-b860-5731d2c0a770 using man macros.