Primality by trial division: Difference between revisions

→‎{{header|Ada}}: while condition shall be <= (or it skips square numbers)
(→‎{{header|Ada}}: "return" statement cleanly exits from loops, therefore no need for a Result variable)
(→‎{{header|Ada}}: while condition shall be <= (or it skips square numbers))
Line 443:
else
Test := 3;
while Test <= Integer(Sqrt(Float(Item))) loop
if Item mod Test = 0 then
return False;