Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

sieve package

Overview

Package sieve is an on-chain port of Go's classic concurrent prime sieve (the "prime sieve" example from the Go tour / Go source docs), implemented as a deterministic, allocation-friendly Sieve of Eratosthenes so it runs reproducibly on-chain (no goroutines, channels, or clocks).

Function

IsPrime

func IsPrime(x int) bool

IsPrime reports whether x is prime (trial division). Pure.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/sieve.IsPrime()"

Result