loda-lang / loda-cpp

Runtime and miner for the LODA language written in C++
https://loda-lang.org/
Apache License 2.0
21 stars 1 forks source link

Improve detection of negative terms #315

Closed ckrause closed 7 months ago

ckrause commented 8 months ago

For exponentiation: if the base is a non-negative constant, we can infer that the result is also non-negative. This should simplify the formulas for decimal expansions of rationals.

Also for floor and truncate, we can improve the decision.