diff options
| author | 2026-02-22 03:18:43 +0000 | |
|---|---|---|
| committer | 2026-02-22 03:18:43 +0000 | |
| commit | 627a8943856c70ef12232e5dbaa1397587198f98 (patch) | |
| tree | aba005dc18caed4cb77e3578243a9733757d884f /res/nist/expressions.nc | |
| parent | add build.sh (diff) | |
| download | rs274ngc-627a8943856c70ef12232e5dbaa1397587198f98.tar.gz | |
Diffstat (limited to 'res/nist/expressions.nc')
| -rw-r--r-- | res/nist/expressions.nc | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/res/nist/expressions.nc b/res/nist/expressions.nc new file mode 100644 index 0000000..68e7c16 --- /dev/null +++ b/res/nist/expressions.nc | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | n0010 g21 g1 x3 f20 (expression test) | ||
| 2 | n0020 x [1 + 2] (x should be 3) | ||
| 3 | n0030 x [1 - 2] (x should be -1) | ||
| 4 | n0040 x [1 --3] (x should be 4) | ||
| 5 | n0050 x [2/5] (x should be 0.40) | ||
| 6 | n0060 x [3.0 * 5] (x should be 15) | ||
| 7 | n0070 x [0 OR 0] (x should be 0) | ||
| 8 | n0080 x [0 OR 1] (x should be 1) | ||
| 9 | n0090 x [2 or 2] (x should be 1) | ||
| 10 | n0100 x [0 AND 0] (x should be 0) | ||
| 11 | n0110 x [0 AND 1] (x should be 0) | ||
| 12 | n0120 x [2 and 2] (x should be 1) | ||
| 13 | n0130 x [0 XOR 0] (x should be 0) | ||
| 14 | n0140 x [0 XOR 1] (x should be 1) | ||
| 15 | n0150 x [2 xor 2] (x should be 0) | ||
| 16 | n0160 x [15 MOD 4.0] (x should be 3) | ||
| 17 | n0170 x [1 + 2 * 3 - 4 / 5] (x should be 6.2) | ||
| 18 | n0180 x sin[30] (x should be 0.5) | ||
| 19 | n0190 x cos[0.0] (x should be 1.0) | ||
| 20 | n0200 x tan[60.0] (x should be 1.7321) | ||
| 21 | n0210 x sqrt[3] (x should be 1.7321) | ||
| 22 | n0220 x atan[1.7321]/[1.0] (x should be 60.0) | ||
| 23 | n0230 x asin[1.0] (x should be 90.0) | ||
| 24 | n0240 x acos[0.707107] (x should be 45.0000) | ||
| 25 | n0250 x abs[20.0] (x should be 20) | ||
| 26 | n0260 x abs[-1.23] (x should be 1.23) | ||
| 27 | n0270 x round[-0.499] (x should be 0) | ||
| 28 | n0280 x round[-0.5001] (x should be -1.0) | ||
| 29 | n0290 x round[2.444] (x should be 2) | ||
| 30 | n0300 x round[9.975] (x should be 10) | ||
| 31 | n0310 x fix[-0.499] (x should be -1.0) | ||
| 32 | n0320 x fix[-0.5001] (x should be -1.0) | ||
| 33 | n0330 x fix[2.444] (x should be 2) | ||
| 34 | n0340 x fix[9.975] (x should be 9) | ||
| 35 | n0350 x fup[-0.499] (x should be 0.0) | ||
| 36 | n0360 x fup[-0.5001] (x should be 0.0) | ||
| 37 | n0370 x fup[2.444] (x should be 3) | ||
| 38 | n0380 x fup[9.975] (x should be 10) | ||
| 39 | n0390 x exp[2.3026] (x should be 10) | ||
| 40 | n0400 x ln[10.0] (x should be 2.3026) | ||
| 41 | n0410 x [2 ** 3.0] #1=2.0 (x should be 8.0) | ||
| 42 | n0420 ##1 = 0.375 (#1 is 2, so parameter 2 is set to 0.375) | ||
| 43 | n0430 x #2 (x should be 0.375) #3=7.0 | ||
| 44 | n0440 #3=5.0 x #3 (parameters set in parallel, so x should be 7, not 5) | ||
| 45 | n0450 x #3 #3=1.1 (parameters set in parallel, so x should be 5, not 1.1) | ||
| 46 | n0460 x [2 + asin[1/2.1+-0.345] / [atan[fix[4.4] * 2.1 * sqrt[16.8]] /[-18]]**2] | ||
| 47 | n0470 x sqrt[3**2 + 4**2] (x should be 5.0) | ||
| 48 | n0480 m2 | ||
