Closed
Description
Summary
"300 degC" is wrongly converted to "300 K". Probably it is a bug in mathjs. I tested with (10.2.4).
Steps to Reproduce
to reproduce it one can store a scalar value with 'degC' unit or simpler in nodejs
unit("300 degC").toSI().toJSON()
### Current Behaviour
```json
{ mathjs: 'Unit', value: 300, unit: 'K', fixPrefix: true }
Expected Behaviour
{ mathjs: 'Unit', value: 573.15, unit: 'K', fixPrefix: true }
Extra Details
Workaround for the problem could be to change the above line of the code in convertToSI to something like
unit(inputValue, inputUnit).to(unit(inputUnit).toSI()).toJSON()
which gives the correct result
{ mathjs: 'Unit', value: 573.15, unit: 'K', fixPrefix: true }
Metadata
Metadata
Assignees
Labels
No labels