rust 1,847,280 · typescript 232,434 · javascript 131,101 · python 19,227 · 6,362 files · digest 755e2ee30522 · built in 2.3 s · crystals off
cre8-util-options crates cargo crate
Options, futures and margin math for the CRE8 capital stack: exact i128 rationals and settlement (payouts floored, collateral ceiled, overflow refused), Black-Scholes-Merton and Black-76 with greeks, implied vol, CRR binomial trees, multi-leg payoffs, perp funding accrual and margin/liquidation helpers. Pure: no runtime dependencies.
Neighbourhood
Left: crates that declare this one. Right: crates it declares (dev-dependencies included). Edge width grows with resolved calls.
Files
File call graph
Resolved calls between this crate's files, callers left of callees.
Heaviest functions
By call-graph weight (PageRank; 1.0 is the average function). 200 functions in all.
| function | kind | lines | cyclomatic | callers | callees | weight | crystal |
|---|---|---|---|---|---|---|---|
| Ratio::newsrc/ratio.rs:28 | method | 16 | 3 | 37 | 2 | 17.8 | |
| gcd_u128src/ratio.rs:608 | fn | 6 | 2 | 2 | 0 | 12.1 | |
| Ratio::is_positivesrc/ratio.rs:67 | method | 3 | 1 | 37 | 0 | 11.2 | |
| signed_from_magnitudesrc/ratio.rs:508 | fn | 11 | 3 | 3 | 0 | 10.6 | |
| Ratio::checked_mulsrc/ratio.rs:111 | method | 12 | 3 | 18 | 2 | 9.3 | |
| Ratio::from_integersrc/ratio.rs:46 | method | 3 | 1 | 55 | 0 | 9.3 | |
| mul_div_roundsrc/ratio.rs:566 | fn | 18 | 7 | 2 | 3 | 6.5 | |
| pricesrc/bsm.rs:118 | fn | 26 | 5 | 16 | 4 | 5.7 | |
| mul_widesrc/ratio.rs:468 | fn | 13 | 1 | 3 | 0 | 5.6 | |
| gcd_i128src/ratio.rs:617 | fn | 3 | 1 | 3 | 1 | 4.7 | |
| Ratio::checked_negsrc/ratio.rs:79 | method | 6 | 1 | 11 | 0 | 4.7 | |
| Ratio::from_decimal_strsrc/ratio.rs:225 | method | 26 | 9 | 12 | 3 | 4.3 | |
| mul_div_ceilsrc/ratio.rs:528 | fn | 3 | 1 | 3 | 1 | 3.8 | |
| pow10src/ratio.rs:621 | fn | 3 | 1 | 3 | 0 | 3.4 | |
| Ratio::to_decimal_stringsrc/ratio.rs:254 | method | 33 | 6 | 9 | 2 | 3.4 | |
| mul_div_floorsrc/ratio.rs:522 | fn | 3 | 1 | 4 | 1 | 3.4 | |
| inputs_validsrc/bsm.rs:98 | fn | 11 | 9 | 6 | 0 | 3.1 | |
| divrem_widesrc/ratio.rs:483 | fn | 24 | 7 | 2 | 0 | 3.1 | |
| cmp_productssrc/ratio.rs:586 | fn | 21 | 7 | 2 | 1 | 3 | |
| Leg::value_atsrc/payoff.rs:56 | method | 7 | 3 | 2 | 0 | 3 | |
| tree_pricesrc/binomial.rs:64 | fn | 63 | 12 | 2 | 3 | 2.9 | |
| Ratio::to_f64src/ratio.rs:159 | method | 7 | 1 | 13 | 0 | 2.9 | |
| intrinsicsrc/bsm.rs:199 | fn | 6 | 2 | 3 | 0 | 2.8 | |
| erfcsrc/normal.rs:131 | fn | 11 | 4 | 3 | 2 | 2.8 | |
| Ratio::floor_mulsrc/ratio.rs:148 | method | 3 | 1 | 8 | 1 | 2.6 | |
| cdfsrc/normal.rs:151 | fn | 3 | 1 | 6 | 1 | 2.6 | |
| mul_div_rem_truncsrc/ratio.rs:540 | fn | 19 | 5 | 5 | 3 | 2.5 | |
| Leg::profit_atsrc/payoff.rs:65 | method | 3 | 1 | 1 | 1 | 2.3 | |
| Ratio::ceil_mulsrc/ratio.rs:154 | method | 3 | 1 | 6 | 1 | 2.2 | |
| exp_neg_sqsrc/normal.rs:72 | fn | 5 | 1 | 1 | 0 | 2.2 | |
| payoff_atsrc/payoff.rs:71 | fn | 3 | 1 | 4 | 1 | 2.2 | |
| intrinsic_per_unitsrc/settle.rs:65 | fn | 10 | 4 | 7 | 1 | 2.1 | |
| d1_d2src/bsm.rs:111 | fn | 5 | 1 | 3 | 0 | 2.1 | |
| cmp_mulsrc/ratio.rs:562 | fn | 3 | 1 | 3 | 1 | 2 | |
| pricesrc/black76.rs:12 | fn | 3 | 1 | 6 | 1 | 2 | |
| erf_smallsrc/normal.rs:79 | fn | 11 | 3 | 2 | 0 | 2 | |
| erfc_positivesrc/normal.rs:92 | fn | 23 | 5 | 2 | 1 | 2 | |
| Ratio::checked_abssrc/ratio.rs:86 | method | 3 | 2 | 9 | 1 | 2 | |
| intervals_per_yearsrc/funding.rs:129 | fn | 3 | 1 | 3 | 0 | 1.9 | |
| Ratio::from_f64_roundedsrc/ratio.rs:211 | method | 11 | 5 | 6 | 2 | 1.9 |
Outside the workspace
serde serde_json