factor(1plan9)

factor1plan9

Factor a number, generate large primes

Usage

factor [number]

primes [start [finish]]

Overview

Factor prints number and its prime factors, each repeated the proper number of times. The number must be positive and less than 2**54 (about 1.8e16)

If no number is given, factor reads a stream of numbers from the standard input and factors them. It exits on any input not a positive integer. Maximum running time is proportional to sqrt(n).

Primes prints the prime numbers ranging from start to finish, where start and finish are positive numbers less than 2**56. If finish is missing, primes prints without end; if start is missing, it reads the starting number from the standard input.

Source

/src/cmd/factor.c
/src/cmd/primes.c

Releases

Unchanged in 6 releases since Debian 8 (Jessie).

  1. 8–13

From 9base 1:6-14 in Debian 13 (Trixie). Parsed by carta from the page's man source.