Home > freetb4matlab > specfun > isprime.m

isprime

PURPOSE ^

%

SYNOPSIS ^

function t = isprime (n)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} isprime (@var{n})
%
% Return true if @var{n} is a prime number, false otherwise.
%
% Something like the following is much faster if you need to test a lot
% of small numbers:
%
% @example
%    @var{t} = ismember (@var{n}, primes (max (@var{n} (:))));
% @end example
%
% If max(n) is very large, then you should be using special purpose 
% factorization code.
%
% @seealso{primes, factor, gcd, lcm}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003