josdejong / josdejong/mathjs

Custom units having unexpected effects on results

Open
#1,306 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I'm encountering an issue where custom units are changing how expressions that do not include the new unit are evaluated.

Example:

```
var result = math.eval('1 km / hour') //answer is 1 km/hour
math.createUnit('mph', {definition: '1.0 mile/hour'})
result = math.eval('1 km / hour') //answer is now 0.6213711922373341 mph
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.