← All Distributed Computing Projects
Distributed Segmented Prime Number Search
Task tsk_0001_prime_sieve · Published by @ezmone ·
Category: Number Theory ·
Status: OPEN
Counts prime numbers across consecutive 250,000-integer windows using a deterministic segmented sieve, suitable for CPU-heavy volunteer or paid number-theory projects.
1c462a3c98a3d562249e07947a75fb6fc7a2371507059bcd4b99a38a22eb189a
Bound into every appliance built for this task.
Full Task Code Audit (Inspect Everything Before Accepting)
Before downloading any appliance, inspect the exact EZC v1 safe compute blocks written by @ezmone, our plain-English step-by-step summary, and the exact C source code compiled into the appliance. No hidden code, external libraries, shell commands, or network calls can be added.
Step-by-Step Plain-English Audit (3 verified operations)
- Declare float64 scalar primes_found = 0
- Count prime numbers across segmented integer window of width 250000 into scalar primes_found
- Emit verified deterministic result for primes_found (SCALAR) back to ezmon-e
Exact EZC v1 Safe Block Source Code
SCALAR primes_found 0
PRIME_SIEVE primes_found 250000
EMIT primes_found
Exact Compiled ANSI C99 Code (SHA-256: db9bace13b4b440d0f60e001f7a32b69c60829859bb43f8a6319de5d97b6e672)
/* Auto-generated by ezmon-e EZC v1 Safe Compute Compiler.
* Zero syscalls, zero raw pointers, zero dynamic allocation, strictly bounded loops.
* Source SHA-256: 1c462a3c98a3d562249e07947a75fb6fc7a2371507059bcd4b99a38a22eb189a
*/
#include "ezc_runtime.h"
static double ezv_primes_found = 0;
int ezc_run_chunk(uint64_t task_seed, uint64_t chunk_index, ezc_emit_ctx *emit) {
ezv_primes_found = 0;
ezv_primes_found = (double)ezc_prime_sieve(chunk_index, 250000U);
ezc_emit_scalar(emit, ezv_primes_found);
return 0;
}
Included Safe Compute Header: ezc_runtime.h (SHA-256: eac06d7ca873dcace5bd54cdb5114c92385740b525f4aee68e7eb11d19ca4da0)
This is the exact C header included by #include "ezc_runtime.h" above, declaring every allowed EZC v1 operation signature and output structure. You can also view it directly as plain text at /compute/runtime/ezc_runtime.h.
#ifndef EZC_RUNTIME_H
#define EZC_RUNTIME_H
#include <stdint.h>
#include <stddef.h>
enum {
EZC_MAP_ADD_CONST = 1,
EZC_MAP_MUL_CONST = 2,
EZC_MAP_ABS = 3,
EZC_MAP_SQRT_SAFE = 4,
EZC_MAP_EXP_CLAMP = 5,
EZC_MAP_LOG_SAFE = 6,
EZC_MAP_SIN = 7,
EZC_MAP_COS = 8,
EZC_MAP_TANH = 9,
EZC_MAP_RELU = 10,
EZC_MAP_SIGMOID = 11,
EZC_MAP_SQUARE = 12,
EZC_MAP_CLAMP01 = 13
};
enum {
EZC_ZIP_ADD = 1,
EZC_ZIP_SUB = 2,
EZC_ZIP_MUL = 3,
EZC_ZIP_DIV_SAFE = 4,
EZC_ZIP_MIN = 5,
EZC_ZIP_MAX = 6
};
enum {
EZC_RED_SUM = 1,
EZC_RED_MEAN = 2,
EZC_RED_MIN = 3,
EZC_RED_MAX = 4,
EZC_RED_L2_NORM = 5
};
enum {
EZC_MC_PI_CIRCLE = 1,
EZC_MC_GAUSS_INTEGRAL = 2,
EZC_MC_BLACK_SCHOLES_CALL = 3,
EZC_MC_ISING_ENERGY = 4
};
typedef struct {
uint32_t state[8];
uint64_t bitlen;
uint8_t data[64];
size_t datalen;
} ezc_sha256_ctx;
typedef struct {
ezc_sha256_ctx sha;
int emitted_count;
double last_summary;
} ezc_emit_ctx;
void ezc_zero(double *dst, int n);
void ezc_fill(double *dst, int n, double val);
void ezc_load_chunk(double *dst, int n, uint64_t task_seed, uint64_t chunk_index, uint32_t salt);
void ezc_map(double *dst, const double *src, int n, int op, double arg);
void ezc_zip(double *dst, const double *a, const double *b, int n, int op);
void ezc_matmul(double *dst, const double *a, const double *b, int m, int k, int n);
void ezc_conv1d(double *dst, const double *src, int n, const double *kern, int kl);
void ezc_fft_radix2(double *re, double *im, int n);
double ezc_reduce(const double *src, int n, int op);
double ezc_monte_carlo(uint64_t task_seed, uint64_t chunk_index, uint32_t salt, int samples, int mode);
int64_t ezc_prime_sieve(uint64_t chunk_index, uint32_t window);
int64_t ezc_hash_scan(uint64_t task_seed, uint64_t chunk_index, uint32_t leading_bits, uint32_t max_iters);
void ezc_heapsort(double *a, int n);
void ezc_emit_scalar(ezc_emit_ctx *ctx, double val);
void ezc_emit_buffer(ezc_emit_ctx *ctx, const double *buf, int n);
/* Generated strictly by ezmon-e EZC v1 compiler (task_kernel.c) */
int ezc_run_chunk(uint64_t task_seed, uint64_t chunk_index, ezc_emit_ctx *emit);
#endif /* EZC_RUNTIME_H */
Configure Resources & Build Your Personal Single-Task QEMU Appliance
Sign up free or log in so ezmon-e can build an appliance cryptographically bound to your @username and credit all verified compute sessions directly to your account.