Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Accurately compute operations on u128 #3670

@kianenigma

Description

@kianenigma

Add minimal structures to the runtime arithmetic primitives to support most importantly

fn multiply_by_rational<N: Mul + Div>(a: N, b: N, c: N) -> Option<N>

The only tricky case will be u128. Rest is trivial.

This is needed to make all the computations in Staking and phragmen accurate for any possible balance type.

This will be a follow up of #3456

Metadata

Metadata

Assignees

Labels

J0-enhancementAn additional feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions