Blyx Nest Blyx language
Registry / Library
library · v0.1.0

ShotMargins

Extract both individual bit frequencies from joint two-bit shots.

Source repository · Package JSON

Use ShotMargins

use vendor::shotmargins::shotmargins;

Run the example

nest demo shotmargins@0.1.0
blyxc native-run shotmargins-demo/main.blyx
Example source and expected output
use vendor::shotmargins::shotmargins;

fn main() {
    let counts = [2, 1, 3, 2];
    let result = shotmargins_bits(counts);
    if len(result) == 0 { println!("invalid"); return; }
    let mut i = 0;
    while i < len(result) {
        println!(at(result, i));
        i += 1;
    }
}

Expected output

0.625
0.375
8

Published versions

VersionPackageSource commitSHA-256
0.1.0Download ZIP206922afe9fa9394ae6ea372cdfa461d63bbb7bb87e128a05bd1b9ae88cd0e746cd810f43b