h3rald / min

A small but practical concatenative programming language and shell
https://min-lang.org
MIT License
311 stars 23 forks source link

Better floating point support #7

Closed PMunch closed 7 years ago

PMunch commented 7 years ago

Added better floating point support with nan, inf, ninf, and a == comparator for floats Fixed reqTwoSimilarNotSymbol, it was comparing a.kind == a.kind and a.isNumber && a.isNumber

PMunch commented 7 years ago

Added some short information to the reference sheet about the floating point behaviour. It's not really all that structure so feel free to make it a bit more clear (I really like how the docs are currently structured, nice and clean)

h3rald commented 7 years ago

Looks very nice!

I tried it out and it seems to work as advertised :) I think we could use -inf instead of ninf as that’s what you’ll get if you try to run -10 0 /.

As for the docs... I’ll document the new symbols no worries — I wouldn’t add those information right on the reference page really, but that’s me being a documentation zealot... 7 years as a tech writer and manager do that to you ;)

Thanks again, I’ll hopefully merge it soon!

PMunch commented 7 years ago

I'll change it to -inf, wasn't quite sure if that would be a valid symbol (no worries, it was just me not reading the docs).

That explains a lot, the documentation for min is super nice. Really like the way it's laid out and organised. Only thing is that it could benefit from a search function.

PMunch commented 7 years ago

There, now it's -inf instead of ninf. I'm making progress on the dynamic loading by the way.