psychrometrics / psychrolib

📚 Library of psychrometric functions to calculate 🌡️ thermodynamic properties of air for Python, C, C#, Fortran, R, JavaScript and VBA/Excel
MIT License
228 stars 62 forks source link

Typo in GetHumRatioFromSpecificHum within psychrolib.c #59

Closed BingWangUS closed 4 years ago

BingWangUS commented 4 years ago

Typo in the warning message at line 640.

dmey commented 4 years ago

Typo in the warning message at line 640.

Sorry but I do not see it -- can you be a bit more specific please?

BingWangUS commented 4 years ago

Sure. Here it is: https://github.com/psychrometrics/psychrolib/blob/f3a289191cc1c59b191d3739dcf2bf9bd8708664/src/c/psychrolib.c#L640 last one should be ] instead of [.

dmey commented 4 years ago

last one should be ] instead of [.

It looks OK to me, the bracket [ is used to indicate that that side of the interval is open. --the 1 is excluded. Is this unclear to you? Perhaps we could use a more standard notation and use parenthesis to indicate open intervals -- @didierthevenard would you be OK with that?

BingWangUS commented 4 years ago

Oh thanks for explaining that. Then all good.

didierthevenard commented 4 years ago

I am okay with changing it to the more standard notation. The [0,1[ notation comes from my education because that's how French mathematicians represent open intervals, but I came to realize that this is not how the rest of the world does it, [0,1) is used in the US (and in the UK?). Both notations are acceptable as laid out here: https://en.wikipedia.org/wiki/ISO_31-11. Use whatever will be understood by the greatest number of people.

dmey commented 4 years ago

Personally, I am familiar with both of them so I don't really mind but perhaps using parenthesis would make mote understandable to more people!? I have addressed this in #61 -- if that looks OK, please approve and will merge it in otherwise we can leave it as is...