Proof · Black-76 lognormal call

Same spec, every language.

Same function signature, repeated across pure-language and wrapper paths. Pure body does the math in the language itself. Wrapper body delegates to the Rust kernel via WASM (a) or native FFI (b). The signature line, highlighted, stays byte-identical so users can swap implementations without code changes.

cards.toml schema v1 · evidence dated 2026-04-28 · source: Steve's dev box / Claude1 canonical tree

public double PriceCall(double forward, double strike, double timeToExpiry, double volatility)
  double tVol = volatility * Sqrt(timeToExpiry);
  double d1 = Log(forward / strike) / tVol + 0.5 * tVol;
  return Max(forward * Cdf(d1) - strike * Cdf(d1 - tVol), 0.0);
Compiledotnet 8.0.4 RuntimeCoreCLR ·ReflexLibs.ai tests~ 5 May ·ReflexLibs.com heritage~ 14 May
pub fn price_call(forward: f64, strike: f64, time_to_expiry: f64, volatility: f64) -> f64
  let t_vol = volatility * time_to_expiry.sqrt();
  let d1 = (forward / strike).ln() / t_vol + 0.5 * t_vol;
  (forward * cdf(d1) - strike * cdf(d1 - t_vol)).max(0.0)
Compilerustc 1.78 Runtimenative ·ReflexLibs.ai tests~ 5 May ·ReflexLibs.com heritage~ 14 May

3C++ (heritage)

BlackLognormal.h
double price_of_call(double forward, double strike, double time_to_expiry, double volatility)
  double tVol = volatility * std::sqrt(time_to_expiry);
  double d1 = std::log(forward / strike) / tVol + 0.5 * tVol;
  return std::max(forward * cdf(d1) - strike * cdf(d1 - tVol), 0.0);
·Compile~ 4 May ·Runtime~ 4 May ·ReflexLibs.ai tests~ 14 May ·ReflexLibs.com heritage~ 14 May
__device__ double price_call(double forward, double strike, double time_to_expiry, double volatility)
  double tVol = volatility * sqrt(time_to_expiry);
  double d1 = log(forward / strike) / tVol + 0.5 * tVol;
  return fmax(forward * cdf(d1) - strike * cdf(d1 - tVol), 0.0);
Compilenvcc 12.3 ·Runtime~ 14 May ·ReflexLibs.ai tests~ 14 May ReflexLibs.com heritageN/A

5JavaScript (pure)

EmitterJs.cs
function priceCall(forward, strike, timeToExpiry, volatility)
  const tVol = volatility * Math.sqrt(timeToExpiry);
  const d1 = Math.log(forward / strike) / tVol + 0.5 * tVol;
  return Math.max(forward * cdf(d1) - strike * cdf(d1 - tVol), 0);
Compileparse-only RuntimeJint 3.1.2 ·ReflexLibs.ai tests~ 5 May ·ReflexLibs.com heritage~ 14 May

Wrappers

a)WASM-wrapped

function priceCall(forward, strike, timeToExpiry, volatility)
  return wasm.b76_l_call_f64(forward, strike,
    timeToExpiry, volatility);
·Build~ 12 May ·Host~ 12 May ·Parity~ 12 May

6TypeScript (pure)

black76.ts
priceCall(forward: number, strike: number, timeToExpiry: number, volatility: number): number
  const tVol = volatility * Math.sqrt(timeToExpiry);
  const d1 = Math.log(forward / strike) / tVol + 0.5 * tVol;
  return Math.max(forward * cdf(d1) - strike * cdf(d1 - tVol), 0);
·Compile~ 10 May ·Runtime~ 10 May ·ReflexLibs.ai tests~ 10 May ·ReflexLibs.com heritage~ 14 May

Wrappers

a)WASM-wrapped

priceCall(forward: number, strike: number, timeToExpiry: number, volatility: number): number
  return wasm.b76_l_call_f64(forward, strike,
    timeToExpiry, volatility);
·Build~ 12 May ·Host~ 12 May ·Parity~ 12 May

7Python (pure)

EmitterPython.cs
def price_call(forward: float, strike: float, time_to_expiry: float, volatility: float) -> float:
    t_vol = volatility * math.sqrt(time_to_expiry)
    d1 = math.log(forward / strike) / t_vol + 0.5 * t_vol
    return max(forward * cdf(d1) - strike * cdf(d1 - t_vol), 0.0)
Compilebytecode RuntimeIronPython 3 / CPython 3.11 ·ReflexLibs.ai tests~ 5 May ·ReflexLibs.com heritage~ 14 May

Wrappers

a)WASM-wrapped

def price_call(forward: float, strike: float, time_to_expiry: float, volatility: float) -> float:
    return _wasm.b76_l_call_f64(
        forward, strike, time_to_expiry, volatility)
·Build~ 13 May ·Host~ 13 May ·Parity~ 13 May

b)Native FFI

def price_call(forward: float, strike: float, time_to_expiry: float, volatility: float) -> float:
    return _native.b76_l_call_f64(
        forward, strike, time_to_expiry, volatility)
·Build~ 13 May ·Host~ 13 May ·Parity~ 13 May
priceCall :: Double -> Double -> Double -> Double -> Double
priceCall forward strike timeToExpiry volatility =
  let tVol = volatility * sqrt timeToExpiry
      d1 = log (forward / strike) / tVol + 0.5 * tVol
  in max (forward * cdf d1 - strike * cdf (d1 - tVol)) 0
·Compile~ 8 May ·Runtime~ 8 May ·ReflexLibs.ai tests~ 14 May ·ReflexLibs.com heritage~ 14 May
C(F, K, T, \sigma) =
  t_v = \sigma\sqrt{T}, \quad d_1 = \frac{\ln(F/K)}{t_v} + \tfrac{1}{2} t_v
  \max\!\bigl(F\,\Phi(d_1) - K\,\Phi(d_1 - t_v),\; 0\bigr)
CompileMathJax 3.2 Runtimebrowser ·ReflexLibs.ai tests~ 5 May ReflexLibs.com heritageN/A