h3rald / min

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

`neg` Symbol Needed #81

Closed ghost closed 3 years ago

ghost commented 3 years ago

Does a symbol like neg that negatives given numbers exist in Min?

-1 => 1 -inf => inf

?????

ghost commented 3 years ago

I write a symbol for, but this is not the efficient way.

h3rald commented 3 years ago

Hmm basically multiplying by -1, right? Sure, I'll add it... and I'll add abs as well, because it's missing too!

ghost commented 3 years ago

There are some math tools missing. Yes one of is abs. I don't think even to multiplying the number by -1. MY faulting again. My symbol includes eval. I thought hard way.

h3rald commented 3 years ago

Thinking about it... I am not gonna add a neg symbol, as yes multiplying by -1 would give you the right result... but I am gonna add abs anyway.

h3rald commented 3 years ago

Fixed in v0.29.0