1
0

factor 1019 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. .TH FACTOR 1
  2. .CT 1 numbers
  3. .SH NAME
  4. factor, primes \- factor a number, generate large primes
  5. .SH SYNOPSIS
  6. .B factor
  7. [
  8. .I number
  9. ]
  10. .PP
  11. .B primes
  12. [
  13. .I start
  14. [
  15. .I finish
  16. ]
  17. ]
  18. .SH DESCRIPTION
  19. .I Factor
  20. prints
  21. .I number
  22. and its prime factors,
  23. each repeated the proper number of times.
  24. The number must be positive and less than
  25. .if n 2**54
  26. .if t 2\u\s754\s0\d
  27. (about
  28. .if n 1.8e16)
  29. .if t 1.8\(mu10\u\s716\s0\d\|).
  30. .PP
  31. If no
  32. .I number
  33. is given,
  34. .I factor
  35. reads a stream of numbers from the standard input and factors them.
  36. It exits on any input not a positive integer.
  37. Maximum running time is proportional to
  38. .if n sqrt(n).
  39. .if t .I \(sr\o'n\(rn'\f1.
  40. .PP
  41. .PP
  42. .I Primes
  43. prints the prime numbers ranging from
  44. .I start
  45. to
  46. .IR finish ,
  47. where
  48. .I start
  49. and
  50. .I finish
  51. are positive numbers less than
  52. .if n 2**56.
  53. .if t 2\u\s756\s0\d.
  54. If
  55. .I finish
  56. is missing,
  57. .I primes
  58. prints without end;
  59. if
  60. .I start
  61. is missing, it reads the starting number from the
  62. standard input.
  63. .SH SOURCE
  64. .B /sys/src/cmd/factor.c
  65. .br
  66. .B /sys/src/cmd/primes.c