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/cortex/blob/main/tests/json/t_f64.om # cortex aien-dev/cortex Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `cortex / tests / json / t_f64.om` 62 lines ยท 977 bytes Raw Blame History 1 note tests/json/t_f64.om - differential harness for f64.om: per 8-byte f64 bit pattern one record 2 note "ryu zmij serde parse" (see the oracle's f64 mode). Needs t_io.om. 3 fn t_u64 to ulong 4 v = ulong 0 5 p = get tibp 0 6 for k ulong 8 7 v = or v shl ulong get tib add p k mul k 8 8 end 9 put tibp 0 add p 8 10 ret v 11 end 12 fn t_hex v ulong to void 13 for k ulong 16 14 js_byte get jthex and shr v mul sub 15 k 4 15 15 end 16 end 17 fn main to int 18 num_init 19 for it ulong `100000000` 20 if not t_need 8 21 t_flush 22 ret 0 23 end 24 b = t_u64 25 put jobl 0 0 26 if eq and b `9218868437227405312` `9218868437227405312` 27 js_byte 45 28 else 29 num_ryu b false 30 num_jfb 31 end 32 js_byte 32 33 s0 = get jobl 0 34 js_f64z b 35 s1 = get jobl 0 36 js_byte 32 37 js_f64 b 38 js_byte 32 39 for i ulong sub s1 s0 40 x = get job add s0 i 41 put jin i x 42 end 43 put jinl 0 sub s1 s0 44 if js_parse 45 k = js_kind get jroot 0 46 if eq k 5 47 js_byte 102 48 t_hex js_num get jroot 0 49 else 50 js_byte 105 51 js_canon get jroot 0 52 end 53 else 54 js_byte 69 55 for i ulong get jeml 0 56 js_byte get jem i 57 end 58 end 59 t_emitjob 60 end 61 ret 1 62 end