josdejong / josdejong/mathjs

Error comparing temperature units with offset

Open
#3,134 11 comments 0 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
15.1k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

Hi,

In versiones newer than 11.4.1 the comparison of temperatures is incorrect between some temperature units when an offset is involved.

```jl
lowTemp = 9 degC;
highTemp = 10 degC;

lowTemp < highTemp # true
lowTemp to degF < highTemp # false but should be true
lowTemp to K < highTemp # false but should be true
lowTemp to degR < highTemp # false but should be true
lowTemp to K < highTemp to degF # false but should be true
lowTemp to degR < highTemp to degF # false but should be true
```

This was discussed in #2518 but this might need to be a separate issue.

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.