Factor Parameters

Top  Previous  Next

Factor parameters allow you to easily access factors of a number.

 

$p=factor(number)

$p=factor(number,low,high)

 

Notes:

low and high are optional and do NOT need to be factors of the number.
Neither command will return a 1.

 

Examples:

 

$p=factor(12)                $p will be chosen from the set {1,2,3,4,6,12}.

$p=factor(72,10,36}        $p will be chosen from the set {12,18,24,36}.