interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / evidence / ECOSYSTEM6 / ref32-review / add-red.om

50 lines · 1340 bytes Raw Blame History
1note Missing addition behavior baseline.
2fn add32 a ulong b ulong to ulong
3ret 0
4end
5note SPDX-License-Identifier: AGPL-3.0-only
6global failed ulong 1
7global tested ulong 1
8global line uchar 48
9fn report ok bool to void
10id = add get tested 0 1
11put tested 0 id
12put line 0 48
13put line 1 uchar add 48 rem div id 100 10
14put line 2 uchar add 48 rem div id 10 10
15put line 3 uchar add 48 rem id 10
16put line 4 32
17put line 5 48
18if not ok
19put line 5 49
20put failed 0 add get failed 0 1
21end
22put line 6 10
23w = write 1 line 0 7
24if ne w 7
25exit 74
26end
27end
28note Native RNE addition boundary cases, expected IEEE binary32 bits.
29fn main to int
30report eq add32 1065353216 1065353216 1073741824
31report eq add32 3212836864 1065353216 0
32report eq add32 2147483648 2147483648 2147483648
33report eq add32 2147483648 0 0
34report eq add32 2139095040 4286578688 2143289344
35report eq add32 2139095040 1065353216 2139095040
36report eq add32 2143289345 1065353216 2143289344
37report eq add32 1 1 2
38report eq add32 8388607 1 8388608
39report eq add32 8388608 2155872255 1
40report eq add32 2139095039 2139095039 2139095040
41report eq add32 1065353216 864026624 1065353216
42report eq add32 1065353217 864026624 1065353218
43report eq add32 1065353216 3011510272 1065353215
44report eq add32 1065353216 1 1065353216
45report eq add32 1 2147483649 0
46if ne get failed 0 0
47ret 1
48end
49ret 0
50end