rangeProbabilityRaw function
pricing::probability — the range's own probability, up(lower) − up(higher) with the chain's saturating subtraction and its
infinite-boundary defaults.
Named with the Raw suffix (official: cost.rangeProbability) because
Dart exports this module flat and pricing.dart owns the float
rangeProbability.
Implementation
BigInt rangeProbabilityRaw(Boundaries boundaries) {
_assertBoundaries(boundaries);
final lower = boundaries.lowerUp ?? FLOAT_SCALING;
final higher = boundaries.higherUp ?? BigInt.zero;
return lower > higher ? lower - higher : BigInt.zero;
}