Skip to content

Instantly share code, notes, and snippets.

View RandyMcMillan's full-sized avatar
🛰️
Those who know - do not speak of it.

randymcmillan RandyMcMillan

🛰️
Those who know - do not speak of it.
View GitHub Profile
@RandyMcMillan
RandyMcMillan / integer_multiplication.rs
Last active October 8, 2026 19:23 — forked from rust-play/Playground.toml
integer_multiplication.rs
use num_complex::Complex64;
use std::f64::consts::PI;
/// 1. Schoolbook Multiplication - O(n^2)
/// Base-10 arbitrary-precision multiplication for direct comparison.
pub fn multiply_schoolbook(a: &[u8], b: &[u8]) -> Vec<u8> {
let mut result = vec![0u8; a.len() + b.len()];
for (i, &da) in a.iter().rev().enumerate() {
let mut carry = 0u64;
@RandyMcMillan
RandyMcMillan / proofs.rs
Created October 7, 2026 16:34 — forked from joschisan/proofs.rs
Sigma Protocol Proofs
use bitcoin_hashes::{sha256, Hash, HashEngine};
use bls12_381::{G1Affine, G1Projective, Scalar};
use core::array;
use ff::Field;
use group::Curve;
use rand::{thread_rng, SeedableRng};
use rand_chacha::ChaChaRng;
use std::io::Write;
fn prove<const N: usize, const M: usize, const S: usize>(
@RandyMcMillan
RandyMcMillan / ExtendedSuperformula.rs
Last active October 5, 2026 12:46 — forked from rust-play/Playground.toml
ExtendedSuperformula.rs
use std::f64::consts::TAU;
/// Represents parameters for Gielis' Superformula.
///
/// Formula:
/// r(φ) = (|cos(m_cos * φ / 4) / a|^n2 + |sin(m_sin * φ / 4) / b|^n3) ^ (-1 / n1)
#[derive(Debug, Clone, Copy)]
pub struct SuperformulaParams {
pub a: f64,
pub b: f64,
@RandyMcMillan
RandyMcMillan / SuperformulaParams.rs
Last active October 5, 2026 11:34 — forked from rust-play/Playground.toml
SuperformulaParams.rs
/// Represents parameters for Gielis' Superformula.
///
/// Standard formula (when m_cos == m_sin = m):
/// r(φ) = (|cos(m * φ / 4) / a|^n2 + |sin(m * φ / 4) / b|^n3) ^ (-1 / n1)
///
/// Extended asymmetric formula:
/// r(φ) = (|cos(y * φ / 4) / a|^n2 + |sin(z * φ / 4) / b|^n3) ^ (-1 / n1)
#[derive(Debug, Clone, Copy)]
pub struct SuperformulaParams {
pub a: f64,
@RandyMcMillan
RandyMcMillan / tzolkin-microtubule.rs
Last active October 5, 2026 00:53 — forked from rust-play/Playground.toml
tzolkin-microtubule.rs
// Tzolkin Matrix Arithmetic, Gregorian Mapping, & Quantum Orch OR Multi-Scale Cascade
// Integrates 613 THz Microtubule Tubulin Dynamics with Tzolkin Matrix Symmetries
use chrono::{TimeZone, Utc};
/// Represents the quantum vibrational frequency bands across the biological hierarchy
#[derive(Debug)]
enum FrequencyBand {
TerahertzTHz(f64), // Quantum dipole oscillations in tubulin pi-electron clouds (613 THz)
GigahertzGHz(f64), // Structural lattice vibrations
@RandyMcMillan
RandyMcMillan / wilson_prime.rs
Last active September 28, 2026 03:12 — forked from rust-play/Playground.toml
wilson_prime.rs
use std::time::Instant;
/// Checks if a number `p` is prime using Wilson's Theorem.
///
/// According to Wilson's Theorem, an integer p > 1 is a prime number
/// if and only if (p - 1)! + 1 is divisible by p.
///
/// Equivalently: (p - 1)! ≡ -1 (mod p) ≡ (p - 1) (mod p).
fn is_prime_wilson(p: u64) -> bool {
if p <= 1 {
@RandyMcMillan
RandyMcMillan / IT^3Paradigm.rs
Last active September 25, 2026 16:00 — forked from rust-play/Playground.toml
IT^3Paradigm
//! # Synthesis: IT³ Paradigm & Ternary Perez Hourglass Framework
//!
//! An executable simulation and mathematical model implementing the discrete,
//! topological, and algebraic properties presented in the *IT³ Paradigm* paper
//! by Victor Logvinovich & Jean-Claude Perez.
//!
//! ## Theoretical Summary
//! The framework derives fundamental physical properties—such as the proton-to-electron
//! mass ratio ($m_p/m_e$) and topological confinement barriers—by synthesizing:
//! 1. **Ab Initio Invariants:** Irrational constants derived from algebraic spectral gaps.
@RandyMcMillan
RandyMcMillan / Xorshift32.rs
Last active September 24, 2026 23:57 — forked from rust-play/Playground.toml
Xorshift32.rs
use std::time::{SystemTime, UNIX_EPOCH};
pub struct Xorshift32 {
state: u32,
}
impl Xorshift32 {
/// Initialize with a non-zero seed.
pub fn new(seed: u32) -> Self {
assert!(seed != 0, "Xorshift32 seed must be non-zero");
@RandyMcMillan
RandyMcMillan / SQTG.rs
Last active September 13, 2026 03:16 — forked from rust-play/Playground.toml
SQTG.rs
// Author: Randy McMillan (@RandyMcMillan)
// Model: Sub-Planckian Quantum Entropic Gravity (SQTG) / Bloch-Screen Emergent Gravity
// Theory: Universal Scaling & Singularity Regularization via Exact Binomial Expansion
use std::f64::consts::PI;
use std::time::{SystemTime, UNIX_EPOCH};
pub const HBAR: f64 = 1.054_571_817e-34;
pub const C: f64 = 2.997_924_58e8;
pub const KB: f64 = 1.380_649e-23;
@RandyMcMillan
RandyMcMillan / HolographicScreen.rs
Last active September 13, 2026 00:49 — forked from rust-play/Playground.toml
Code shared from the Rust Playground
use std::f64::consts::PI;
/// Fundamental Physical Constants (SI Units)
pub const HBAR: f64 = 1.054_571_817e-34; // Reduced Planck constant (J·s)
pub const C: f64 = 2.997_924_58e8; // Speed of light in vacuum (m/s)
pub const KB: f64 = 1.380_649e-23; // Boltzmann constant (J/K)
pub const G: f64 = 6.674_30e-11; // Gravitational constant (m^3·kg^-1·s^-2)
/// Represents a point particle embedded in spacetime geometry
#[derive(Debug, Clone, Copy)]