lustrec-tests/sandbox/extraction/piecewise_lin/ex2sat.lus @ 43460259
1 |
node top(in0 : real) returns (sx0, x0, x1, x2, x3 : real); |
---|---|
2 |
let
|
3 |
assert(in0 >= -1. and in0 <= 1.); |
4 |
x0 = 0. -> 1.5 * pre sx0 - 0.7 * pre x1 - 0.7 * pre x2 + 0.4 * pre x3 + 0.5 * in0; |
5 |
x1 = 0. -> pre sx0; |
6 |
x2 = 0. -> in0; |
7 |
x3 = 0. -> pre x2; |
8 |
sx0 = if x0 > 0.5 then 0.5 else if x0 < -0.5 then -0.5 else x0; |
9 |
tel
|