File: lcm_num.doc

package info (click to toggle)
hol-light 20131026-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 26,264 kB
  • ctags: 4,620
  • sloc: ml: 400,325; cpp: 438; java: 279; lisp: 261; makefile: 256; sh: 190; yacc: 108; perl: 78; ansic: 57; sed: 39
file content (26 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
\DOC lcm_num

\TYPE {lcm_num : num -> num -> num}

\SYNOPSIS
Computes lowest common multiple of two unlimited-precision integers.

\DESCRIBE
The call {lcm_num m n} for two unlimited-precision (type {num}) integers {m} and
{n} returns the (positive) lowest common multiple of {m} and {n}. If either {m}
or {n} (or both) are both zero, it returns zero.

\FAILURE
Fails if either number is not an integer (the type {num} supports arbitrary 
rationals).

\EXAMPLE
{
  # lcm_num (Int 35) (Int(-77));;
  val it : num = 385
}

\SEEALSO
gcd, gcd_num.

\ENDDOC