User Commands  - lcm (1)

NAME

lcm(1f) - [NUMBERS] display least common multiple of a list of whole numbers (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

lcm [NUMBERS]...

DESCRIPTION

Print the LCM (Least Common Multiple) 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 least common multiple 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:

  >lcm 10 34 82
  >6970

>lcm 10 34 82 -verbose >6970=lcm([10,34,82])

>lcm 202023 2147483647 >STOP 1 >*lcm* result larger than a standard integer = 433841088817881

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 lcm (1) February 23, 2025
Generated by manServer 1.08 from 87bf2908-55f1-43f2-a1d8-6389e748aca6 using man macros.