Skip to content
Permalink
Browse files

Update doc

  • Loading branch information
kimwalisch committed Nov 25, 2019
1 parent b6138d2 commit d2d2bf22b82714753ae34b3b9ac7124fb6f801da
Showing with 16 additions and 2 deletions.
  1. +10 −2 examples/c/prev_prime.c
  2. +6 −0 examples/cpp/prev_prime.cpp
@@ -1,5 +1,13 @@
/** @example prev_prime.c
* Iterate backwards over primes using primesieve_iterator. */
/**
* @example prev_prime.c
* Iterate backwards over primes using primesieve_iterator.
*
* Note that primesieve_next_prime() runs up to 2x faster and uses
* only half as much memory as primesieve_prev_prime(). Hence if
* it is possible to write the same algorithm using either
* primesieve_prev_prime() or primesieve_next_prime() then it is
* preferable to use primesieve_next_prime().
*/

#include <primesieve.h>
#include <inttypes.h>
@@ -1,5 +1,11 @@
/// @example prev_prime.cpp
/// Iterate backwards over primes using primesieve::iterator.
///
/// Note that next_prime() runs up to 2x faster and uses only half
/// as much memory as prev_prime(). Hence if it is possible to
/// write the same algorithm using either prev_prime() or
/// next_prime() then it is preferable to use next_prime().
///

#include <primesieve.hpp>
#include <iostream>

0 comments on commit d2d2bf2

Please sign in to comment.
You can’t perform that action at this time.