Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/omc/tests/float/intrinsics.om # 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 Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / omc / tests / float / intrinsics.om` 34 lines ยท 565 bytes Raw Blame History 1 note fsqrt, fabs, fmin, fmax: one scalar FP instruction each; fmin/fmax are the IEEE minNum/maxNum rule. 2 fn main to int 3 a = fsqrt 4.0f64 4 if ne int a 2 5 ret 1 6 end 7 b = fabs -2.5f64 8 if ne bitcast ulong b `4612811918334230528` 9 ret 2 10 end 11 n = div 0.0f64 0.0f64 12 c = fmin n 1.5f64 13 if ne bitcast ulong c `4609434218613702656` 14 ret 3 15 end 16 d = fmax -0.0f64 0.0f64 17 if ne bitcast ulong d 0 18 ret 4 19 end 20 e = fsqrt f32 4.0f32 21 if ne int e 2 22 ret 5 23 end 24 f = f32 0.5 25 g = fabs f 26 if ne bitcast uint g `1056964608` 27 ret 6 28 end 29 h = fmax f32 -0.0f32 f32 0.0f32 30 if ne bitcast uint h 0 31 ret 7 32 end 33 ret 0 34 end