Skip to content

Insufficient decimal places for results lower than 1 #38

@benPesso

Description

@benPesso

This script should be extended to handle cases where the resulting conversion is lower than 1. Most common example would cryptocurrencies such as Bitcoin. Because the ration is so huge, and a single dollar is worth less than 0.0001 BTC, more decimal spaces are needed to properly display the resulting conversion.

In the current implementation, conv 1 USD BTC would result in 0.00 BTC, which is obviously incorrect. What the script should do instead is check whether the resulting conversion is lower than 1, and format the result using an alternate decimal places property. Say, MICRO_DECIMAL_PLACES.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions