Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ factor(1) — GL2 W2.5r1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FACTOR(1)  —  Silicon Graphics

NAME

factor − factor a number

SYNOPSIS

factor [ number ]

DESCRIPTION

When factor is invoked without an argument, it waits for a number to be typed in.  If you type in a positive number less than 256 (about 7.2×1016) it will factor the number and print its prime factors; each one is printed the proper number of times. Then it waits for another number. It exits if it encounters a zero or any non-numeric character.

If factor is invoked with an argument, it factors the number as above and then exits. 

Maximum time to factor is proportional to √n
‾
and occurs when n is prime or the square of a prime.  It takes 30 seconds to factor a prime near 1014 on a 68000. 

DIAGNOSTICS

“Ouch” for input out of range or for garbage input. 

Version 2.5r1  —  October 29, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026