josdejong/mathjs

Error comparing temperature units with offset

Open

#3.134 geöffnet am 21. Jan. 2024

Auf GitHub ansehen
 (11 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.298 Forks)batch import
bughelp wanted

Repository-Metriken

Stars
 (13.832 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide