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 / sites / found-fminmax-2.om
| 1 | note sites: found by a one-token change of a tracked program; reaches the omc error site in fminmax (code 11) |
| 2 | note fsqrt, fabs, fmin, fmax: one scalar FP instruction each; fmin/fmax are the IEEE minNum/maxNum rule. |
| 3 | fn main to int |
| 4 | a = fsqrt 4.0f64 |
| 5 | if ne int a 2 |
| 6 | ret 1 |
| 7 | end |
| 8 | b = fabs -2.5f64 |
| 9 | if ne bitcast ulong b 4612811918334230528 |
| 10 | ret 2 |
| 11 | end |
| 12 | n = div 0.0f64 0.0f64 |
| 13 | c = fmin n -1 |
| 14 | if ne bitcast ulong c 4609434218613702656 |
| 15 | ret 3 |
| 16 | end |
| 17 | d = fmax -0.0f64 0.0f64 |
| 18 | if ne bitcast ulong d 0 |
| 19 | ret 4 |
| 20 | end |
| 21 | e = fsqrt f32 4.0f32 |
| 22 | if ne int e 2 |
| 23 | ret 5 |
| 24 | end |
| 25 | f = f32 0.5 |
| 26 | g = fabs f |
| 27 | if ne bitcast uint g 1056964608 |
| 28 | ret 6 |
| 29 | end |
| 30 | h = fmax f32 -0.0f32 f32 0.0f32 |
| 31 | if ne bitcast uint h 0 |
| 32 | ret 7 |
| 33 | end |
| 34 | ret 0 |
| 35 | end |