Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec-tests / sandbox / extraction / piecewise_lin / ex6sat.lus @ 43460259

History | View | Annotate | Download (621 Bytes)

1
node top(in0 : real) returns (sx0, x0, x1, x2, x3, x4 : real);
2
let
3
  assert(in0 >= -1. and in0 <= 1.);
4
  x0 = 0. -> 0.4250 * pre sx0 + 0.8131 * in0;
5
  x1 = 0. -> 0.3167 * pre sx0 + 0.1016 * pre x1 - 0.4444 * pre x2 + 0.1807 * in0;
6
  x2 = 0. -> 0.1278 * pre sx0 + 0.4444 * pre x1 + 0.8207 * pre x2 + 0.0729 * in0;
7
  x3 = 0. -> 0.0365 * pre sx0 + 0.1270 * pre x1 + 0.5202 * pre x2 + 0.4163 * pre x3 - 0.5714 * pre x4 + 0.0208 * in0;
8
  x4 = 0. -> 0.0147 * pre sx0 + 0.0512 * pre x1 + 0.2099 * pre x2 + 0.57104 * pre x3 + 0.7694 * pre x4 + 0.0084 * in0;
9
  sx0 = if x0 > 0.5 then 0.5 else if x0 < -0.5 then -0.5 else x0;
10
tel;