josdejong/mathjs

Error comparing temperature units with offset

Open

#3,134 建立於 2024年1月21日

在 GitHub 查看
 (11 留言) (0 反應) (0 負責人)JavaScript (1,298 fork)batch import
bughelp wanted

倉庫指標

Star
 (13,832 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Hi,

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

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.

貢獻者指南