Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (670 Bytes)

1
node top(in0, in1 : real) returns (sx0, x0, x1, x2, x3 : real);
2
let
3
  assert(in0 >= -1. and in0 <= 1.);
4
  assert(in1 >= -1. and in1 <= 1.);
5
  x0 = 0. -> 0.6227 * pre sx0 + 0.3871 * pre x1 - 0.113 * pre x2 + 0.0102 * pre x3 + 0.3064 * in0 + 0.1826 * in1;
6
  x1 = 0. -> -0.3407 * pre sx0 + 0.9103 * pre x1 - 0.3388 * pre x2 + 0.0649 * pre x3 - 0.0054 * in0 + 0.6731 * in1;
7
  x2 = 0. -> 0.0918 * pre sx0 - 0.0265 * pre x1 - 0.7319 * pre x2 + 0.2669 * pre x3 + 0.0494 * in0 + 1.6138 * in1;
8
  x3 = 0. -> 0.2643 * pre sx0 - 0.1298 * pre x1 - 0.9903 * pre x2 + 0.3331 * pre x3 - 0.0531 * in0 + 0.4012 * in1;
9
  sx0 = if x0 > 0.5 then 0.5 else if x0 < -0.5 then -0.5 else x0;
10
tel