Factors of an integer: Difference between revisions

m
Line 527:
if n = 1 then
{1}
else if n = 0 then
{0, 1}
else if 0 > n then
missing value
else
set realRoot to n ^ (1 / 2)
Line 555 ⟶ 559:
end integerFactors
 
-- TEST ----------------------------------------------- TEST -------------------------
on run
Line 564 ⟶ 568:
 
 
-- GENERIC FUNCTIONS ---------------------------------------- GENERIC FUNCTIONS -------------------
 
-- enumFromTo :: Int -> Int -> [Int]
9,655

edits