Reference Guide > P Routines > PRIME Function
  

PRIME Function
Standard Library function that returns all positive primes less than or equal to a scalar input.
Usage
result = PRIME(value)
Input Parameters
value — The scalar input.
Returned Value
result — A vector containing all positive primes less than or equal to value.
Keywords
None.
Examples
PRINT, PRIME(10)
; PV-WAVE prints:
;    2   3   5   7
See Also
FACTOR, GCD, LCM

Version 2017.0
Copyright © 2017, Rogue Wave Software, Inc. All Rights Reserved.