Skip to content

Lossy Conversion of Units #67

@AmeanAsad

Description

@AmeanAsad

Description:

Deploying payouts from a csv requires a conversion of an f64 (in attofil units) -> u128 -> U256 value. This conversion becomes lossy for an f64 value >= 50000000000000000000000 (50,000 FIL * 10^18 ).

Example:
Converting 50000000000000000000000 from f64 to u128 in rust yields: 49999999999999995805696.

This means that in the case an earning is placed > 50,000 FIL the conversion will have a margin of error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions