omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / seed / omc / om2 / hex / places-dec.om
| 1 | note SPDX-License-Identifier: Apache-2.0 |
| 2 | note Decimal twin of places-hex.om (values from Wolfram, wolfram.txt query tokens). |
| 3 | om2 |
| 4 | const KC uchar 200 |
| 5 | global g ulong 16 |
| 6 | fn rd t view uchar 8 to ulong |
| 7 | ret ulong get t 7 |
| 8 | end |
| 9 | fn wr s edit uchar 8 fresh to void |
| 10 | put s 7 90 |
| 11 | end |
| 12 | fn main to int |
| 13 | a = new uchar 8 0 |
| 14 | wr a |
| 15 | putu rd a |
| 16 | put g 15 7 |
| 17 | putu get g 15 |
| 18 | putu ulong KC |
| 19 | s = ulong 0 |
| 20 | for i ulong 4 unroll |
| 21 | s = add s i |
| 22 | end |
| 23 | putu s |
| 24 | k = ulong 0 |
| 25 | while lt k 100 bound 1000 |
| 26 | k = add k 1 |
| 27 | end |
| 28 | putu k |
| 29 | r = rotr uint 2147483649 31 |
| 30 | putu ulong r |
| 31 | q = rotl ulong 9223372036854775808 1 |
| 32 | putu q |
| 33 | f = f64 9007199254740993 |
| 34 | putu ulong f |
| 35 | h = f32 16777217 |
| 36 | putu ulong h |
| 37 | if eq k 0 |
| 38 | trap 14 |
| 39 | end |
| 40 | ret int and k 42 |
| 41 | end |