FACTOR(1plan9)

πŸŽ€ NAME πŸŽ€

okay bestie, welcome to factor(1plan9) πŸ’–

factor, primes β€” factor a number, generate large primes ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

factor [ number ]

primes [ start [ finish ] ]

πŸ’… DESCRIPTION πŸ’…

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) β€” like, that is the vibe check, no exceptions πŸ’€

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

this was served fresh from the Plan 9 manual, page FACTOR(1plan9) πŸ’– the footer is literally FACTOR(1plan9) too β€” no date on it, just legacy, periodt βœ¨πŸ‘‘

πŸ“¦ where this page comes from