Skip to content

math.format 'engineering' not allowed, causes exception #1459

@hsmyers

Description

@hsmyers

In version 5.4.0
this code:

`t = math.format(div(G.four,G.fwidth),{notation: 'engineering'})`

where G.four and G.fwidth are both bignumbers and div is a short form of math.divide, raises this exception:

Error: Unknown notation "engineering". Choose "auto", "exponential", or "fixed".

The workaround is to use 'exponential' instead. Although to nit-pick, your use of precision differs by one (format needs 4 where toExponential needs 3) which should be noted in the documentation?

At any rate, this came as a surprise, not an upset as this was hardly the worst I ran into today. I continue to use math.js with great success and have already suggested it to two other programmers climbing down the rabbit hole along with me (fractals)! Thanks muchly for the incredible work put in for this very well done API/Library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions