Logo GenPRES

Array Module

Removes from an array of BigRational values the values not above zero and every multiple of a smaller value.

Functions and values

Function or value Description

removeBigRationalMultiples xs

Full Usage: removeBigRationalMultiples xs

Parameters:
    xs : RationalX array - The array of BigRationals

Returns: RationalX array The array without multiples

Remove all BigRationals that are multiples of the smallest BigRationals in the array. Uses an efficient sieve algorithm similar to the Sieve of Eratosthenes.

xs : RationalX array

The array of BigRationals

Returns: RationalX array

The array without multiples

Example

 [| 2N; 3N; 4N; 5N; 6N; 7N; 8N; 9N; 10N |] |> removeBigRationalMultiples
 // Returns: [| 2N; 3N; 5N; 7N |]

Type something to start searching.