Opened 14 years ago

Last modified 14 years ago

#1517 closed defect (fixed)

Simplify power and sqrt rules

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Frenkel TUD, Peter Aronsson, Willi Braun

Description

Make the following return prettier expressions

model M
  Real x = sqrt(time)*(time^(0.5))*((time^(-0.5))^5)*(time^(-0.5));
  Real y = time^2^3;
end M;

Change History (2)

comment:1 by Martin Sjölund, 14 years ago

Forgot that the issue with sqrt(time) remains. Jens/Willi/PeterA: What would be your take on simply translating sqrt(X) to X0.5? Bad? Should we just add rules for sqrt(X)N instead? sqrt(X)2 = X even for negative X, right?

comment:2 by Martin Sjölund, 14 years ago

Fixed with r9166 (mul/add now take sqrt into account)

Note: See TracTickets for help on using tickets.