Menu

#7 Request changes to simplification

wont-fix
nobody
None
5
2020-10-14
2007-11-16
Anonymous
No

There are a couple of changes I'd like to see in the simplification of expressions:

a) 0.023221816473366186 + 0.005917967251596767 + Jaen + 0.6737908229858149 + ((Albacete-Albacete)+(Jaen/(-0.8746988767614572)))

simplifies to

(0.005917967251596767*0.8746988767614572+0.023221816473366186*0.8746988767614572+0.6737908229858149*0.8746988767614572-Jaen+0.8746988767614572*Jaen)/0.8746988767614572

Would it be possible to have constant expressions simplified to a single constant where possible...at least addition, subtraction and multiplication of constants.

b) d2 + d3 + (-0.004910533713945009) + (0.12838486275602712*d4) + (pow((d4/d1),(d3/d3))-d2)

simplified to

-0.004910533713945009+d3+0.12838486275602712*d4+pow(d4/d1, 1)

Could pow(x, 1) be simplified to x?

Discussion

  • Raphael Jolly

    Raphael Jolly - 2020-10-08

    At the moment, decimal numbers are represented symbolically in JSCL, they are treated as variables. So, they can't easily undergo arithmetic operations. These would need a symbolic-numeric setting (with polynomials over Double for instance). I am investigating a more rigorous (statically typed) approach with ScAS, that should enable it. But not in JSCL, sorry for that.

    simplify(x^1) is fixed in 2.4.13.

     
  • Raphael Jolly

    Raphael Jolly - 2020-10-14
    • status: open --> wont-fix
    • Group: --> Next_Release_(example)
     

Log in to post a comment.

MongoDB Logo MongoDB