Top
Back: preimage
Forward: print
FastBack: Functions and system variables
FastForward: Control structures
Up: Functions
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

5.1.98 prime

Syntax:
prime ( int_expression )
Type:
int
Purpose:
returns the largest prime less then or equal to the argument;
returns 2 for all arguments smaller than 3.
Example:
 
  prime(320000);
==> 319993
  prime(32004);
==> 32003
  prime(0);
==> 2
  prime(-1);
==> 2
See general_lib; int.

Top Back: preimage Forward: print FastBack: Functions and system variables FastForward: Control structures Up: Functions Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 3-0-1, October 2005, generated by texi2html.