Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

fix test cosh^2(x)-sinh^2(x)=1 #783

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion flattening/modelica/built-in-functions/TrigIdentity.mo
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ end TrigIdentity;
// Result:
// class TrigIdentity
// Real x = 1.0;
// Real y = time;
// Real y = sin(asin(time));
// Real z = sin(2.0 * time);
// end TrigIdentity;
// endResult
6 changes: 3 additions & 3 deletions openmodelica/bootstrapping/SimplifyTest.mo
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@ package SimplifyTest "Run ExpressionSimplify.simplify on some sample expressions
Exp Exp36_2 = BINARY(cosrx,mulr,sinrx) "sin(2*x) = 2*sin(x)*cos(x)";

Exp Exp37_1 = BINARY(BINARY(sinrx,powr,RCONST(2.0)),addr,BINARY(cosrx,powr,RCONST(2.0))) "sin^2 + cos^2 = 1";
Exp Exp37_2 = BINARY(BINARY(cosrx,powr,RCONST(2.0)),addr,BINARY(sinrx,powr,RCONST(2.0))) "sin^2 + cos^2 = 1";
Exp Exp37_2 = BINARY(BINARY(cosrx,powr,RCONST(2.0)),addr,BINARY(sinrx,powr,RCONST(2.0))) "cos^2 + sin^2 = 1";

Exp Exp38_1 = BINARY(cosrx, mulr, tanrx) "sin(x)*tan(x)";
Exp Exp38_2 = BINARY(tanrx, mulr, cosrx) "sin(x)*tan(x)";

Exp Exp39_1 = BINARY(BINARY(sinhrx,powr,RCONST(2.0)),addr,BINARY(coshrx,powr,RCONST(2.0))) "sinh^2 + cosh^2 = 1";
Exp Exp39_2 = BINARY(BINARY(coshrx,powr,RCONST(2.0)),addr,BINARY(sinhrx,powr,RCONST(2.0))) "sinh^2 + cosh^2 = 1";
Exp Exp39_1 = BINARY(BINARY(coshrx,powr,RCONST(2.0)),addr,UNARY(usubr,BINARY(sinhrx,powr,RCONST(2.0)))) "cosh^2(x) + (-sinh^2(x)) = 1";
Exp Exp39_2 = BINARY(UNARY(usubr,BINARY(sinhrx,powr,RCONST(2.0))),addr,BINARY(coshrx,powr,RCONST(2.0))) "(-sinh^2(x)) + cosh^2(x) = 1";

Exp Exp40_1 = BINARY(cosrx, mulr, tanrx) "tanh(x)*cosh(x) = sinh(x)";
Exp Exp40_2 = BINARY(tanrx, mulr, cosrx) "tanh(x)*cosh(x) = sinh(x)";
Expand Down
4 changes: 2 additions & 2 deletions openmodelica/bootstrapping/SimplifyTest.mos
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ getErrorString();
// simplify(cos(x) ^ 2.0 + sin(x) ^ 2.0) = 1.0
// simplify(cos(x) * tan(x)) = sin(x)
// simplify(tan(x) * cos(x)) = sin(x)
// simplify(sinh(x) ^ 2.0 + cosh(x) ^ 2.0) = 1.0
// simplify(cosh(x) ^ 2.0 + sinh(x) ^ 2.0) = 1.0
// simplify(cosh(x) ^ 2.0 + (-sinh(x) ^ 2.0)) = 1.0
// simplify((-sinh(x) ^ 2.0) + cosh(x) ^ 2.0) = 1.0
// simplify(cos(x) * tan(x)) = sin(x)
// simplify(tan(x) * cos(x)) = sin(x)
// simplify(x + (-y)) = x - y
Expand Down