EnglishFrenchSpanish

Ad


OnWorks favicon

matho-primes - Online in the Cloud

Run matho-primes in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command matho-primes that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


matho-primes - generate consecutive prime numbers

SYNOPSIS


matho-primes [start [stop] or "all"] ["twin"] ["pal" [base]]
matho-primes [-htuv] [-c count] [-m number] [-p base] [start [stop]]

DESCRIPTION


This command-line utility is optionally part of the mathomatic(1) package. It quickly
computes any number of consecutive prime numbers using a windowing, memory efficient sieve
of Eratosthenes algorithm, dumping them to standard output. They are displayed one prime
per line in ascending order, unless the "twin" option is specified, which displays only
twin primes, two primes per line.

Generates up to 18 decimal digit primes, or whatever is the number of digits of precision
for a floating point long double in the C compiler used to compile this utility. Note
that this utility might be compiled to use only double precision floating point, if long
double precision is not fully supported by the C compiler or hardware, allowing at most 15
decimal digit primes in that case.

Ways to verify that this utility is working are to pipe the output into the Unix "factor"
utility, or compare the output with the BSD Games "primes" utility, using the supplied
shell script: examples/testprimes.

All numbers displayed by this utility are decimal (base 10) prime numbers. A prime number
is an integer that cannot be factored.

A range may be specified on the command line, otherwise the starting number and the number
of primes to output is prompted for. The range is start to stop inclusive, and stop must
be greater than or equal to start.

If the -c option is specified, the number of lines of primes displayed is limited to the
decimal count that follows this option.

If the -t or "twin" option is specified on the command line, only twin primes will be
displayed. Twin primes are two primes that differ in value by 2. Each twin pair is
displayed together on the same line separated by a space character.

If the -p or "pal" option is specified on the command line, only palindromic primes are
displayed. Palindromes are symmetrical, they read exactly the same forward and backward.
The palindromic number base may be specified, the default is base 10. The base can be any
integer greater than 1. Primes are always displayed in decimal (base 10).

The version number and short help on the allowed command-line parameters and usage
information are displayed when given the -h option.

With the -u option, all output (standard output and standard error output) is set to be
unbuffered, making all output happen immediately, instead of when the output buffer is
full or when the program terminates or waits for input.

The -m option changes the memory size of the prime number sieve window. It is followed by
a decimal, floating point number which is a multiplier of the default window size (2
megabytes). It is possible that changing the memory size may speed up the total run time
a bit; otherwise there is no reason to use this option, and its use is not recommended.

The -v option simply displays the program name and version number, and then exits
successfully.

Use matho-primes online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    AstrOrzPlayer
    AstrOrzPlayer
    AstrOrz Player is a free media player
    software, part based on WMP and VLC. The
    player is in a minimalist style, with
    more than ten theme colors, and can also
    b...
    Download AstrOrzPlayer
  • 2
    movistartv
    movistartv
    Kodi Movistar+ TV es un ADDON para XBMC/
    Kodi que permite disponer de un
    decodificador de los servicios IPTV de
    Movistar integrado en uno de los
    mediacenters ma...
    Download movistartv
  • 3
    Code::Blocks
    Code::Blocks
    Code::Blocks is a free, open-source,
    cross-platform C, C++ and Fortran IDE
    built to meet the most demanding needs
    of its users. It is designed to be very
    extens...
    Download Code::Blocks
  • 4
    Amidst
    Amidst
    Amidst or Advanced Minecraft Interface
    and Data/Structure Tracking is a tool to
    display an overview of a Minecraft
    world, without actually creating it. It
    can ...
    Download Amidst
  • 5
    MSYS2
    MSYS2
    MSYS2 is a collection of tools and
    libraries providing you with an
    easy-to-use environment for building,
    installing and running native Windows
    software. It con...
    Download MSYS2
  • 6
    libjpeg-turbo
    libjpeg-turbo
    libjpeg-turbo is a JPEG image codec
    that uses SIMD instructions (MMX, SSE2,
    NEON, AltiVec) to accelerate baseline
    JPEG compression and decompression on
    x86, x8...
    Download libjpeg-turbo
  • More »

Linux commands

  • 1
    abi-tracker
    abi-tracker
    abi-tracker - visualize ABI changes
    timeline of a C/C++ software library.
    DESCRIPTION: NAME: ABI Tracker
    (abi-tracker) Visualize ABI changes
    timeline of a C/C+...
    Run abi-tracker
  • 2
    abicheck
    abicheck
    abicheck - check application binaries
    for calls to private or evolving symbols
    in libraries and for static linking of
    some system libraries. ...
    Run abicheck
  • 3
    couriermlm
    couriermlm
    couriermlm - The Courier mailing list
    manager ...
    Run couriermlm
  • 4
    couriertcpd
    couriertcpd
    couriertcpd - the Courier mail server
    TCP server daemon ...
    Run couriertcpd
  • 5
    gbklatex
    gbklatex
    bg5latex - Use LaTeX directly on a Big5
    encodedtex file bg5pdflatex - Use
    pdfLaTeX directly on a Big5 encodedtex
    file bg5+latex - Use LaTeX directly on a
    Big5+...
    Run gbklatex
  • 6
    gbkpdflatex
    gbkpdflatex
    bg5latex - Use LaTeX directly on a Big5
    encodedtex file bg5pdflatex - Use
    pdfLaTeX directly on a Big5 encodedtex
    file bg5+latex - Use LaTeX directly on a
    Big5+...
    Run gbkpdflatex
  • More »

Ad