on master help sign in
Merge pull request #1218 from tinnus-napbus/update-stdlib-3a-to-3g

update stdlib sections 3a to 3g

commit819df11e645f4cfc2db7644e3b70b1cd9ab9a1c6 authortinnus-napbus <77721746+tinnus-napbus@users.noreply.github.com> dateSun 17 Oct 2021, 00:52 (5 years ago) parentbab05fc654c074
8 files changed+2948−2822
content/docs/hoon/reference/stdlib/3a.md+234−232 content/docs/hoon/reference/stdlib/3b.md+1384−1390 content/docs/hoon/reference/stdlib/3c.md+241−242 content/docs/hoon/reference/stdlib/3d.md+437−452 content/docs/hoon/reference/stdlib/3f.md+444−314 content/docs/hoon/reference/stdlib/3g.md+124−134 content/docs/hoon/reference/stdlib/table-of-contents.md+39−34 lib/glossary.js+45−24
content/docs/hoon/reference/stdlib/3a.md+234−232
@@ -8,9 +8,9 @@ template = "doc.html"
88
99Extended Euclidean algorithm
1010
11−Produces `d`, the
12−[greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor)
13−of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
11+Produces `d`, the [greatest common
12+divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor) of `a` and `b`.
13+Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
1414
1515#### Accepts
1616
@@ -29,28 +29,28 @@ of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
2929#### Source
3030
3131```hoon
32− ++ egcd
33− |= [a=@ b=@]
34− =+ si
35− =+ [c=(sun a) d=(sun b)]
36− =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
37− |- ^- [d=@ u=@s v=@s]
38− ?: =(--0 c)
39− [(abs d) d.u d.v]
40− =+ q=(fra d c)
41− %= $
42− c (dif d (pro q c))
43− d c
44− u [(dif d.u (pro q c.u)) c.u]
45− v [(dif d.v (pro q c.v)) c.v]
46− ==
32+++ egcd
33+ |= [a=@ b=@]
34+ =+ si
35+ =+ [c=(sun a) d=(sun b)]
36+ =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
37+ |- ^- [d=@ u=@s v=@s]
38+ ?: =(--0 c)
39+ [(abs d) d.u d.v]
40+ =+ q=(fra d c)
41+ %= $
42+ c (dif d (pro q c))
43+ d c
44+ u [(dif d.u (pro q c.u)) c.u]
45+ v [(dif d.v (pro q c.v)) c.v]
46+ ==
4747```
4848
4949#### Examples
5050
5151```
52− > (egcd 11 2)
53− [d=1 u=--1 v=-5]
52+> (egcd 11 2)
53+[d=1 u=--1 v=-5]
5454```
5555
5656---
@@ -59,14 +59,18 @@ of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
5959
6060Modulo prime
6161
62−Container core for modular arithmetic functions.
62+Container `door` for modular arithmetic functions.
63+
64+#### Accepts
65+
66+`a` is an atom
6367
6468#### Source
6569
6670```hoon
67− ++ fo
68− ^?
69− |_ a=@
71+++ fo
72+ ^|
73+ |_ a=@
7074```
7175
7276---
@@ -79,7 +83,7 @@ Produces the difference between atoms `b` and `c`, with `a` as the modular base.
7983
8084#### Accepts
8185
82−`a` is an atom.
86+`a` is an atom, and is the sample of `+fo`.
8387
8488`b` is an atom.
8589
@@ -92,19 +96,19 @@ An atom.
9296#### Source
9397
9498```hoon
95− ++ dif
96− |= [b=@ c=@]
97− (sit (sub (add a b) (sit c)))
99+++ dif
100+ |= [b=@ c=@]
101+ (sit (sub (add a b) (sit c)))
98102```
99103
100104#### Examples
101105
102106```
103− > (~(dif fo 6) 1 2)
104− 5
107+> (~(dif fo 6) 1 2)
108+5
105109
106− > (~(dif fo 21) 11 45)
107− 8
110+> (~(dif fo 21) 11 45)
111+8
108112```
109113
110114---
@@ -117,7 +121,7 @@ Produces the power of `c` raised to the `b`, with `a` as the modular base.
117121
118122#### Accepts
119123
120−`a` is an atom.
124+`a` is an atom, and is the sample of `+fo`.
121125
122126`b` is an atom.
123127
@@ -130,13 +134,13 @@ An atom.
130134#### Source
131135
132136```hoon
133− ++ exp
134− |= [b=@ c=@]
135− ?: =(0 b)
136− 1
137− =+ d=$(b (rsh 0 1 b))
138− =+ e=(pro d d)
139− ?:(=(0 (end 0 1 b)) e (pro c e))
137+++ exp
138+ |= [b=@ c=@]
139+ ?: =(0 b)
140+ 1
141+ =+ d=$(b (rsh 0 b))
142+ =+ e=(pro d d)
143+ ?:(=(0 (end 0 b)) e (pro c e))
140144```
141145
142146#### Examples
@@ -165,7 +169,7 @@ Produces the quotient of `b` divided by `c`, with `a` as the modular base.
165169
166170#### Accepts
167171
168−`a` is an atom.
172+`a` is an atom, and is the sample of `+fo`.
169173
170174`b` is an atom.
171175
@@ -175,34 +179,28 @@ Produces the quotient of `b` divided by `c`, with `a` as the modular base.
175179
176180An atom.
177181
178−#### Accepts
179−
180−`a` is an atom.
181−
182−`b` is an atom.
183−
184182#### Source
185183
186184```hoon
187− ++ fra
188− |= [b=@ c=@]
189− (pro b (inv c))
185+++ fra
186+ |= [b=@ c=@]
187+ (pro b (inv c))
190188```
191189
192190#### Examples
193191
194192```
195− > (~(fra fo 2) 8 2)
196− 0
193+> (~(fra fo 2) 8 2)
194+0
197195
198− > (~(fra fo 3) 8 2)
199− 1
196+> (~(fra fo 3) 8 2)
197+1
200198
201− > (~(fra fo 4) 8 2)
202− 0
199+> (~(fra fo 4) 8 2)
200+0
203201
204− > (~(fra fo 5) 8 2)
205− 4
202+> (~(fra fo 5) 8 2)
203+4
206204```
207205
208206---
@@ -212,11 +210,11 @@ An atom.
212210Inverse
213211
214212Produces an atom by taking the signed modulus of `a` with the coefficient `u`;
215−`u` is produced by taking the `++egcd` of `a` and `b`.
213+`u` is produced by taking the [`+egcd`](#egcd) of `a` and `b`.
216214
217215#### Accepts
218216
219−`a` is an atom.
217+`a` is an atom, and is the sample of `+fo`.
220218
221219`b` is an atom.
222220
@@ -227,29 +225,29 @@ An atom.
227225#### Source
228226
229227```hoon
230− ++ inv
231− |= b=@
232− =+ c=(dul:si u:(egcd b a) a)
233− c
228+++ inv
229+ |= b=@
230+ =+ c=(dul:si u:(egcd b a) a)
231+ c
234232```
235233
236234#### Examples
237235
238236```
239− > (~(inv fo 11) 2)
240− 6
237+> (~(inv fo 11) 2)
238+6
241239
242− > (~(inv fo 71) 255)
243− 22
240+> (~(inv fo 71) 255)
241+22
244242
245− > (~(inv fo 79) 255)
246− 22
243+> (~(inv fo 79) 255)
244+22
247245
248− > (~(inv fo 78) 255)
249− 67
246+> (~(inv fo 78) 255)
247+67
250248
251− > (~(inv fo 70) 255)
252− 67
249+> (~(inv fo 70) 255)
250+67
253251```
254252
255253---
@@ -262,7 +260,7 @@ Produces the multiplication of `b` and `c` modulo `a`.
262260
263261#### Accepts
264262
265−`a` is an atom.
263+`a` is an atom, and is the sample of `+fo`.
266264
267265`b` is an atom.
268266
@@ -275,19 +273,19 @@ An atom.
275273#### Source
276274
277275```hoon
278− ++ pro
279− |= [b=@ c=@]
280− (sit (mul b c))
276+++ pro
277+ |= [b=@ c=@]
278+ (sit (mul b c))
281279```
282280
283281#### Examples
284282
285283```
286− > (~(pro fo 3) 11 4)
287− 2
284+> (~(pro fo 3) 11 4)
285+2
288286
289− > (mod 44 3)
290− 2
287+> (mod 44 3)
288+2
291289```
292290
293291---
@@ -300,7 +298,7 @@ Produces the remainder of `b` modulo `a`.
300298
301299#### Accepts
302300
303−`a` is an atom.
301+`a` is an atom, and is the sample of `+fo`.
304302
305303`b` is an atom.
306304
@@ -311,16 +309,16 @@ An atom.
311309#### Source
312310
313311```hoon
314− ++ sit
315− |= b=@
316− (mod b a)
312+++ sit
313+ |= b=@
314+ (mod b a)
317315```
318316
319317#### Examples
320318
321319```
322− > (~(sit fo 3) 14)
323− 2
320+> (~(sit fo 3) 14)
321+2
324322```
325323
326324---
@@ -333,7 +331,7 @@ Produces the remainder of `(b + c) mod a`.
333331
334332#### Accepts
335333
336−`a` is an atom.
334+`a` is an atom, and is the sample of `+fo`.
337335
338336`b` is an atom.
339337
@@ -346,20 +344,19 @@ An atom.
346344#### Source
347345
348346```hoon
349− ++ sum
350− |= [b=@ c=@]
351− (sit (add b c))
352− --
347+++ sum
348+ |= [b=@ c=@]
349+ (sit (add b c))
353350```
354351
355352#### Examples
356353
357354```
358− > (~(sum fo 3) 14 3)
359− 2
355+> (~(sum fo 3) 14 3)
356+2
360357
361− > (mod 17 3)
362− 2
358+> (mod 17 3)
359+2
363360```
364361
365362---
@@ -373,9 +370,9 @@ Container core for signed integer functions.
373370#### Source
374371
375372```hoon
376− ++ si
377− ^?
378− |%
373+++ si
374+ ^?
375+ |%
379376```
380377
381378#### Discussion
@@ -390,15 +387,17 @@ signed integers correspond to odd atoms of twice their absolute value minus
390387one. For example:
391388
392389```
393− > `@`--4
394− 8
395− > `@s`8
396− --4
390+> `@`--4
391+8
392+> `@s`8
393+--4
394+```
397395
398− > `@`-4
399− 7
400− > `@s`7
401− -4
396+```
397+> `@`-4
398+7
399+> `@s`7
400+-4
402401```
403402
404403---
@@ -420,17 +419,17 @@ An atom.
420419#### Source
421420
422421```hoon
423− ++ abs |=(a=@s (add (end 0 1 a) (rsh 0 1 a)))
422+++ abs |=(a=@s (add (end 0 a) (rsh 0 a)))
424423```
425424
426425#### Examples
427426
428427```
429− > (abs:si -11)
430− 11
428+> (abs:si -11)
429+11
431430
432− > (abs:si --520)
433− 520
431+> (abs:si --520)
432+520
434433```
435434
436435---
@@ -454,18 +453,18 @@ A signed integer.
454453#### Source
455454
456455```hoon
457− ++ dif |= [a=@s b=@s]
458− (sum a (new !(syn b) (abs b)))
456+++ dif |= [a=@s b=@s]
457+ (sum a (new !(syn b) (abs b)))
459458```
460459
461460#### Examples
462461
463462```
464− > (dif:si --3 -2)
465− --5
463+> (dif:si --3 -2)
464+--5
466465
467− > (dif:si -3 --2)
468− -5
466+> (dif:si -3 --2)
467+-5
469468```
470469
471470---
@@ -489,23 +488,23 @@ An atom.
489488#### Source
490489
491490```hoon
492− ++ dul |= [a=@s b=@]
493− =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c)))
491+++ dul |= [a=@s b=@]
492+ =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c)))
494493```
495494
496495#### Examples
497496
498497```
499− > `@s`(dul:si -1 --5)
500− -5
498+> `@s`(dul:si -1 --5)
499+-5
501500
502− > `@`--5
503− 10
504− > `@s`(dul:si -1 10)
505− -5
501+> `@`--5
502+10
503+> `@s`(dul:si -1 10)
504+-5
506505
507− > `@s`(dul:si -11 -61)
508− --55
506+> `@s`(dul:si -11 -61)
507+--55
509508```
510509
511510---
@@ -529,28 +528,28 @@ A signed atom.
529528#### Source
530529
531530```hoon
532− ++ fra |= [a=@s b=@s]
533− (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
531+++ fra |= [a=@s b=@s]
532+ (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
534533```
535534
536535#### Examples
537536
538537```
539− > (fra:si -1 -1)
540− --1
538+> (fra:si -1 -1)
539+--1
541540
542− > (fra:si -11 --2)
543− -5
541+> (fra:si -11 --2)
542+-5
544543
545− > (fra:si -0 -1)
546− --0
544+> (fra:si -0 -1)
545+--0
547546```
548547
549548---
550549
551550### `++new:si`
552551
553−Atom to @s
552+Atom to `@s`
554553
555554Produces a signed integer from an atom `b`. The product's sign is determined
556555by the value of flag `a`: `&` will result in a prepending `--`, and `|` will
@@ -569,24 +568,24 @@ A signed integer.
569568#### Source
570569
571570```hoon
572− ++ new |= [a=? b=@]
573− `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b)))))
571+++ new |= [a=? b=@]
572+ `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b)))))
574573```
575574
576575#### Examples
577576
578577```
579− > (new:si | 2)
580− -2
578+> (new:si | 2)
579+-2
581580
582− > (new:si & 2)
583− --2
581+> (new:si & 2)
582+--2
584583
585− > (new:si & -2)
586− --3
584+> (new:si & -2)
585+--3
587586
588− > (new:si & --2)
589− --4
587+> (new:si & --2)
588+--4
590589```
591590
592591---
@@ -604,7 +603,7 @@ positive or negative, and the absolute value of `a`.
604603
605604#### Produces
606605
607−A cell composed of a `term` and an atom.
606+A cell composed of a `?` and an atom.
608607
609608#### Source
610609
@@ -612,14 +611,18 @@ A cell composed of a `term` and an atom.
612611 ++ old |=(a=@s [(syn a) (abs a)])
613612```
614613
614+```hoon
615+++ old |=(a=@s [(syn a) (abs a)])
616+```
617+
615618#### Examples
616619
617620```
618− > (old:si -2)
619− [%.n 2]
621+> (old:si -2)
622+[%.n 2]
620623
621− > (old:si --2)
622− [%.y 2]
624+> (old:si --2)
625+[%.y 2]
623626```
624627
625628---
@@ -639,18 +642,18 @@ Produces a signed integer by multiplying `a` and `b`.
639642#### Source
640643
641644```hoon
642− ++ pro |= [a=@s b=@s]
643− (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
645+++ pro |= [a=@s b=@s]
646+ (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
644647```
645648
646649#### Examples
647650
648651```
649− > (pro:si -3 -3)
650− --9
652+> (pro:si -3 -3)
653+--9
651654
652− > (pro:si -3 --3)
653− -9
655+> (pro:si -3 --3)
656+-9
654657```
655658
656659---
@@ -674,23 +677,23 @@ A signed integer.
674677#### Source
675678
676679```hoon
677− ++ rem |=([a=@s b=@s] (dif a (pro b (fra a b))))
680+++ rem |=([a=@s b=@s] (dif a (pro b (fra a b))))
678681```
679682
680683#### Examples
681684
682685```
683− > (rem:si -17 -3)
684− -2
686+> (rem:si -17 -3)
687+-2
685688
686− > (rem:si --17 -3)
687− --2
689+> (rem:si --17 -3)
690+--2
688691
689− > (rem:si -17 --3)
690− -2
692+> (rem:si -17 --3)
693+-2
691694
692− > (rem:si --17 --3)
693− --2
695+> (rem:si --17 --3)
696+--2
694697```
695698
696699---
@@ -714,36 +717,36 @@ A signed integer.
714717#### Source
715718
716719```hoon
717− ++ sum |= [a=@s b=@s]
718− =+ [c=(old a) d=(old b)]
719− ?: -.c
720− ?: -.d
721− (new & (add +.c +.d))
722− ?: (gte +.c +.d)
723− (new & (sub +.c +.d))
724− (new | (sub +.d +.c))
725− ?: -.d
726− ?: (gte +.c +.d)
727− (new | (sub +.c +.d))
728− (new & (sub +.d +.c))
729− (new | (add +.c +.d))
720+++ sum |= [a=@s b=@s]
721+ =+ [c=(old a) d=(old b)]
722+ ?: -.c
723+ ?: -.d
724+ (new & (add +.c +.d))
725+ ?: (gte +.c +.d)
726+ (new & (sub +.c +.d))
727+ (new | (sub +.d +.c))
728+ ?: -.d
729+ ?: (gte +.c +.d)
730+ (new | (sub +.c +.d))
731+ (new & (sub +.d +.c))
732+ (new | (add +.c +.d))
730733```
731734
732735#### Examples
733736
734737```
735− > (sum:si -11 --2)
736− -9
738+> (sum:si -11 --2)
739+-9
737740
738− > (sum:si --2 --2)
739− --4
741+> (sum:si --2 --2)
742+--4
740743```
741744
742745---
743746
744747### `++sun:si`
745748
746−@u to @s
749+`@u` to `@s`
747750
748751Multiplies the unsigned integer `a` by two, producing an atom.
749752
@@ -758,29 +761,29 @@ An atom.
758761#### Source
759762
760763```hoon
761− ++ sun |=(a=@u (mul 2 a))
764+++ sun |=(a=@u (mul 2 a))
762765```
763766
764767#### Examples
765768
766769```
767− > (sun:si 90)
768− 180
770+> (sun:si 90)
771+180
769772
770− > (sun:si --90)
771− 360
772− > `@u`--90
773− 180
773+> (sun:si --90)
774+360
775+> `@u`--90
776+180
774777
775− > (sun:si --89)
776− 356
777− > `@u`--89
778− 178
778+> (sun:si --89)
779+356
780+> `@u`--89
781+178
779782
780− > (sun:si -89)
781− 354
782− > `@u`-89
783− 177
783+> (sun:si -89)
784+354
785+> `@u`-89
786+177
784787```
785788
786789---
@@ -798,22 +801,22 @@ is positive, and `%.n` is produced if `a` is negative.
798801
799802#### Produces
800803
801−An `term`.
804+A `?`.
802805
803806#### Source
804807
805808```hoon
806− ++ syn |=(a=@s =(0 (end 0 1 a)))
809+++ syn |=(a=@s =(0 (end 0 a)))
807810```
808811
809812#### Examples
810813
811814```
812− > (syn:si -2)
813− %.n
815+> (syn:si -2)
816+%.n
814817
815− > (syn:si --2)
816− %.y
818+> (syn:si --2)
819+%.y
817820```
818821
819822---
@@ -839,41 +842,40 @@ A signed integer.
839842#### Source
840843
841844```hoon
842− ++ cmp |= [a=@s b=@s]
843− ^- @s
844− ?: =(a b)
845− --0
846− ?: (syn a)
847− ?: (syn b)
848− ?: (gth a b)
849− --1
850− -1
851− --1
852− ?: (syn b)
853− -1
854− ?: (gth a b)
855− -1
845+++ cmp |= [a=@s b=@s]
846+ ^- @s
847+ ?: =(a b)
848+ --0
849+ ?: (syn a)
850+ ?: (syn b)
851+ ?: (gth a b)
856852 --1
857− --
853+ -1
854+ --1
855+ ?: (syn b)
856+ -1
857+ ?: (gth a b)
858+ -1
859+ --1
858860```
859861
860862#### Examples
861863
862864```
863− > (cmp:si -2 --1)
864− -1
865+> (cmp:si -2 --1)
866+-1
865867
866− > (cmp:si -2 --1)
867− -1
868+> (cmp:si -2 --1)
869+-1
868870
869− > (cmp:si --2 --1)
870− --1
871+> (cmp:si --2 --1)
872+--1
871873
872− > (cmp:si --2 --2)
873− --0
874+> (cmp:si --2 --2)
875+--0
874876
875− > (cmp:si --2 --5)
876− -1
877+> (cmp:si --2 --5)
878+-1
877879```
878880
879881---
content/docs/hoon/reference/stdlib/3b.md+1384−1390
@@ -11,37 +11,37 @@ Float
1111A mold for the floating-point arithmetic using the base of two, the formula is
1212`(-1)^s * a * 2^e`.
1313
14−Produces either a float (`$f`), an infinity of other sign (`$i`),
15−or not-a-number (`$n`). `s` refers to sign, the `flag`s `&` or `|`; `e` to
14+Produces either a float (`%f`), an infinity of other sign (`%i`),
15+or not-a-number (`%n`). `s` refers to sign, the `flag`s `&` or `|`; `e` to
1616exponent, a signed decimal; and `a` to the significand, an unsigned integer.
1717
1818#### Source
1919
2020```hoon
21− ++ fn
22− $% [$f s=? e=@s a=@u]
23− [$i s=?]
24− [$n ~]
25− ==
21+++ fn
22+ $% [%f s=? e=@s a=@u]
23+ [%i s=?]
24+ [%n ~]
25+ ==
2626```
2727
2828#### Examples
2929
3030```
31− > *fn
32− [%n ~]
31+> *fn
32+[%n ~]
3333
34− > (add:fl [%f & --33 2] [%f | --23 2])
35− [%f s=%.y e=-79 a=10.374.452.512.267.829.421.849.019.032.797.184]
34+> (add:fl [%f & --33 2] [%f | --23 2])
35+[%f s=%.y e=-79 a=10.374.452.512.267.829.421.849.019.032.797.184]
3636
37− > (add:fl [%i &] [%i &])
38− [%i s=%.y]
37+> (add:fl [%i &] [%i &])
38+[%i s=%.y]
3939
40− > (add:fl [%n ~] [%i |])
41− [%n ~]
40+> (add:fl [%n ~] [%i |])
41+[%n ~]
4242
43− > (sun:fl 961.193.554.848.514.048.973.893.027.381.506.219.443)
44− [%f s=%.y e=--17 a=7.333.324.850.834.000.007.430.214.137.126.970]
43+> (sun:fl 961.193.554.848.514.048.973.893.027.381.506.219.443)
44+[%f s=%.y e=--17 a=7.333.324.850.834.000.007.430.214.137.126.970]
4545```
4646
4747---
@@ -53,29 +53,29 @@ Decimal float
5353A mold for the floating-point arithmetic using the base of 10; the formula is
5454`(-1)^s * a *10^e`.
5555
56−Valid values are a float (`$d`), an infinity (`$i`), or a not-a-number (`$n`).
56+Valid values are a float (`%d`), an infinity (`%i`), or a not-a-number (`%n`).
5757`s` refers to sign, the `flag`s `&` or `|`; `e` to exponent, a signed decimal;
5858and `a` to the significand, an unsigned integer.
5959
6060```hoon
61− ++ dn
62− $% [$d s=? e=@s a=@u]
63− [$i s=?]
64− [$n ~]
65− ==
61+++ dn
62+ $% [%d s=? e=@s a=@u]
63+ [%i s=?]
64+ [%n ~]
65+ ==
6666```
6767
6868#### Examples
6969
7070```
71− > `dn`[%d & --0 17.163.091.968]
72− [%d s=%.y e=--0 a=17.163.091.968]
71+> `dn`[%d & --0 17.163.091.968]
72+[%d s=%.y e=--0 a=17.163.091.968]
7373
74− > `dn`[%i s=%.y]
75− [%i s=%.y]
74+> `dn`[%i s=%.y]
75+[%i s=%.y]
7676
77− > `dn`[%n ~]
78− [%n ~]
77+> `dn`[%n ~]
78+[%n ~]
7979```
8080
8181---
@@ -87,23 +87,24 @@ Parsed decimal float
8787A mold for the floating-point arithmetic using the base of 10; the formula is
8888`(-1)^s * a *10^e`.
8989
90−Produces either a parsed float (`$d`), infinity of either sign (`$i`), or
91−not-a-number (`$n`).
90+Produces either a parsed float (`%d`), infinity of either sign (`%i`), or
91+not-a-number (`%n`).
9292
9393#### Source
9494
9595```hoon
96− $% [$d a=? b=[c=@ [d=@ e=@] f=? i=@]]
97− [$i a=?]
98− [$n ~]
99− ==
96+++ rn
97+ $% [%d a=? b=[c=@ [d=@ e=@] f=? i=@]]
98+ [%i a=?]
99+ [%n ~]
100+ ==
100101```
101102
102103#### Examples
103104
104105```
105− > `rn`[%d | [2 [3 4] | 17.163]]
106− [%d a=%.n b=[c=2 [d=3 e=4] f=%.n i=17.163]]
106+> `rn`[%d | [2 [3 4] | 17.163]]
107+[%d a=%.n b=[c=2 [d=3 e=4] f=%.n i=17.163]]
107108```
108109
109110---
@@ -119,25 +120,25 @@ Container arm for floating-point arithmetic functions.
119120- Minimum exponent (`v`): minimum value of e. Default is -16.494.
120121- Width (`w`): Max value of `e` minus min value of `e`. 0 is for fixed-point.
121122 Default is 32.765.
122−- Rounding mode (`r`): Possible modes are nearest (`$n`), up (`$u`),
123− down (`$d`), to zero (`$z`), and away from zero (`$a`). Default value is `%n`.
124−- Behavior (`d`): return denormals (`$d`), flush denormals to zero (`$z`),
125− infinite exponent range (`$i`). Default value is `%d`.
123+- Rounding mode (`r`): Possible modes are nearest (`%n`), up (`%u`),
124+ down (`%d`), to zero (`%z`), and away from zero (`%a`). Default value is `%n`.
125+- Behavior (`d`): return denormals (`%d`), flush denormals to zero (`%z`),
126+ infinite exponent range (`%i`). Default value is `%d`.
126127
127128#### Source
128129
129130```hoon
130− ++ fl
131− =+ ^- [[p=@u v=@s w=@u] r=$?($n $u $d $z $a) d=$?($d $f $i)]
132− [[113 -16.494 32.765] %n %d]
133− =>
134− ~% %cofl +> ~
135− |%
131+++ fl
132+ =/ [[p=@u v=@s w=@u] r=$?(%n %u %d %z %a) d=$?(%d %f %i)]
133+ [[113 -16.494 32.765] %n %d]
134+ =>
135+ ~% %cofl +> ~
136+ |%
136137```
137138
138139---
139140
140−### `++rou:fl`
141+### `^rou:fl`
141142
142143Round
143144
@@ -156,25 +157,25 @@ An `fn`.
156157#### Source
157158
158159```hoon
159− ++ rou
160− |= [a=[e=@s a=@u]] ^- fn (rau a &)
160+++ rou
161+ |= [a=[e=@s a=@u]] ^- fn (rau a &)
161162```
162163
163164#### Examples
164165
165166```
166− > =a 10.161.487.211.429.486.882.397.572.894.294.017.777
167− > (^rou:fl [--12 a])
168− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
167+> =a 10.161.487.211.429.486.882.397.572.894.294.017.777
168+> (^rou:fl [--12 a])
169+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
169170
170− > (^rou:fl [--12 (add a 1)])
171− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
171+> (^rou:fl [--12 (add a 1)])
172+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
172173
173− > (^rou:fl [--12 (add a 300)])
174− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
174+> (^rou:fl [--12 (add a 300)])
175+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
175176
176− > (^rou:fl [--12 (add a 1.000)])
177− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
177+> (^rou:fl [--12 (add a 1.000)])
178+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
178179```
179180
180181---
@@ -200,29 +201,29 @@ An `fn`.
200201#### Source
201202
202203```hoon
203− ++ rau
204− |= [a=[e=@s a=@u] t=?] ^- fn
205− ?- r
206− $z (lug %fl a t) $d (lug %fl a t)
207− $a (lug %ce a t) $u (lug %ce a t)
208− $n (lug %ne a t)
209− ==
204+++ rau
205+ |= [a=[e=@s a=@u] t=?] ^- fn
206+ ?- r
207+ %z (lug %fl a t) %d (lug %fl a t)
208+ %a (lug %ce a t) %u (lug %ce a t)
209+ %n (lug %ne a t)
210+ ==
210211```
211212
212213#### Examples
213214
214215```
215− > (rau:fl [-18 342.602.577] &)
216− [%f s=%.y e=-102 a=6.626.897.619.228.945.634.459.505.846.648.832]
216+> (rau:fl [-18 342.602.577] &)
217+[%f s=%.y e=-102 a=6.626.897.619.228.945.634.459.505.846.648.832]
217218```
218219
219220#### Discussion
220221
221−See `lug:fl` for possible rounding operations.
222+See [`lug:fl`](#lugfl) for possible rounding operations.
222223
223224---
224225
225−### `++add:fl`
226+### `^add:fl`
226227
227228Add
228229
@@ -247,38 +248,38 @@ An `fn`.
247248#### Source
248249
249250```hoon
250− ++ add
251− |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
252− =+ q=(dif:si e.a e.b)
253− |- ?. (syn:si q) $(b a, a b, q +(q)) :: a has larger exp
254− ?: e
255− [%f & e.b (^add (lsh 0 (abs:si q) a.a) a.b)]
256− =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
257− =+ ^= w %+ dif:si e.a %- sun:si :: expanded exp of a
258− ?: (gth prc ma) (^sub prc ma) 0
259− =+ ^= x %+ sum:si e.b (sun:si mb) :: highest exp for b
260− ?: =((cmp:si w x) --1) :: don't need to add
261− ?- r
262− $z (lug %fl a &) $d (lug %fl a &)
263− $a (lug %lg a &) $u (lug %lg a &)
264− $n (lug %na a &)
265− ==
266− (rou [e.b (^add (lsh 0 (abs:si q) a.a) a.b)])
251+++ add
252+ |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
253+ =+ q=(dif:si e.a e.b)
254+ |- ?. (syn:si q) $(b a, a b, q +(q))
255+ ?: e
256+ [%f & e.b (^add (lsh [0 (abs:si q)] a.a) a.b)]
257+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
258+ =+ ^= w %+ dif:si e.a %- sun:si
259+ ?: (gth prc ma) (^sub prc ma) 0
260+ =+ ^= x %+ sum:si e.b (sun:si mb)
261+ ?: =((cmp:si w x) --1)
262+ ?- r
263+ %z (lug %fl a &) %d (lug %fl a &)
264+ %a (lug %lg a &) %u (lug %lg a &)
265+ %n (lug %na a &)
266+ ==
267+ (rou [e.b (^add (lsh [0 (abs:si q)] a.a) a.b)])
267268```
268269
269270#### Examples
270271
271272```
272− > (^add:fl [--33 2.718] [--23 11] %.y)
273− [%f s=%.y e=--23 a=2.783.243]
273+> (^add:fl [--33 2.718] [--23 11] %.y)
274+[%f s=%.y e=--23 a=2.783.243]
274275
275− > (^add:fl [--33 2.718] [--23 11] %.n)
276− [%f s=%.y e=-68 a=6.890.975.897.521.519.304.902.126.405.156.864]
276+> (^add:fl [--33 2.718] [--23 11] %.n)
277+[%f s=%.y e=-68 a=6.890.975.897.521.519.304.902.126.405.156.864]
277278```
278279
279280---
280281
281−### `++sub:fl`
282+### `^sub:fl`
282283
283284Subtract
284285
@@ -300,42 +301,42 @@ An `fn`.
300301#### Source
301302
302303```hoon
303− ++ sub
304− |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
305− =+ q=(dif:si e.a e.b)
306− |- ?. (syn:si q)
307− (fli $(b a, a b, q +(q), r swr))
308− =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
309− =+ ^= w %+ dif:si e.a %- sun:si
310− ?: (gth prc ma) (^sub prc ma) 0
311− =+ ^= x %+ sum:si e.b (sun:si +(mb))
312− ?: &(!e =((cmp:si w x) --1))
313− ?- r
314− $z (lug %sm a &) $d (lug %sm a &)
315− $a (lug %ce a &) $u (lug %ce a &)
316− $n (lug %nt a &)
317− ==
318− =+ j=(lsh 0 (abs:si q) a.a)
319− |- ?. (gte j a.b)
320− (fli $(a.b j, j a.b, r swr))
321− =+ i=(^sub j a.b)
322− ?~ i [%f & zer]
323− ?: e [%f & e.b i] (rou [e.b i])
304+++ sub
305+ |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
306+ =+ q=(dif:si e.a e.b)
307+ |- ?. (syn:si q)
308+ (fli $(b a, a b, q +(q), r swr))
309+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
310+ =+ ^= w %+ dif:si e.a %- sun:si
311+ ?: (gth prc ma) (^sub prc ma) 0
312+ =+ ^= x %+ sum:si e.b (sun:si +(mb))
313+ ?: &(!e =((cmp:si w x) --1))
314+ ?- r
315+ %z (lug %sm a &) %d (lug %sm a &)
316+ %a (lug %ce a &) %u (lug %ce a &)
317+ %n (lug %nt a &)
318+ ==
319+ =+ j=(lsh [0 (abs:si q)] a.a)
320+ |- ?. (gte j a.b)
321+ (fli $(a.b j, j a.b, r swr))
322+ =+ i=(^sub j a.b)
323+ ?~ i [%f & zer]
324+ ?: e [%f & e.b i] (rou [e.b i])
324325```
325326
326327#### Examples
327328
328329```
329− > (^sub:fl [--33 2.718] [--23 11] %.y)
330− [%f s=%.y e=--23 a=2.783.221]
330+> (^sub:fl [--33 2.718] [--23 11] %.y)
331+[%f s=%.y e=--23 a=2.783.221]
331332
332− > (^sub:fl [--33 2.718] [--63 11] %.y)
333− [%f s=%.n e=--33 a=11.811.157.346]
333+> (^sub:fl [--33 2.718] [--63 11] %.y)
334+[%f s=%.n e=--33 a=11.811.157.346]
334335```
335336
336337---
337338
338−### `++mul:fl`
339+### `^mul:fl`
339340
340341Multiply
341342
@@ -355,21 +356,21 @@ An `fn`.
355356#### Source
356357
357358```hoon
358− ++ mul
359− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
360− (rou (sum:si e.a e.b) (^mul a.a a.b))
359+++ mul
360+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
361+ (rou (sum:si e.a e.b) (^mul a.a a.b))
361362```
362363
363364#### Examples
364365
365366```
366− > (^mul:fl [--3 2.718] [--23 11])
367− [%f s=%.y e=-72 a=9.475.054.411.405.900.661.487.108.108.582.912]
367+> (^mul:fl [--3 2.718] [--23 11])
368+[%f s=%.y e=-72 a=9.475.054.411.405.900.661.487.108.108.582.912]
368369```
369370
370371---
371372
372−### `++div:fl`
373+### `^div:fl`
373374
374375Divide
375376
@@ -389,26 +390,26 @@ An `fn`.
389390#### Source
390391
391392```hoon
392− ++ div
393− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
394− =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
395− =+ v=(dif:si (sun:si ma) (sun:si +((^add mb prc))))
396− =. a ?: (syn:si v) a
397− a(e (sum:si v e.a), a (lsh 0 (abs:si v) a.a))
398− =+ [j=(dif:si e.a e.b) q=(dvr a.a a.b)]
399− (rau [j p.q] =(q.q 0))
393+++ div
394+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
395+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
396+ =+ v=(dif:si (sun:si ma) (sun:si +((^add mb prc))))
397+ =. a ?: (syn:si v) a
398+ a(e (sum:si v e.a), a (lsh [0 (abs:si v)] a.a))
399+ =+ [j=(dif:si e.a e.b) q=(dvr a.a a.b)]
400+ (rau [j p.q] =(q.q 0))
400401```
401402
402403#### Examples
403404
404405```
405− > (^div:fl [--13 2.718] [--23 11])
406− [%f s=%.y e=-115 a=10.023.198.055.040.952.765.870.659.817.343.907]
406+> (^div:fl [--13 2.718] [--23 11])
407+[%f s=%.y e=-115 a=10.023.198.055.040.952.765.870.659.817.343.907]
407408```
408409
409410---
410411
411−### `++sqt:fl`
412+### `^sqt:fl`
412413
413414Square root
414415
@@ -425,28 +426,28 @@ An `fn`.
425426#### Source
426427
427428```hoon
428− ++ sqt
429− |= [a=[e=@s a=@u]] ^- fn
430− =. a
431− =+ [w=(met 0 a.a) x=(^mul +(prc) 2)]
432− =+ ?:((^lth w x) (^sub x w) 0)
433− =+ ?: =((dis - 1) (dis (abs:si e.a) 1)) -
434− (^add - 1)
435− a(e (dif:si e.a (sun:si -)), a (lsh 0 - a.a))
436− =+ [y=(^sqt a.a) z=(fra:si e.a --2)]
437− (rau [z p.y] =(q.y 0))
429+++ sqt
430+ |= [a=[e=@s a=@u]] ^- fn
431+ =. a
432+ =+ [w=(met 0 a.a) x=(^mul +(prc) 2)]
433+ =+ ?:((^lth w x) (^sub x w) 0)
434+ =+ ?: =((dis - 1) (dis (abs:si e.a) 1)) -
435+ (^add - 1)
436+ a(e (dif:si e.a (sun:si -)), a (lsh [0 -] a.a))
437+ =+ [y=(^sqt a.a) z=(fra:si e.a --2)]
438+ (rau [z p.y] =(q.y 0))
438439```
439440
440441#### Examples
441442
442443```
443− > (^sqt:fl [-18 342.602.577])
444− [%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
444+> (^sqt:fl [-18 342.602.577])
445+[%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
445446```
446447
447448---
448449
449−### `++lth:fl`
450+### `^lth:fl`
450451
451452Less than
452453
@@ -465,29 +466,29 @@ An `flag`.
465466#### Source
466467
467468```hoon
468− ++ lth
469− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
470− ?: =(e.a e.b) (^lth a.a a.b)
471− =+ c=(cmp:si (ibl a) (ibl b))
472− ?: =(c -1) & ?: =(c --1) |
473− ?: =((cmp:si e.a e.b) -1)
474− (^lth (rsh 0 (abs:si (dif:si e.a e.b)) a.a) a.b)
475− (^lth (lsh 0 (abs:si (dif:si e.a e.b)) a.a) a.b)
469+++ lth
470+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
471+ ?: =(e.a e.b) (^lth a.a a.b)
472+ =+ c=(cmp:si (ibl a) (ibl b))
473+ ?: =(c -1) & ?: =(c --1) |
474+ ?: =((cmp:si e.a e.b) -1)
475+ (^lth (rsh [0 (abs:si (dif:si e.a e.b))] a.a) a.b)
476+ (^lth (lsh [0 (abs:si (dif:si e.a e.b))] a.a) a.b)
476477```
477478
478479#### Examples
479480
480481```
481− > (^lth:fl [-4 684] [--0 35])
482− %.n
482+> (^lth:fl [-4 684] [--0 35])
483+%.n
483484
484− > (^lth:fl [-4 684] [--0 90])
485− %.y
485+> (^lth:fl [-4 684] [--0 90])
486+%.y
486487```
487488
488489---
489490
490−### `++equ:fl`
491+### `^equ:fl`
491492
492493Equals
493494
@@ -506,22 +507,22 @@ A `flag`.
506507#### Source
507508
508509```hoon
509− ++ equ
510− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
511− ?. =((ibl a) (ibl b)) |
512− ?: =((cmp:si e.a e.b) -1)
513− =((lsh 0 (abs:si (dif:si e.a e.b)) a.b) a.a)
514− =((lsh 0 (abs:si (dif:si e.a e.b)) a.a) a.b)
510+++ equ
511+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
512+ ?. =((ibl a) (ibl b)) |
513+ ?: =((cmp:si e.a e.b) -1)
514+ =((lsh [0 (abs:si (dif:si e.a e.b))] a.b) a.a)
515+ =((lsh [0 (abs:si (dif:si e.a e.b))] a.a) a.b)
515516```
516517
517518#### Examples
518519
519520```
520− > (^equ:fl [-4 480] [-0 50])
521− %.n
521+> (^equ:fl [-4 480] [-0 50])
522+%.n
522523
523− > (^equ:fl [-4 480] [-0 30])
524− %.y
524+> (^equ:fl [-4 480] [-0 30])
525+%.y
525526```
526527
527528---
@@ -544,16 +545,16 @@ A signed integer.
544545#### Source
545546
546547```hoon
547− ++ ibl
548− |= [a=[e=@s a=@u]] ^- @s
549− (sum:si (sun:si (dec (met 0 a.a))) e.a)
548+++ ibl
549+ |= [a=[e=@s a=@u]] ^- @s
550+ (sum:si (sun:si (dec (met 0 a.a))) e.a)
550551```
551552
552553#### Examples
553554
554555```
555− > (ibl:fl [-18 342.602.577])
556− --10
556+> (ibl:fl [-18 342.602.577])
557+--10
557558```
558559
559560---
@@ -577,20 +578,20 @@ A cell of a signed integer and an unsigned integer.
577578#### Source
578579
579580```hoon
580− ++ uni
581− |= [a=[e=@s a=@u]]
582− |- ?: =((end 0 1 a.a) 1) a
583− $(a.a (rsh 0 1 a.a), e.a (sum:si e.a --1))
581+++ uni
582+ |= [a=[e=@s a=@u]]
583+ |- ?: =((end 0 a.a) 1) a
584+ $(a.a (rsh 0 a.a), e.a (sum:si e.a --1))
584585```
585586
586587#### Examples
587588
588589```
589− > (uni:fl [-8 342.602.578])
590− [e=-7 a=171.301.289]
590+> (uni:fl [-8 342.602.578])
591+[e=-7 a=171.301.289]
591592
592− > (uni:fl [-8 342.602.577])
593− [e=-8 a=342.602.577]
593+> (uni:fl [-8 342.602.577])
594+[e=-8 a=342.602.577]
594595```
595596
596597---
@@ -612,29 +613,29 @@ A cell of a signed integer and an unsigned integer.
612613#### Sources
613614
614615```hoon
615− ++ xpd
616− |= [a=[e=@s a=@u]]
617− =+ ma=(met 0 a.a)
618− ?: (gte ma prc) a
619− =+ ?: =(den %i) (^sub prc ma)
620− =+ ^= q
621− =+ w=(dif:si e.a emn)
622− ?: (syn:si w) (abs:si w) 0
623− (min q (^sub prc ma))
624− a(e (dif:si e.a (sun:si -)), a (lsh 0 - a.a))
616+++ xpd
617+ |= [a=[e=@s a=@u]]
618+ =+ ma=(met 0 a.a)
619+ ?: (gte ma prc) a
620+ =+ ?: =(den %i) (^sub prc ma)
621+ =+ ^= q
622+ =+ w=(dif:si e.a emn)
623+ ?: (syn:si w) (abs:si w) 0
624+ (min q (^sub prc ma))
625+ a(e (dif:si e.a (sun:si -)), a (lsh [0 -] a.a))
625626```
626627
627628#### Examples
628629
629630```
630− > (xpd:fl [--3 12])
631− [e=-106 a=7.788.445.287.802.241.442.795.744.493.830.144]
631+> (xpd:fl [--3 12])
632+[e=-106 a=7.788.445.287.802.241.442.795.744.493.830.144]
632633
633− > (xpd:fl [-8 342.602.577])
634− [e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
634+> (xpd:fl [-8 342.602.577])
635+[e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
635636
636− > (xpd:fl [-92 6.626.897.619.228.945.634.459.505.846.648.832])
637− [e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
637+> (xpd:fl [-92 6.626.897.619.228.945.634.459.505.846.648.832])
638+[e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
638639```
639640
640641---
@@ -649,16 +650,16 @@ ULP(a) = 2^(e.a)
649650
650651Possible rounding operations:
651652
652−- Floor (`$fl`)
653−- Ceiling (`$ce`)
654−- Smaller (`$sm`)
655−- Larger (`$lg`)
656−- Nearest (`$ne`) -- Rounds ties away from 0 if the number is even, rounds
653+- Floor (`%fl`)
654+- Ceiling (`%ce`)
655+- Smaller (`%sm`)
656+- Larger (`%lg`)
657+- Nearest (`%ne`) -- Rounds ties away from 0 if the number is even, rounds
657658 toward 0 if the number is odd.
658659
659660#### Accepts
660661
661−`t` is one of the following: `$fl`, `$ce`, `$sm`, `$lg`, `$ne`, `$na`, or `$nt`.
662+`t` is one of the following: `%fl`, `%ce`, `%sm`, `%lg`, `%ne`, `%na`, or `%nt`.
662663
663664`a` is a cell of a signed integer and an unsigned integer.
664665
@@ -671,82 +672,75 @@ An `fn`.
671672#### Source
672673
673674```hoon
674− ::
675− :: central rounding mechanism
676− :: can perform: floor, ceiling, smaller, larger,
677− :: nearest (round ties to: even, away from 0, toward 0)
678− :: s is sticky bit: represents a value less than ulp(a) = 2^(e.a)
679− ::
680− ++ lug
681− ~/ %lug
682− |= [t=$?($fl $ce $sm $lg $ne $na $nt) a=[e=@s a=@u] s=?] ^- fn
683− ?< =(a.a 0)
684− =-
685− ?. =(den %f) - :: flush denormals
686− ?. ?=([$f *] -) -
687− ?: =((met 0 ->+>) prc) - [%f & zer]
688− ::
689− =+ m=(met 0 a.a)
690− ?> |(s (gth m prc)) :: require precision
691− =+ ^= q %+ max
692− ?: (gth m prc) (^sub m prc) 0 :: reduce precision
693− %- abs:si ?: =(den %i) --0 :: enforce min. exp
694− ?: =((cmp:si e.a emn) -1) (dif:si emn e.a) --0
695− =^ b a :- (end 0 q a.a)
696− a(e (sum:si e.a (sun:si q)), a (rsh 0 q a.a))
697− ::
698− ?~ a.a
699− ?< =(den %i)
700− ?- t
701− $fl [%f & zer]
702− $sm [%f & zer]
703− $ce [%f & spd]
704− $lg [%f & spd]
705− $ne ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
706− [%f & ?:((^lth b (bex (dec q))) zer spd)]
707− $nt ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
708− [%f & ?:((^lth b (bex (dec q))) zer spd)]
709− $na [%f & ?:((^lth b (bex (dec q))) zer spd)]
710− ==
711− ::
712− =. a (xpd a)
713− ::
714− =. a
715− ?- t
716− $fl a
717− $lg a(a +(a.a))
718− $sm ?. &(=(b 0) s) a
719− ?: &(=(e.a emn) !=(den %i)) a(a (dec a.a))
720− =+ y=(dec (^mul a.a 2))
721− ?. (lte (met 0 y) prc) a(a (dec a.a))
722− [(dif:si e.a --1) y]
723− $ce ?: &(=(b 0) s) a a(a +(a.a))
724− $ne ?~ b a
725− =+ y=(bex (dec q))
726− ?: &(=(b y) s) :: round halfs to even
727− ?~ (dis a.a 1) a a(a +(a.a))
728− ?: (^lth b y) a a(a +(a.a))
729− $na ?~ b a
730− =+ y=(bex (dec q))
731− ?: (^lth b y) a a(a +(a.a))
732− $nt ?~ b a
733− =+ y=(bex (dec q))
734− ?: =(b y) ?: s a a(a +(a.a))
735− ?: (^lth b y) a a(a +(a.a))
736− ==
737− ::
738− =. a ?. =((met 0 a.a) +(prc)) a
739− a(a (rsh 0 1 a.a), e (sum:si e.a --1))
740− ?~ a.a [%f & zer]
741− ::
742− ?: =(den %i) [%f & a]
743− ?: =((cmp:si emx e.a) -1) [%i &] [%f & a] :: enforce max. exp
744− ::
675+++ lug
676+ ~/ %lug
677+ |= [t=$?(%fl %ce %sm %lg %ne %na %nt) a=[e=@s a=@u] s=?] ^- fn
678+ ?< =(a.a 0)
679+ =-
680+ ?. =(den %f) - :: flush denormals
681+ ?. ?=([%f *] -) -
682+ ?: =((met 0 ->+>) prc) - [%f & zer]
683+ ::
684+ =+ m=(met 0 a.a)
685+ ?> |(s (gth m prc)) :: require precision
686+ =+ ^= q %+ max
687+ ?: (gth m prc) (^sub m prc) 0 :: reduce precision
688+ %- abs:si ?: =(den %i) --0 :: enforce min. exp
689+ ?: =((cmp:si e.a emn) -1) (dif:si emn e.a) --0
690+ =^ b a :- (end [0 q] a.a)
691+ a(e (sum:si e.a (sun:si q)), a (rsh [0 q] a.a))
692+ ::
693+ ?~ a.a
694+ ?< =(den %i)
695+ ?- t
696+ %fl [%f & zer]
697+ %sm [%f & zer]
698+ %ce [%f & spd]
699+ %lg [%f & spd]
700+ %ne ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
701+ [%f & ?:((^lth b (bex (dec q))) zer spd)]
702+ %nt ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
703+ [%f & ?:((^lth b (bex (dec q))) zer spd)]
704+ %na [%f & ?:((^lth b (bex (dec q))) zer spd)]
705+ ==
706+ ::
707+ =. a (xpd a)
708+ ::
709+ =. a
710+ ?- t
711+ %fl a
712+ %lg a(a +(a.a))
713+ %sm ?. &(=(b 0) s) a
714+ ?: &(=(e.a emn) !=(den %i)) a(a (dec a.a))
715+ =+ y=(dec (^mul a.a 2))
716+ ?. (lte (met 0 y) prc) a(a (dec a.a))
717+ [(dif:si e.a --1) y]
718+ %ce ?: &(=(b 0) s) a a(a +(a.a))
719+ %ne ?~ b a
720+ =+ y=(bex (dec q))
721+ ?: &(=(b y) s) :: round halfs to even
722+ ?~ (dis a.a 1) a a(a +(a.a))
723+ ?: (^lth b y) a a(a +(a.a))
724+ %na ?~ b a
725+ =+ y=(bex (dec q))
726+ ?: (^lth b y) a a(a +(a.a))
727+ %nt ?~ b a
728+ =+ y=(bex (dec q))
729+ ?: =(b y) ?: s a a(a +(a.a))
730+ ?: (^lth b y) a a(a +(a.a))
731+ ==
732+ ::
733+ =. a ?. =((met 0 a.a) +(prc)) a
734+ a(a (rsh 0 a.a), e (sum:si e.a --1))
735+ ?~ a.a [%f & zer]
736+ ::
737+ ?: =(den %i) [%f & a]
738+ ?: =((cmp:si emx e.a) -1) [%i &] [%f & a] :: enforce max. exp
745739```
746740
747741---
748742
749−### `++drg:fl`
743+### `^drg:fl`
750744
751745Get printable decimal
752746
@@ -764,74 +758,74 @@ A cell of a signed integer and an unsigned integer.
764758#### Source
765759
766760```hoon
767− ++ drg
768− ~/ %drg
769− |= [a=[e=@s a=@u]] ^- [@s @u]
770− ?< =(a.a 0)
771− =. a (xpd a)
772− =+ r=(lsh 0 ?:((syn:si e.a) (abs:si e.a) 0) a.a)
773− =+ s=(lsh 0 ?.((syn:si e.a) (abs:si e.a) 0) 1)
774− =+ mn=(lsh 0 ?:((syn:si e.a) (abs:si e.a) 0) 1)
775− =+ mp=mn
776− => ?.
777− ?& =(a.a (bex (dec prc))) :: if next smallest
778− |(!=(e.a emn) =(den %i)) :: float is half ULP,
779− == :: tighten lower bound
780− .
781− %= .
782− mp (lsh 0 1 mp)
783− r (lsh 0 1 r)
784− s (lsh 0 1 s)
785− ==
786− =+ [k=--0 q=(^div (^add s 9) 10)]
787− |- ?: (^lth r q)
788− %= $
789− k (dif:si k --1)
790− r (^mul r 10)
791− mn (^mul mn 10)
792− mp (^mul mp 10)
793− ==
794− |- ?: (gte (^add (^mul r 2) mp) (^mul s 2))
795− $(s (^mul s 10), k (sum:si k --1))
796− =+ [u=0 o=0]
797− |- :: r/s+o = a*10^-k
798− =+ v=(dvr (^mul r 10) s)
799− => %= .
800− k (dif:si k --1)
801− u p.v
802− r q.v
803− mn (^mul mn 10)
804− mp (^mul mp 10)
805− ==
806− =+ l=(^lth (^mul r 2) mn) :: in lower bound
807− =+ ^= h :: in upper bound
808− ?| (^lth (^mul s 2) mp)
809− (gth (^mul r 2) (^sub (^mul s 2) mp))
810− ==
811− ?: &(!l !h)
812− $(o (^add (^mul o 10) u))
813− =+ q=&(h |(!l (gth (^mul r 2) s)))
814− =. o (^add (^mul o 10) ?:(q +(u) u))
815− [k o]
816−```
817−
818−#### Examples
819−
820−```
821− > (sun:fl 218.116)
822− [%f s=%.y e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488]
823− > (^drg:fl [e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488])
824− [--0 218.116]
825−
826− > (sun:fl 102.057.673.128.349)
827− [%f s=%.y e=-66 a=7.530.527.107.827.833.883.675.587.233.447.936]
828− > (^drg:fl [e=-66 a=7.530.527.107.827.833.883.675.587.233.447.936])
829− [--0 102.057.673.128.349]
830−```
831−
832−---
833−
834−### `++toj:fl`
761+++ drg :: dragon4; get
762+ ~/ %drg :: printable decimal;
763+ |= [a=[e=@s a=@u]] ^- [@s @u] :: guaranteed accurate
764+ ?< =(a.a 0) :: for rounded floats
765+ =. a (xpd a)
766+ =+ r=(lsh [0 ?:((syn:si e.a) (abs:si e.a) 0)] a.a)
767+ =+ s=(lsh [0 ?.((syn:si e.a) (abs:si e.a) 0)] 1)
768+ =+ mn=(lsh [0 ?:((syn:si e.a) (abs:si e.a) 0)] 1)
769+ =+ mp=mn
770+ => ?.
771+ ?& =(a.a (bex (dec prc))) :: if next smallest
772+ |(!=(e.a emn) =(den %i)) :: float is half ULP,
773+ == :: tighten lower bound
774+ .
775+ %= .
776+ mp (lsh 0 mp)
777+ r (lsh 0 r)
778+ s (lsh 0 s)
779+ ==
780+ =+ [k=--0 q=(^div (^add s 9) 10)]
781+ |- ?: (^lth r q)
782+ %= $
783+ k (dif:si k --1)
784+ r (^mul r 10)
785+ mn (^mul mn 10)
786+ mp (^mul mp 10)
787+ ==
788+ |- ?: (gte (^add (^mul r 2) mp) (^mul s 2))
789+ $(s (^mul s 10), k (sum:si k --1))
790+ =+ [u=0 o=0]
791+ |- :: r/s+o = a*10^-k
792+ =+ v=(dvr (^mul r 10) s)
793+ => %= .
794+ k (dif:si k --1)
795+ u p.v
796+ r q.v
797+ mn (^mul mn 10)
798+ mp (^mul mp 10)
799+ ==
800+ =+ l=(^lth (^mul r 2) mn) :: in lower bound
801+ =+ ^= h :: in upper bound
802+ ?| (^lth (^mul s 2) mp)
803+ (gth (^mul r 2) (^sub (^mul s 2) mp))
804+ ==
805+ ?: &(!l !h)
806+ $(o (^add (^mul o 10) u))
807+ =+ q=&(h |(!l (gth (^mul r 2) s)))
808+ =. o (^add (^mul o 10) ?:(q +(u) u))
809+ [k o]
810+```
811+
812+#### Examples
813+
814+```
815+> (sun:fl 218.116)
816+[%f s=%.y e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488]
817+> (^drg:fl [e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488])
818+[--0 218.116]
819+
820+> (sun:fl 102.057.673.128.349)
821+[%f s=%.y e=-66 a=7.530.527.107.827.833.883.675.587.233.447.936]
822+> (^drg:fl [e=-66 a=7.530.527.107.827.833.883.675.587.233.447.936])
823+[--0 102.057.673.128.349]
824+```
825+
826+---
827+
828+### `^toj:fl`
835829
836830Round to integer
837831
@@ -848,27 +842,27 @@ An `fn`.
848842#### Source
849843
850844```hoon
851− ++ toj
852− |= [a=[e=@s a=@u]] ^- fn
853− ?. =((cmp:si e.a --0) -1) [%f & a]
854− =+ x=(abs:si e.a)
855− =+ y=(rsh 0 x a.a)
856− ?: |(=(r %d) =(r %z)) [%f & --0 y]
857− =+ z=(end 0 x a.a)
858− ?: |(=(r %u) =(r %a)) [%f & --0 ?~(z y +(y))]
859− =+ i=(bex (dec x))
860− ?: &(=(z i) =((dis y 1) 0)) [%f & --0 y]
861− ?: (^lth z i) [%f & --0 y] [%f & --0 +(y)]
845+++ toj
846+ |= [a=[e=@s a=@u]] ^- fn
847+ ?. =((cmp:si e.a --0) -1) [%f & a]
848+ =+ x=(abs:si e.a)
849+ =+ y=(rsh [0 x] a.a)
850+ ?: |(=(r %d) =(r %z)) [%f & --0 y]
851+ =+ z=(end [0 x] a.a)
852+ ?: |(=(r %u) =(r %a)) [%f & --0 ?~(z y +(y))]
853+ =+ i=(bex (dec x))
854+ ?: &(=(z i) =((dis y 1) 0)) [%f & --0 y]
855+ ?: (^lth z i) [%f & --0 y] [%f & --0 +(y)]
862856```
863857
864858#### Examples
865859
866860```
867− > (^toj:fl [-11 7.530.107.827.833.587])
868− [%f s=%.y e=--0 a=3.676.810.462.809]
861+> (^toj:fl [-11 7.530.107.827.833.587])
862+[%f s=%.y e=--0 a=3.676.810.462.809]
869863
870− > (^toj:fl [-11 7.530.107.827.833.589])
871− [%f s=%.y e=--0 a=3.676.810.462.809]
864+> (^toj:fl [-11 7.530.107.827.833.589])
865+[%f s=%.y e=--0 a=3.676.810.462.809]
872866```
873867
874868---
@@ -891,26 +885,26 @@ A cell of a signed integer and an unsigned integer.
891885#### Source
892886
893887```hoon
894− ++ ned
895− |= [a=fn] ^- [$f s=? e=@s a=@u]
896− ?: ?=([$f *] a) a
897− ~_ leaf+"need-float"
898− !!
888+++ ned
889+ |= [a=fn] ^- [%f s=? e=@s a=@u]
890+ ?: ?=([%f *] a) a
891+ ~_ leaf+"need-float"
892+ !!
899893```
900894
901895#### Examples
902896
903897```
904− > (ned:fl [%f s=%.y e=-11 a=7.530.107.827.833.587])
905− [%f s=%.y e=-11 a=7.530.107.827.833.587]
898+> (ned:fl [%f s=%.y e=-11 a=7.530.107.827.833.587])
899+[%f s=%.y e=-11 a=7.530.107.827.833.587]
906900
907− > (ned:fl [%n ~])
908− ! need-float
909− ! exit
901+> (ned:fl [%n ~])
902+! need-float
903+! exit
910904
911− > (ned:fl [%i |])
912− ! need-float
913− ! exit
905+> (ned:fl [%i |])
906+! need-float
907+! exit
914908```
915909
916910---
@@ -935,23 +929,23 @@ An `fn`.
935929#### Source
936930
937931```hoon
938− ++ shf
939− |= [a=fn b=@s]
940− ?: |(?=([$n *] a) ?=([$i *] a)) a
941− a(e (sum:si e.a b))
932+++ shf
933+ |= [a=fn b=@s]
934+ ?: |(?=([%n *] a) ?=([%i *] a)) a
935+ a(e (sum:si e.a b))
942936```
943937
944938#### Examples
945939
946940```
947− > (shf:fl [[%f & -2 7] --2])
948− [%f s=%.y e=--0 a=7]
941+> (shf:fl [[%f & -2 7] --2])
942+[%f s=%.y e=--0 a=7]
949943
950− > (shf:fl [[%f & -2 7] -2])
951− [%f s=%.y e=-4 a=7]
944+> (shf:fl [[%f & -2 7] -2])
945+[%f s=%.y e=-4 a=7]
952946
953− > (shf:fl [%f & -11 7.530.107.827.833.587] --5)
954− [%f s=%.y e=-6 a=7.530.107.827.833.587]
947+> (shf:fl [%f & -11 7.530.107.827.833.587] --5)
948+[%f s=%.y e=-6 a=7.530.107.827.833.587]
955949```
956950
957951---
@@ -973,22 +967,22 @@ An `fn`.
973967#### Source
974968
975969```hoon
976− ++ fli
977− |= [a=fn] ^- fn
978− ?-(-.a $f a(s !s.a), $i a(s !s.a), $n a)
970+++ fli
971+ |= [a=fn] ^- fn
972+ ?-(-.a %f a(s !s.a), %i a(s !s.a), %n a)
979973```
980974
981975#### Examples
982976
983977```
984− > (fli:fl [%f %.y -2 7])
985− [%f s=%.n e=-2 a=7]
978+> (fli:fl [%f %.y -2 7])
979+[%f s=%.n e=-2 a=7]
986980
987− > (fli:fl [%f %.n --2 30.617])
988− [%f s=%.y e=--2 a=30.617]
981+> (fli:fl [%f %.n --2 30.617])
982+[%f s=%.y e=--2 a=30.617]
989983
990− > (fli:fl [%f | --2 30.617])
991− [%f s=%.y e=--2 a=30.617]
984+> (fli:fl [%f | --2 30.617])
985+[%f s=%.y e=--2 a=30.617]
992986```
993987
994988---
@@ -1002,21 +996,21 @@ Switches the rounding mode of `r:fl`.
1002996#### Source
1003997
1004998```hoon
1005− ++ swr ?+(r r $d %u, $u %d)
999+++ swr ?+(r r %d %u, %u %d)
10061000```
10071001
10081002#### Examples
10091003
10101004```
1011− > r:fl
1012− %n
1013− > swr:fl
1014− %n
1005+> r:fl
1006+%n
1007+> swr:fl
1008+%n
10151009
1016− > =new-fl fl :: new fl core with changed state
1017− > =new-fl new-fl(r %u)
1018− > swr:new-fl
1019− %d
1010+> =new-fl fl :: new fl core with changed state
1011+> =new-fl new-fl(r %u)
1012+> swr:new-fl
1013+%d
10201014```
10211015
10221016---
@@ -1031,23 +1025,23 @@ Otherwise, a crash is produced.
10311025#### Source
10321026
10331027```hoon
1034− ++ prc ?>((gth p 1) p)
1028+++ prc ?>((gth p 1) p)
10351029```
10361030
10371031#### Examples
10381032
10391033```
1040− > prc:fl
1041− 113
1034+> prc:fl
1035+113
10421036
1043− > =new-fl fl
1044− > =new-fl new-fl(p 1)
1045− > prc:new-fl
1046− ! exit
1037+> =new-fl fl
1038+> =new-fl new-fl(p 1)
1039+> prc:new-fl
1040+! exit
10471041
1048− > =new-fl new-fl(p 2)
1049− > prc:new-fl
1050− 2
1042+> =new-fl new-fl(p 2)
1043+> prc:new-fl
1044+2
10511045```
10521046
10531047---
@@ -1061,26 +1055,26 @@ Produces `d:fl`. Denormalizes if `d:fl` is `%d`. Flushes denormals to zero if
10611055
10621056- Denormalizes if `d:fl` is `%d`.
10631057- Flushes denormals to zero if `d:fl` is `%f`.
1064−- Infinite exponent range if `$d` is `$i`.
1058+- Infinite exponent range if `%d` is `%i`.
10651059
10661060The default value of `d` is `%d`.
10671061
10681062#### Source
10691063
10701064```hoon
1071− ++ den d
1065+++ den d
10721066```
10731067
10741068#### Examples
10751069
10761070```
1077− > den:fl
1078− %d
1071+> den:fl
1072+%d
10791073
1080− > =new-fl fl
1081− > =new-fl new-fl(d %f)
1082− > den:new-fl
1083− %f
1074+> =new-fl fl
1075+> =new-fl new-fl(d %f)
1076+> den:new-fl
1077+%f
10841078```
10851079
10861080---
@@ -1094,14 +1088,14 @@ Produces `v:fl`, the minimum exponent. The default minimum exponent is -16.494.
10941088#### Source
10951089
10961090```hoon
1097− ++ emn v
1091+++ emn v
10981092```
10991093
11001094#### Examples
11011095
11021096```
1103− > emn:fl
1104− -16.494
1097+> emn:fl
1098+-16.494
11051099```
11061100
11071101---
@@ -1115,17 +1109,17 @@ Returns the maximum exponent of `fl`. The default maximum exponent is --16.271.
11151109#### Source
11161110
11171111```hoon
1118− ++ emx (sum:si emn (sun:si w))
1112+++ emx (sum:si emn (sun:si w))
11191113```
11201114
11211115#### Examples
11221116
11231117```
1124− > emx:fl
1125− --16.271
1118+> emx:fl
1119+--16.271
11261120
1127− > `@u`emx:fl
1128− 32.542
1121+> `@u`emx:fl
1122+32.542
11291123```
11301124
11311125---
@@ -1139,14 +1133,14 @@ Produces the smallest possible denormalized float.
11391133#### Source
11401134
11411135```hoon
1142− ++ spd [e=emn a=1]
1136+++ spd [e=emn a=1]
11431137```
11441138
11451139#### Examples
11461140
11471141```
1148− > spd:fl
1149− [e=-16.494 a=1]
1142+> spd:fl
1143+[e=-16.494 a=1]
11501144```
11511145
11521146---
@@ -1160,14 +1154,14 @@ Produces the smallest representable normal float.
11601154#### Source
11611155
11621156```hoon
1163− ++ spn [e=emn a=(bex (dec prc))]
1157+++ spn [e=emn a=(bex (dec prc))]
11641158```
11651159
11661160#### Examples
11671161
11681162```
1169− > spn:fl
1170− [e=-16.494 a=5.192.296.858.534.827.628.530.496.329.220.096]
1163+> spn:fl
1164+[e=-16.494 a=5.192.296.858.534.827.628.530.496.329.220.096]
11711165```
11721166
11731167---
@@ -1181,14 +1175,14 @@ Produces the largest representable normal float.
11811175#### Source
11821176
11831177```hoon
1184− ++ lfn [e=emx a=(fil 0 prc 1)]
1178+++ lfn [e=emx a=(fil 0 prc 1)]
11851179```
11861180
11871181#### Examples
11881182
11891183```
1190− > lfn:fl
1191− [e=--16.271 a=10.384.593.717.069.655.257.060.992.658.440.191]
1184+> lfn:fl
1185+[e=--16.271 a=10.384.593.717.069.655.257.060.992.658.440.191]
11921186```
11931187
11941188---
@@ -1202,14 +1196,14 @@ Produces the sum of `emx:fl` plus `prc:fl`.
12021196#### Source
12031197
12041198```hoon
1205− ++ lfe (sum:si emx (sun:si prc)) :: 2^lfe is > than all
1199+++ lfe (sum:si emx (sun:si prc))
12061200```
12071201
12081202#### Examples
12091203
12101204```
1211− > lfe:fl
1212− --16.384
1205+> lfe:fl
1206+--16.384
12131207```
12141208
12151209---
@@ -1223,16 +1217,14 @@ Produces zero represented as a float.
12231217#### Source
12241218
12251219```hoon
1226− ++ zer [e=--0 a=0]
1227− --
1228− |%
1220+++ zer [e=--0 a=0]
12291221```
12301222
12311223#### Examples
12321224
12331225```
1234− > zer:fl
1235− [e=--0 a=0]
1226+> zer:fl
1227+[e=--0 a=0]
12361228```
12371229
12381230---
@@ -1254,29 +1246,29 @@ An `fn`.
12541246#### Source
12551247
12561248```hoon
1257− ++ rou
1258− |= [a=fn] ^- fn
1259− ?. ?=([$f *] a) a
1260− ?~ a.a [%f s.a zer]
1261− ?: s.a (^rou +>.a)
1262− =.(r swr (fli (^rou +>.a)))
1249+++ rou
1250+ |= [a=fn] ^- fn
1251+ ?. ?=([%f *] a) a
1252+ ?~ a.a [%f s.a zer]
1253+ ?: s.a (^rou +>.a)
1254+ =.(r swr (fli (^rou +>.a)))
12631255```
12641256
12651257#### Examples
12661258
12671259```
1268− > =a 10.161.487.211.429.486.882.397.572.894.294.017.777
1269− > (rou:fl [%f & --12 a])
1270− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1260+> =a 10.161.487.211.429.486.882.397.572.894.294.017.777
1261+> (rou:fl [%f & --12 a])
1262+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
12711263
1272− > (rou:fl [%f & --12 (add a 1)])
1273− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1264+> (rou:fl [%f & --12 (add a 1)])
1265+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
12741266
1275− > (rou:fl [%f & --12 (add a 300)])
1276− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1267+> (rou:fl [%f & --12 (add a 300)])
1268+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
12771269
1278− > (rou:fl [%f & --12 (add a 1.000)])
1279− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
1270+> (rou:fl [%f & --12 (add a 1.000)])
1271+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
12801272```
12811273
12821274---
@@ -1298,19 +1290,19 @@ An `fn`.
12981290#### Source
12991291
13001292```hoon
1301− ++ syn
1302− |= [a=fn] ^- ?
1303− ?-(-.a $f s.a, $i s.a, $n &)
1293+++ syn
1294+ |= [a=fn] ^- ?
1295+ ?-(-.a %f s.a, %i s.a, %n &)
13041296```
13051297
13061298#### Examples
13071299
13081300```
1309− > (syn:fl (sun:fl 106))
1310− %.y
1301+> (syn:fl (sun:fl 106))
1302+%.y
13111303
1312− > (syn:fl [%f | --0 106])
1313− %.n
1304+> (syn:fl [%f | --0 106])
1305+%.n
13141306```
13151307
13161308---
@@ -1332,20 +1324,20 @@ An `fn`.
13321324#### Sources
13331325
13341326```hoon
1335− ++ abs
1336− |= [a=fn] ^- fn
1337− ?: ?=([$f *] a) [%f & e.a a.a]
1338− ?: ?=([$i *] a) [%i &] [%n ~]
1327+++ abs
1328+ |= [a=fn] ^- fn
1329+ ?: ?=([%f *] a) [%f & e.a a.a]
1330+ ?: ?=([%i *] a) [%i &] [%n ~]
13391331```
13401332
13411333#### Examples
13421334
13431335```
1344− > (abs:fl [%f | --0 106])
1345− [%f s=%.y e=--0 a=106]
1336+> (abs:fl [%f | --0 106])
1337+[%f s=%.y e=--0 a=106]
13461338
1347− > (abs:fl [%f & --0 106])
1348− [%f s=%.y e=--0 a=106]
1339+> (abs:fl [%f & --0 106])
1340+[%f s=%.y e=--0 a=106]
13491341```
13501342
13511343---
@@ -1369,32 +1361,32 @@ An `fn`.
13691361#### Source
13701362
13711363```hoon
1372− ++ add
1373− |= [a=fn b=fn] ^- fn
1374− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1375− ?: |(?=([$i *] a) ?=([$i *] b))
1376− ?: &(?=([$i *] a) ?=([$i *] b))
1377− ?: =(a b) a [%n ~]
1378− ?: ?=([$i *] a) a b
1379− ?: |(=(a.a 0) =(a.b 0))
1380− ?. &(=(a.a 0) =(a.b 0)) %- rou ?~(a.a b a)
1381− [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1382− %- |= [a=fn]
1383− ?. ?=([$f *] a) a
1384− ?. =(a.a 0) a
1385− [%f !=(r %d) zer]
1386− ?: =(s.a s.b)
1387− ?: s.a (^add +>.a +>.b |)
1388− =.(r swr (fli (^add +>.a +>.b |)))
1389− ?: s.a (^sub +>.a +>.b |)
1390− (^sub +>.b +>.a |)
1364+++ add
1365+ |= [a=fn b=fn] ^- fn
1366+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1367+ ?: |(?=([%i *] a) ?=([%i *] b))
1368+ ?: &(?=([%i *] a) ?=([%i *] b))
1369+ ?: =(a b) a [%n ~]
1370+ ?: ?=([%i *] a) a b
1371+ ?: |(=(a.a 0) =(a.b 0))
1372+ ?. &(=(a.a 0) =(a.b 0)) %- rou ?~(a.a b a)
1373+ [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1374+ %- |= [a=fn]
1375+ ?. ?=([%f *] a) a
1376+ ?. =(a.a 0) a
1377+ [%f !=(r %d) zer]
1378+ ?: =(s.a s.b)
1379+ ?: s.a (^add +>.a +>.b |)
1380+ =.(r swr (fli (^add +>.a +>.b |)))
1381+ ?: s.a (^sub +>.a +>.b |)
1382+ (^sub +>.b +>.a |)
13911383```
13921384
13931385#### Examples
13941386
13951387```
1396− > (add:fl [%f & --0 106] [%f | --3 55])
1397− [%f s=%.n e=-104 a=6.774.324.807.619.657.921.598.381.929.529.344]
1388+> (add:fl [%f & --0 106] [%f | --3 55])
1389+[%f s=%.n e=-104 a=6.774.324.807.619.657.921.598.381.929.529.344]
13981390```
13991391
14001392---
@@ -1418,33 +1410,32 @@ An `fn`.
14181410#### Source
14191411
14201412```hoon
1421− ++ ead
1422− |= [a=fn b=fn] ^- fn
1423− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1424− ?: |(?=([$i *] a) ?=([$i *] b))
1425− ?: &(?=([$i *] a) ?=([$i *] b))
1426− ?: =(a b) a [%n ~]
1427− ?: ?=([$i *] a) a b
1428− ?: |(=(a.a 0) =(a.b 0))
1429− ?. &(=(a.a 0) =(a.b 0)) ?~(a.a b a)
1430− [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1431− %- |= [a=fn]
1432− ?. ?=([$f *] a) a
1433− ?. =(a.a 0) a
1434− [%f !=(r %d) zer]
1435− ?: =(s.a s.b)
1436− ?: s.a (^add +>.a +>.b &)
1437− (fli (^add +>.a +>.b &))
1438− ?: s.a (^sub +>.a +>.b &)
1439− (^sub +>.b +>.a &)
1440− ::
1413+++ ead
1414+ |= [a=fn b=fn] ^- fn
1415+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1416+ ?: |(?=([%i *] a) ?=([%i *] b))
1417+ ?: &(?=([%i *] a) ?=([%i *] b))
1418+ ?: =(a b) a [%n ~]
1419+ ?: ?=([%i *] a) a b
1420+ ?: |(=(a.a 0) =(a.b 0))
1421+ ?. &(=(a.a 0) =(a.b 0)) ?~(a.a b a)
1422+ [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1423+ %- |= [a=fn]
1424+ ?. ?=([%f *] a) a
1425+ ?. =(a.a 0) a
1426+ [%f !=(r %d) zer]
1427+ ?: =(s.a s.b)
1428+ ?: s.a (^add +>.a +>.b &)
1429+ (fli (^add +>.a +>.b &))
1430+ ?: s.a (^sub +>.a +>.b &)
1431+ (^sub +>.b +>.a &)
14411432```
14421433
14431434#### Examples
14441435
14451436```
1446− > (ead:fl [%f & --0 106] [%f | --3 55])
1447− [%f s=%.n e=--0 a=334]
1437+> (ead:fl [%f & --0 106] [%f | --3 55])
1438+[%f s=%.n e=--0 a=334]
14481439```
14491440
14501441---
@@ -1468,15 +1459,15 @@ An `fn`.
14681459#### Source
14691460
14701461```hoon
1471− ++ sub
1472− |= [a=fn b=fn] ^- fn (add a (fli b))
1462+++ sub
1463+ |= [a=fn b=fn] ^- fn (add a (fli b))
14731464```
14741465
14751466#### Examples
14761467
14771468```
1478− > (sub:fl [%f & --13 2.718] [%f & --23 11])
1479− [%f s=%.n e=-86 a=5.416.671.014.775.224.232.595.412.796.571.648]
1469+> (sub:fl [%f & --13 2.718] [%f & --23 11])
1470+[%f s=%.n e=-86 a=5.416.671.014.775.224.232.595.412.796.571.648]
14801471```
14811472
14821473---
@@ -1500,18 +1491,18 @@ An `fn`.
15001491#### Source
15011492
15021493```hoon
1503− ++ mul
1504− |= [a=fn b=fn] ^- fn
1505− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1506− ?: ?=([$i *] a)
1507− ?: ?=([$i *] b)
1508− [%i =(s.a s.b)]
1509− ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1510− ?: ?=([$i *] b)
1511− ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1512− ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1513− ?: =(s.a s.b) (^mul +>.a +>.b)
1514− =.(r swr (fli (^mul +>.a +>.b)))
1494+++ mul
1495+ |= [a=fn b=fn] ^- fn
1496+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1497+ ?: ?=([%i *] a)
1498+ ?: ?=([%i *] b)
1499+ [%i =(s.a s.b)]
1500+ ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1501+ ?: ?=([%i *] b)
1502+ ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1503+ ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1504+ ?: =(s.a s.b) (^mul +>.a +>.b)
1505+ =.(r swr (fli (^mul +>.a +>.b)))
15151506```
15161507
15171508---
@@ -1534,18 +1525,18 @@ An `fn`.
15341525
15351526#### Examples
15361527
1537−```
1538− ++ emu
1539− |= [a=fn b=fn] ^- fn
1540− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1541− ?: ?=([$i *] a)
1542− ?: ?=([$i *] b)
1543− [%i =(s.a s.b)]
1544− ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1545− ?: ?=([$i *] b)
1546− ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1547− ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1548− [%f =(s.a s.b) (sum:si e.a e.b) (^^mul a.a a.b)]
1528+```hoon
1529+++ emu
1530+ |= [a=fn b=fn] ^- fn
1531+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1532+ ?: ?=([%i *] a)
1533+ ?: ?=([%i *] b)
1534+ [%i =(s.a s.b)]
1535+ ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1536+ ?: ?=([%i *] b)
1537+ ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1538+ ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1539+ [%f =(s.a s.b) (sum:si e.a e.b) (^^mul a.a a.b)]
15491540```
15501541
15511542---
@@ -1566,19 +1557,19 @@ Produces the quotient of `a` divided by `b`.
15661557
15671558An `fn`.
15681559
1569−#### Divide
1560+#### Source
15701561
15711562```hoon
1572− ++ div
1573− |= [a=fn b=fn] ^- fn
1574− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1575− ?: ?=([$i *] a)
1576− ?: ?=([$i *] b) [%n ~] [%i =(s.a s.b)]
1577− ?: ?=([$i *] b) [%f =(s.a s.b) zer]
1578− ?: =(a.a 0) ?: =(a.b 0) [%n ~] [%f =(s.a s.b) zer]
1579− ?: =(a.b 0) [%i =(s.a s.b)]
1580− ?: =(s.a s.b) (^div +>.a +>.b)
1581− =.(r swr (fli (^div +>.a +>.b)))
1563+++ div
1564+ |= [a=fn b=fn] ^- fn
1565+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1566+ ?: ?=([%i *] a)
1567+ ?: ?=([%i *] b) [%n ~] [%i =(s.a s.b)]
1568+ ?: ?=([%i *] b) [%f =(s.a s.b) zer]
1569+ ?: =(a.a 0) ?: =(a.b 0) [%n ~] [%f =(s.a s.b) zer]
1570+ ?: =(a.b 0) [%i =(s.a s.b)]
1571+ ?: =(s.a s.b) (^div +>.a +>.b)
1572+ =.(r swr (fli (^div +>.a +>.b)))
15821573```
15831574
15841575---
@@ -1605,16 +1596,16 @@ An `fn`.
16051596#### Source
16061597
16071598```hoon
1608− ++ fma
1609− |= [a=fn b=fn c=fn] ^- fn
1610− (add (emu a b) c)
1599+++ fma
1600+ |= [a=fn b=fn c=fn] ^- fn
1601+ (add (emu a b) c)
16111602```
16121603
16131604#### Examples
16141605
16151606```
1616− > (fma:fl [%f & --13 2.718] [%f & --23 11] [%f & --13 2.718])
1617− [%f s=%.y e=-62 a=9.475.054.514.089.037.465.004.673.635.188.736]=
1607+> (fma:fl [%f & --13 2.718] [%f & --23 11] [%f & --13 2.718])
1608+[%f s=%.y e=-62 a=9.475.054.514.089.037.465.004.673.635.188.736]=
16181609```
16191610
16201611---
@@ -1636,19 +1627,19 @@ An `fn`.
16361627#### Source
16371628
16381629```hoon
1639− ++ sqt
1640− |= [a=fn] ^- fn
1641− ?: ?=([$n *] a) [%n ~]
1642− ?: ?=([$i *] a) ?:(s.a a [%n ~])
1643− ?~ a.a [%f s.a zer]
1644− ?: s.a (^sqt +>.a) [%n ~]
1630+++ sqt
1631+ |= [a=fn] ^- fn
1632+ ?: ?=([%n *] a) [%n ~]
1633+ ?: ?=([%i *] a) ?:(s.a a [%n ~])
1634+ ?~ a.a [%f s.a zer]
1635+ ?: s.a (^sqt +>.a) [%n ~]
16451636```
16461637
16471638#### Examples
16481639
16491640```
1650− > (sqt:fl [%f s=%.y e=-18 a=342.602.577])
1651− [%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
1641+> (sqt:fl [%f s=%.y e=-18 a=342.602.577])
1642+[%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
16521643```
16531644
16541645---
@@ -1670,28 +1661,28 @@ An `fn`.
16701661#### Source
16711662
16721663```hoon
1673− ++ inv
1674− |= [a=fn] ^- fn
1675− (div [%f & --0 1] a)
1664+++ inv
1665+ |= [a=fn] ^- fn
1666+ (div [%f & --0 1] a)
16761667```
16771668
16781669#### Examples
16791670
16801671```
1681− > (inv:fl [%f s=%.y e=--0 a=10])
1682− [%f s=%.y e=-116 a=8.307.674.973.655.724.205.648.794.126.752.154]
1683− > (drg:fl [%f s=%.y e=-116 a=8.307.674.973.655.724.205.648.794.126.752.154])
1684− [%d s=%.y e=-1 a=1]
1672+> (inv:fl [%f s=%.y e=--0 a=10])
1673+[%f s=%.y e=-116 a=8.307.674.973.655.724.205.648.794.126.752.154]
1674+> (drg:fl [%f s=%.y e=-116 a=8.307.674.973.655.724.205.648.794.126.752.154])
1675+[%d s=%.y e=-1 a=1]
16851676
1686− > (inv:fl [%f s=%.y e=--1 a=10])
1687− [%f s=%.y e=-117 a=8.307.674.973.655.724.205.648.794.126.752.154]
1688− > (drg:fl [%f s=%.y e=-117 a=8.307.674.973.655.724.205.648.794.126.752.154])
1689− [%d s=%.y e=-2 a=5]
1677+> (inv:fl [%f s=%.y e=--1 a=10])
1678+[%f s=%.y e=-117 a=8.307.674.973.655.724.205.648.794.126.752.154]
1679+> (drg:fl [%f s=%.y e=-117 a=8.307.674.973.655.724.205.648.794.126.752.154])
1680+[%d s=%.y e=-2 a=5]
16901681
1691− > (inv:fl [%f s=%.y e=--2 a=10])
1692− [%f s=%.y e=-118 a=8.307.674.973.655.724.205.648.794.126.752.154]
1693− > (drg:fl [%f s=%.y e=-118 a=8.307.674.973.655.724.205.648.794.126.752.154])
1694− [%d s=%.y e=-3 a=25]
1682+> (inv:fl [%f s=%.y e=--2 a=10])
1683+[%f s=%.y e=-118 a=8.307.674.973.655.724.205.648.794.126.752.154]
1684+> (drg:fl [%f s=%.y e=-118 a=8.307.674.973.655.724.205.648.794.126.752.154])
1685+[%d s=%.y e=-3 a=25]
16951686```
16961687
16971688---
@@ -1713,22 +1704,22 @@ An `fn`.
17131704#### Source
17141705
17151706```hoon
1716− ++ sun
1717− |= [a=@u] ^- fn
1718− (rou [%f & --0 a])
1707+++ sun
1708+ |= [a=@u] ^- fn
1709+ (rou [%f & --0 a])
17191710```
17201711
17211712#### Examples
17221713
17231714```
1724− > (sun:fl 0)
1725− [%f s=%.y e=--0 a=0]
1715+> (sun:fl 0)
1716+[%f s=%.y e=--0 a=0]
17261717
1727− > (sun:fl 5.048.729)
1728− [%f s=%.y e=-90 a=6.250.023.776.601.238.669.911.180.544.311.296]
1718+> (sun:fl 5.048.729)
1719+[%f s=%.y e=-90 a=6.250.023.776.601.238.669.911.180.544.311.296]
17291720
1730− > (sun:fl -100)
1731− ! exit
1721+> (sun:fl -100)
1722+! exit
17321723```
17331724
17341725---
@@ -1750,20 +1741,20 @@ An `fn`.
17501741#### Source
17511742
17521743```hoon
1753− ++ san
1754− |= [a=@s] ^- fn
1755− =+ b=(old:si a)
1756− (rou [%f -.b --0 +.b])
1744+++ san
1745+ |= [a=@s] ^- fn
1746+ =+ b=(old:si a)
1747+ (rou [%f -.b --0 +.b])
17571748```
17581749
17591750#### Examples
17601751
17611752```
1762− > (san:fl --100)
1763− [%f s=%.y e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1753+> (san:fl --100)
1754+[%f s=%.y e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
17641755
1765− > (san:fl -100)
1766− [%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1756+> (san:fl -100)
1757+[%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
17671758```
17681759
17691760---
@@ -1788,29 +1779,29 @@ A `unit` of `flag`.
17881779#### Source
17891780
17901781```hoon
1791− ++ lth
1792− |= [a=fn b=fn] ^- (unit ?)
1793− ?: |(?=([$n *] a) ?=([$n *] b)) ~ :- ~
1794− ?: =(a b) |
1795− ?: ?=([$i *] a) !s.a ?: ?=([$i *] b) s.b
1796− ?: |(=(a.a 0) =(a.b 0))
1797− ?: &(=(a.a 0) =(a.b 0)) |
1798− ?: =(a.a 0) s.b !s.a
1799− ?: !=(s.a s.b) s.b
1800− ?: s.a (^lth +>.a +>.b) (^lth +>.b +>.a)
1782+++ lth
1783+ |= [a=fn b=fn] ^- (unit ?)
1784+ ?: |(?=([%n *] a) ?=([%n *] b)) ~ :- ~
1785+ ?: =(a b) |
1786+ ?: ?=([%i *] a) !s.a ?: ?=([%i *] b) s.b
1787+ ?: |(=(a.a 0) =(a.b 0))
1788+ ?: &(=(a.a 0) =(a.b 0)) |
1789+ ?: =(a.a 0) s.b !s.a
1790+ ?: !=(s.a s.b) s.b
1791+ ?: s.a (^lth +>.a +>.b) (^lth +>.b +>.a)
18011792```
18021793
18031794#### Examples
18041795
18051796```
1806− > (lth:fl (sun:fl 116) (sun:fl 4.820))
1807− [~ u=%.y]
1797+> (lth:fl (sun:fl 116) (sun:fl 4.820))
1798+[~ u=%.y]
18081799
1809− > (lth:fl (sun:fl 218.116) (sun:fl 4.820))
1810− [~ u=%.n]
1800+> (lth:fl (sun:fl 218.116) (sun:fl 4.820))
1801+[~ u=%.n]
18111802
1812− > (lth:fl (sun:fl 218.116) [%n ~])
1813− ~
1803+> (lth:fl (sun:fl 218.116) [%n ~])
1804+~
18141805```
18151806
18161807---
@@ -1835,28 +1826,28 @@ A `unit` of `flag`.
18351826#### Source
18361827
18371828```hoon
1838− ++ lte
1839− |= [a=fn b=fn] ^- (unit ?)
1840− %+ bind (lth b a) |= a=? !a
1829+++ lte
1830+ |= [a=fn b=fn] ^- (unit ?)
1831+ %+ bind (lth b a) |= a=? !a
18411832```
18421833
18431834#### Examples
18441835
18451836```
1846− > (lte:fl (sun:fl 102) [%f %.y -5 973.655.724])
1847− [~ u=%.y]
1837+> (lte:fl (sun:fl 102) [%f %.y -5 973.655.724])
1838+[~ u=%.y]
18481839
1849− > (lte:fl (sun:fl 102) [%f %.y -24 973.655.724])
1850− [~ u=%.n]
1840+> (lte:fl (sun:fl 102) [%f %.y -24 973.655.724])
1841+[~ u=%.n]
18511842
1852− > (lte:fl [%f %.y --2 25] (sun:fl 100))
1853− [~ u=%.y]
1843+> (lte:fl [%f %.y --2 25] (sun:fl 100))
1844+[~ u=%.y]
18541845
1855− > (lte:fl [%f %.y --2 25] [%f %.y --3 2])
1856− [~ u=%.n]
1846+> (lte:fl [%f %.y --2 25] [%f %.y --3 2])
1847+[~ u=%.n]
18571848
1858− > (lte:fl [%f %.y --2 25] [%n ~])
1859− ~
1849+> (lte:fl [%f %.y --2 25] [%n ~])
1850+~
18601851```
18611852
18621853---
@@ -1881,25 +1872,25 @@ An `unit` of `flag`.
18811872#### Source
18821873
18831874```hoon
1884− ++ equ
1885− |= [a=fn b=fn] ^- (unit ?)
1886− ?: |(?=([$n *] a) ?=([$n *] b)) ~ :- ~
1887− ?: =(a b) &
1888− ?: |(?=([$i *] a) ?=([$i *] b)) |
1889− ?: |(=(a.a 0) =(a.b 0))
1890− ?: &(=(a.a 0) =(a.b 0)) & |
1891− ?: |(=(e.a e.b) !=(s.a s.b)) |
1892− (^equ +>.a +>.b)
1875+++ equ
1876+ |= [a=fn b=fn] ^- (unit ?)
1877+ ?: |(?=([%n *] a) ?=([%n *] b)) ~ :- ~
1878+ ?: =(a b) &
1879+ ?: |(?=([%i *] a) ?=([%i *] b)) |
1880+ ?: |(=(a.a 0) =(a.b 0))
1881+ ?: &(=(a.a 0) =(a.b 0)) & |
1882+ ?: |(=(e.a e.b) !=(s.a s.b)) |
1883+ (^equ +>.a +>.b)
18931884```
18941885
18951886#### Examples
18961887
18971888```
1898− > (equ:fl [%f %.y --2 25] (sun:fl 100))
1899− [~ u=%.y]
1889+> (equ:fl [%f %.y --2 25] (sun:fl 100))
1890+[~ u=%.y]
19001891
1901− > (equ:fl [%f %.y --2 25] (sun:fl 101))
1902− [~ u=%.n]
1892+> (equ:fl [%f %.y --2 25] (sun:fl 101))
1893+[~ u=%.n]
19031894```
19041895
19051896---
@@ -1924,21 +1915,21 @@ An `unit` of `flag`.
19241915#### Source
19251916
19261917```hoon
1927− ++ gte
1928− |= [a=fn b=fn] ^- (unit ?) (lte b a)
1918+++ gte
1919+ |= [a=fn b=fn] ^- (unit ?) (lte b a)
19291920```
19301921
19311922#### Examples
19321923
19331924```
1934− > (gte:fl [%f %.y --2 25] (sun:fl 100))
1935− [~ u=%.y]
1925+> (gte:fl [%f %.y --2 25] (sun:fl 100))
1926+[~ u=%.y]
19361927
1937− > (gth:fl [%f %.y --6 73.989] [%f %.y --5 919.599])
1938− [~ u=%.n]
1928+> (gth:fl [%f %.y --6 73.989] [%f %.y --5 919.599])
1929+[~ u=%.n]
19391930
1940− > (gth:fl [%f %.y --6 73.989] [%n ~])
1941− ~
1931+> (gth:fl [%f %.y --6 73.989] [%n ~])
1932+~
19421933```
19431934
19441935---
@@ -1963,18 +1954,18 @@ An `unit` of `flag`.
19631954#### Source
19641955
19651956```hoon
1966− ++ gth
1967− |= [a=fn b=fn] ^- (unit ?) (lth b a)
1957+++ gth
1958+ |= [a=fn b=fn] ^- (unit ?) (lth b a)
19681959```
19691960
19701961#### Examples
19711962
19721963```
1973− > (gth:fl [%f %.y --2 25] (sun:fl 100))
1974− [~ u=%.n]
1964+> (gth:fl [%f %.y --2 25] (sun:fl 100))
1965+[~ u=%.n]
19751966
1976− > (gth:fl [%f %.y --6 73.989] [%f %.y --5 119.599])
1977− [~ u=%.y]
1967+> (gth:fl [%f %.y --6 73.989] [%f %.y --5 119.599])
1968+[~ u=%.y]
19781969```
19791970
19801971---
@@ -1997,19 +1988,19 @@ A `dn`.
19971988#### Source
19981989
19991990```hoon
2000− ++ drg
2001− |= [a=fn] ^- dn
2002− ?: ?=([$n *] a) [%n ~]
2003− ?: ?=([$i *] a) [%i s.a]
2004− ?~ a.a [%d s.a --0 0]
2005− [%d s.a (^drg +>.a)]
1991+++ drg
1992+ |= [a=fn] ^- dn
1993+ ?: ?=([%n *] a) [%n ~]
1994+ ?: ?=([%i *] a) [%i s.a]
1995+ ?~ a.a [%d s.a --0 0]
1996+ [%d s.a (^drg +>.a)]
20061997```
20071998
20081999#### Examples
20092000
20102001```
2011− > (drg:fl [%f | --6 73.989])
2012− [%d s=%.n e=--0 a=4.735.296]
2002+> (drg:fl [%f | --6 73.989])
2003+[%d s=%.n e=--0 a=4.735.296]
20132004```
20142005
20152006---
@@ -2031,25 +2022,25 @@ An `fn`.
20312022#### Source
20322023
20332024```hoon
2034− ++ grd
2035− |= [a=dn] ^- fn
2036− ?: ?=([$n *] a) [%n ~]
2037− ?: ?=([$i *] a) [%i s.a]
2038− => .(r %n)
2039− =+ q=(abs:si e.a)
2040− ?: (syn:si e.a)
2041− (mul [%f s.a --0 a.a] [%f & e.a (pow 5 q)])
2042− (div [%f s.a --0 a.a] [%f & (sun:si q) (pow 5 q)])
2025+++ grd
2026+ |= [a=dn] ^- fn
2027+ ?: ?=([%n *] a) [%n ~]
2028+ ?: ?=([%i *] a) [%i s.a]
2029+ => .(r %n)
2030+ =+ q=(abs:si e.a)
2031+ ?: (syn:si e.a)
2032+ (mul [%f s.a --0 a.a] [%f & e.a (pow 5 q)])
2033+ (div [%f s.a --0 a.a] [%f & (sun:si q) (pow 5 q)])
20432034```
20442035
20452036#### Examples
20462037
20472038```
2048− > (grd:fl [%d s=%.n e=--0 a=73.989])
2049− [%f s=%.n e=-96 a=5.862.012.516.267.904.074.208.723.341.410.304]
2039+> (grd:fl [%d s=%.n e=--0 a=73.989])
2040+[%f s=%.n e=-96 a=5.862.012.516.267.904.074.208.723.341.410.304]
20502041
2051− > (grd:fl [%d s=%.n e=--0 a=100])
2052− [%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
2042+> (grd:fl [%d s=%.n e=--0 a=100])
2043+[%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
20532044```
20542045
20552046---
@@ -2066,24 +2057,24 @@ Rounds `a` to the nearest signed integer.
20662057
20672058#### Produces
20682059
2069−A `unit` of @s.
2060+A `unit` of `@s`.
20702061
20712062#### Source
20722063
20732064```hoon
2074− ++ toi
2075− |= [a=fn] ^- (unit @s)
2076− =+ b=(toj a)
2077− ?. ?=([$f *] b) ~ :- ~
2078− =+ c=(^^mul (bex (abs:si e.b)) a.b)
2079− (new:si s.b c)
2065+++ toi
2066+ |= [a=fn] ^- (unit @s)
2067+ =+ b=(toj a)
2068+ ?. ?=([%f *] b) ~ :- ~
2069+ =+ c=(^^mul (bex (abs:si e.b)) a.b)
2070+ (new:si s.b c)
20802071```
20812072
20822073#### Examples
20832074
20842075```
2085− > (toi:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2086− [~ u=--26.843.545.600]
2076+> (toi:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2077+[~ u=--26.843.545.600]
20872078```
20882079
20892080---
@@ -2100,34 +2091,33 @@ Rounds `a` to the nearest decimal integer.
21002091
21012092#### Produces
21022093
2103−A `unit` of @s.
2094+A `unit` of `@s`.
21042095
21052096#### Source
21062097
21072098```hoon
2108− ++ toj
2109− |= [a=fn] ^- fn
2110− ?. ?=([$f *] a) a
2111− ?~ a.a [%f s.a zer]
2112− ?: s.a (^toj +>.a)
2113− =.(r swr (fli (^toj +>.a)))
2114− --
2099+++ toj
2100+ |= [a=fn] ^- fn
2101+ ?. ?=([%f *] a) a
2102+ ?~ a.a [%f s.a zer]
2103+ ?: s.a (^toj +>.a)
2104+ =.(r swr (fli (^toj +>.a)))
21152105```
21162106
21172107#### Examples
21182108
21192109```
2120− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2121− [%f s=%.y e=--0 a=26.843.545.600]
2110+> (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2111+[%f s=%.y e=--0 a=26.843.545.600]
21222112
2123− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514])
2124− [%f s=%.y e=--0 a=26.844]
2113+> (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514])
2114+[%f s=%.y e=--0 a=26.844]
21252115
2126− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460])
2127− [%f s=%.y e=--0 a=0]
2116+> (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460])
2117+[%f s=%.y e=--0 a=0]
21282118
2129− > (toj:fl [%f s=%.y e=-9 a=9.002])
2130− [%f s=%.y e=--0 a=16]
2119+> (toj:fl [%f s=%.y e=-9 a=9.002])
2120+[%f s=%.y e=--0 a=16]
21312121```
21322122
21332123---
@@ -2141,23 +2131,22 @@ Container core for IEEE-754 formatting operations.
21412131- `w` is width: The number of bits in the exponent field.
21422132- `p` is precision: The number of bits in the significand field.
21432133- `w` is bias: Added to exponent when storing.
2144−- `r` is rounding mode: Possible modes are nearest (`$n`), up (`$u`),
2145− down (`$d`), to zero (`$z`), and away from zero (`$a`). Default value is `%a`.
2134+- `r` is rounding mode: Possible modes are nearest (`%n`), up (`%u`),
2135+ down (`%d`), to zero (`%z`), and away from zero (`%a`). Default value is `%a`.
21462136
21472137#### Source
21482138
21492139```hoon
2150− ++ ff
2151− |_ [[w=@u p=@u b=@s] r=$?($n $u $d $z $a)]
2140+++ ff
2141+ |_ [[w=@u p=@u b=@s] r=$?(%n %u %d %z %a)]
21522142```
21532143
21542144#### Examples
21552145
21562146```
2157− > =ffcore ~(. ff [8 8 0] %n)
2158− > ffcore
2159− <24.ltg {{{@ud @ud @ud} r/$n} <54.tyv 119.wim 31.ohr 1.jmk $143>}>
2160− >
2147+> =ffcore ~(. ff [8 8 0] %n)
2148+> ffcore
2149+<24.ltg {{{@ud @ud @ud} r/$n} <54.tyv 119.wim 31.ohr 1.jmk $143>}>
21612150```
21622151
21632152---
@@ -2179,14 +2168,14 @@ Produces the sign bit of `++ff`.
21792168#### Source
21802169
21812170```hoon
2182− ++ sb (bex (^add w p))
2171+++ sb (bex (^add w p))
21832172```
21842173
21852174#### Examples
21862175
21872176```
2188− > sb:ff
2189− 1
2177+> sb:ff
2178+1
21902179```
21912180
21922181---
@@ -2200,14 +2189,14 @@ Produces the minimum possible exponent of `ff`.
22002189#### Source
22012190
22022191```hoon
2203− ++ me (dif:si (dif:si --1 b) (sun:si p))
2192+++ me (dif:si (dif:si --1 b) (sun:si p))
22042193```
22052194
22062195#### Examples
22072196
22082197```
2209− > me:ff
2210− --1
2198+> me:ff
2199+--1
22112200```
22122201
22132202---
@@ -2222,20 +2211,20 @@ configuration of the `ff` core.
22222211#### Source
22232212
22242213```hoon
2225− ++ pa
2226− %*(. fl p +(p), v me, w (^sub (bex w) 3), d %d, r r)
2214+++ pa
2215+ %*(. fl p +(p), v me, w (^sub (bex w) 3), d %d, r r)
22272216```
22282217
22292218#### Examples
22302219
22312220```
2232− > ~(pa ff [11 52 --1.023] %n)
2233− < 23.qzd
2234− 28.btz
2235− { {{p/@ v/@s w/@} r/?($n $u $a $d $z) d/$d}
2236− <54.tyv 119.wim 31.ohr 1.jmk $143>
2237− }
2238− >
2221+> ~(pa ff [11 52 --1.023] %n)
2222+< 23.qzd
2223+ 28.btz
2224+ { {{p/@ v/@s w/@} r/?($n $u $a $d $z) d/$d}
2225+ <54.tyv 119.wim 31.ohr 1.jmk $143>
2226+ }
2227+>
22392228```
22402229
22412230#### Discussion
@@ -2257,29 +2246,29 @@ Converts `a` from `@r` to `fn`.
22572246
22582247#### Produces
22592248
2260−A `unit` of @s.
2249+A `unit` of `@s`.
22612250
22622251#### Source
22632252
22642253```hoon
2265− ++ sea
2266− |= [a=@r] ^- fn
2267− =+ [f=(cut 0 [0 p] a) e=(cut 0 [p w] a)]
2268− =+ s=(sig a)
2269− ?: =(e 0)
2270− ?: =(f 0) [%f s --0 0] [%f s me f]
2271− ?: =(e (fil 0 w 1))
2272− ?: =(f 0) [%i s] [%n ~]
2273− =+ q=:(sum:si (sun:si e) me -1)
2274− =+ r=(^add f (bex p))
2275− [%f s q r]
2254+++ sea
2255+ |= [a=@r] ^- fn
2256+ =+ [f=(cut 0 [0 p] a) e=(cut 0 [p w] a)]
2257+ =+ s=(sig a)
2258+ ?: =(e 0)
2259+ ?: =(f 0) [%f s --0 0] [%f s me f]
2260+ ?: =(e (fil 0 w 1))
2261+ ?: =(f 0) [%i s] [%n ~]
2262+ =+ q=:(sum:si (sun:si e) me -1)
2263+ =+ r=(^add f (bex p))
2264+ [%f s q r]
22762265```
22772266
22782267#### Examples
22792268
22802269```
2281− > (sea:ff `@r`0x8)
2282− [%f s=%.y e=--0 a=0]
2270+> (sea:ff `@r`0x8)
2271+[%f s=%.y e=--0 a=0]
22832272```
22842273
22852274---
@@ -2301,14 +2290,14 @@ A `@r`.
23012290#### Source
23022291
23032292```hoon
2304− ++ bit |= [a=fn] (bif (rou:pa a))
2293+++ bit |= [a=fn] (bif (rou:pa a))
23052294```
23062295
23072296#### Examples
23082297
23092298```
2310− > (bit:ma:rd [%f | -6 202])
2311− 0xc009400000000000
2299+> (bit:ma:rd [%f | -6 202])
2300+0xc009400000000000
23122301```
23132302
23142303---
@@ -2330,28 +2319,28 @@ A `flag`.
23302319#### Source
23312320
23322321```hoon
2333− ++ bif
2334− |= [a=fn] ^- @r
2335− ?: ?=([$i *] a)
2336− =+ q=(lsh 0 p (fil 0 w 1))
2337− ?: s.a q (^add q sb)
2338− ?: ?=([$n *] a) (lsh 0 (dec p) (fil 0 +(w) 1))
2339− ?~ a.a ?: s.a `@r`0 sb
2340− =+ ma=(met 0 a.a)
2341− ?. =(ma +(p))
2342− ?> =(e.a me)
2343− ?> (^lth ma +(p))
2344− ?: s.a `@r`a.a (^add a.a sb)
2345− =+ q=(sum:si (dif:si e.a me) --1)
2346− =+ r=(^add (lsh 0 p (abs:si q)) (end 0 p a.a))
2347− ?: s.a r (^add r sb)
2322+++ bif
2323+ |= [a=fn] ^- @r
2324+ ?: ?=([%i *] a)
2325+ =+ q=(lsh [0 p] (fil 0 w 1))
2326+ ?: s.a q (^add q sb)
2327+ ?: ?=([%n *] a) (lsh [0 (dec p)] (fil 0 +(w) 1))
2328+ ?~ a.a ?: s.a `@r`0 sb
2329+ =+ ma=(met 0 a.a)
2330+ ?. =(ma +(p))
2331+ ?> =(e.a me)
2332+ ?> (^lth ma +(p))
2333+ ?: s.a `@r`a.a (^add a.a sb)
2334+ =+ q=(sum:si (dif:si e.a me) --1)
2335+ =+ r=(^add (lsh [0 p] (abs:si q)) (end [0 p] a.a))
2336+ ?: s.a r (^add r sb)
23482337```
23492338
23502339#### Examples
23512340
23522341```
2353− > (bif:ma:rd *fn)
2354− 0x7ff8000000000000
2342+> (bif:ma:rd *fn)
2343+0x7ff8000000000000
23552344```
23562345
23572346---
@@ -2373,16 +2362,16 @@ A `flag`.
23732362#### Source
23742363
23752364```hoon
2376− ++ sig
2377− |= [a=@r] ^- ?
2378− =(0 (cut 0 [(^add p w) 1] a))
2365+++ sig
2366+ |= [a=@r] ^- ?
2367+ =(0 (cut 0 [(^add p w) 1] a))
23792368```
23802369
23812370#### Examples
23822371
23832372```
2384− > (sig:ff `@r`5)
2385− %.n
2373+> (sig:ff `@r`5)
2374+%.n
23862375```
23872376
23882377---
@@ -2404,16 +2393,16 @@ A signed integer.
24042393#### Source
24052394
24062395```hoon
2407− ++ exp
2408− |= [a=@r] ^- @s
2409− (dif:si (sun:si (cut 0 [p w] a)) b)
2396+++ exp
2397+ |= [a=@r] ^- @s
2398+ (dif:si (sun:si (cut 0 [p w] a)) b)
24102399```
24112400
24122401#### Examples
24132402
24142403```
2415− > (exp:ff `@r`5)
2416− --0
2404+> (exp:ff `@r`5)
2405+--0
24172406```
24182407
24192408---
@@ -2437,16 +2426,16 @@ A `@r`, an IEEE float.
24372426#### Source
24382427
24392428```hoon
2440− ++ add
2441− |= [a=@r b=@r]
2442− (bif (add:pa (sea a) (sea b)))
2429+++ add
2430+ |= [a=@r b=@r]
2431+ (bif (add:pa (sea a) (sea b)))
24432432```
24442433
24452434#### Examples
24462435
24472436```
2448− > (add:ma:rd `@r`5 `@r`11)
2449− 0x10
2437+> (add:ma:rd `@r`5 `@r`11)
2438+0x10
24502439```
24512440
24522441---
@@ -2470,16 +2459,16 @@ A `@r`, an IEEE float.
24702459#### Source
24712460
24722461```hoon
2473− ++ sub
2474− |= [a=@r b=@r]
2475− (bif (sub:pa (sea a) (sea b)))
2462+++ sub
2463+ |= [a=@r b=@r]
2464+ (bif (sub:pa (sea a) (sea b)))
24762465```
24772466
24782467#### Examples
24792468
24802469```
2481− > (sub:ma:rd `@r`5 `@r`11)
2482− 0x8000000000000006
2470+> (sub:ma:rd `@r`5 `@r`11)
2471+0x8000000000000006
24832472```
24842473
24852474---
@@ -2503,16 +2492,16 @@ A `@r`, an IEEE float.
25032492#### Multiply
25042493
25052494```hoon
2506− ++ mul
2507− |= [a=@r b=@r]
2508− (bif (mul:pa (sea a) (sea b)))
2495+++ mul
2496+ |= [a=@r b=@r]
2497+ (bif (mul:pa (sea a) (sea b)))
25092498```
25102499
25112500#### Examples
25122501
25132502```
2514− > (mul:ma:rd `@r`11 `@r`2)
2515− 0x0
2503+> (mul:ma:rd `@r`11 `@r`2)
2504+0x0
25162505```
25172506
25182507---
@@ -2536,16 +2525,16 @@ A `@r`, an IEEE float.
25362525#### Source
25372526
25382527```hoon
2539− ++ div
2540− |= [a=@r b=@r]
2541− (bif (div:pa (sea a) (sea b)))
2528+++ div
2529+ |= [a=@r b=@r]
2530+ (bif (div:pa (sea a) (sea b)))
25422531```
25432532
25442533#### Examples
25452534
25462535```
2547− > (div:ma:rd `@r`175 `@r`26)
2548− 0x401aec4ec4ec4ec4
2536+> (div:ma:rd `@r`175 `@r`26)
2537+0x401aec4ec4ec4ec4
25492538```
25502539
25512540---
@@ -2572,16 +2561,16 @@ A `@r`, an IEEE float.
25722561#### Source
25732562
25742563```hoon
2575− ++ fma
2576− |= [a=@r b=@r c=@r]
2577− (bif (fma:pa (sea a) (sea b) (sea c)))
2564+++ fma
2565+ |= [a=@r b=@r c=@r]
2566+ (bif (fma:pa (sea a) (sea b) (sea c)))
25782567```
25792568
25802569#### Examples
25812570
25822571```
2583− > (fma:ma:rd `@r`175 `@r`26 `@r`100)
2584− 0x64
2572+> (fma:ma:rd `@r`175 `@r`26 `@r`100)
2573+0x64
25852574```
25862575
25872576---
@@ -2603,16 +2592,16 @@ A `@r`, an IEEE float.
26032592#### Source
26042593
26052594```hoon
2606− ++ sqt
2607− |= [a=@r]
2608− (bif (sqt:pa (sea a)))
2595+++ sqt
2596+ |= [a=@r]
2597+ (bif (sqt:pa (sea a)))
26092598```
26102599
26112600#### Examples
26122601
26132602```
2614− > (sqt:ma:rd `@r`175)
2615− 0x1e9a751f9447b724
2603+> (sqt:ma:rd `@r`175)
2604+0x1e9a751f9447b724
26162605```
26172606
26182607---
@@ -2636,18 +2625,18 @@ A `flag`.
26362625#### Source
26372626
26382627```hoon
2639− ++ lth
2640− |= [a=@r b=@r] (fall (lth:pa (sea a) (sea b)) |)
2628+++ lth
2629+ |= [a=@r b=@r] (fall (lth:pa (sea a) (sea b)) |)
26412630```
26422631
26432632#### Examples
26442633
26452634```
2646− > (lth:ma:rd `@rd`1 `@rd`2)
2647− %.y
2635+> (lth:ma:rd `@rd`1 `@rd`2)
2636+%.y
26482637
2649− > (lth:ma:rd `@rd`10 `@rd`2)
2650− %.n
2638+> (lth:ma:rd `@rd`10 `@rd`2)
2639+%.n
26512640```
26522641
26532642---
@@ -2671,18 +2660,18 @@ A `flag`.
26712660#### Source
26722661
26732662```hoon
2674− ++ lte
2675− |= [a=@r b=@r] (fall (lte:pa (sea a) (sea b)) |)
2663+++ lte
2664+ |= [a=@r b=@r] (fall (lte:pa (sea a) (sea b)) |)
26762665```
26772666
26782667#### Examples
26792668
26802669```
2681− > (lte:ma:rd `@rd`10 `@rd`2)
2682− %.n
2670+> (lte:ma:rd `@rd`10 `@rd`2)
2671+%.n
26832672
2684− > (lte:ma:rd `@rd`10 `@rd`10)
2685− %.y
2673+> (lte:ma:rd `@rd`10 `@rd`10)
2674+%.y
26862675```
26872676
26882677---
@@ -2706,18 +2695,18 @@ A `flag`.
27062695#### Source
27072696
27082697```hoon
2709− ++ equ
2710− |= [a=@r b=@r] (fall (equ:pa (sea a) (sea b)) |)
2698+++ equ
2699+ |= [a=@r b=@r] (fall (equ:pa (sea a) (sea b)) |)
27112700```
27122701
27132702#### Examples
27142703
27152704```
2716− > (equ:ma:rd `@rd`10 `@rd`2)
2717− %.n
2705+> (equ:ma:rd `@rd`10 `@rd`2)
2706+%.n
27182707
2719− > (equ:ma:rd `@rd`10 `@rd`10)
2720− %.y
2708+> (equ:ma:rd `@rd`10 `@rd`10)
2709+%.y
27212710```
27222711
27232712---
@@ -2741,18 +2730,18 @@ A `flag`.
27412730#### Source
27422731
27432732```hoon
2744− ++ gte
2745− |= [a=@r b=@r] (fall (gte:pa (sea a) (sea b)) |)
2733+++ gte
2734+ |= [a=@r b=@r] (fall (gte:pa (sea a) (sea b)) |)
27462735```
27472736
27482737#### Examples
27492738
27502739```
2751− > (gte:ma:rd `@rd`10 `@rd`10)
2752− %.y
2740+> (gte:ma:rd `@rd`10 `@rd`10)
2741+%.y
27532742
2754− > (gte:ma:rd `@rd`10 `@rd`11)
2755− %.n
2743+> (gte:ma:rd `@rd`10 `@rd`11)
2744+%.n
27562745```
27572746
27582747---
@@ -2776,18 +2765,18 @@ A `flag`.
27762765#### Source
27772766
27782767```hoon
2779− ++ gth
2780− |= [a=@r b=@r] (fall (gth:pa (sea a) (sea b)) |)
2768+++ gth
2769+ |= [a=@r b=@r] (fall (gth:pa (sea a) (sea b)) |)
27812770```
27822771
27832772#### Examples
27842773
27852774```
2786− > (gth:ma:rd `@rd`10 `@rd`10)
2787− %.n
2775+> (gth:ma:rd `@rd`10 `@rd`10)
2776+%.n
27882777
2789− > (gth:ma:rd `@rd`10 `@rd`9)
2790− %.y
2778+> (gth:ma:rd `@rd`10 `@rd`9)
2779+%.y
27912780```
27922781
27932782---
@@ -2809,15 +2798,15 @@ A `@r`, an IEEE float.
28092798#### Source
28102799
28112800```hoon
2812− ++ sun
2813− |= [a=@u] (bit [%f & --0 a])
2801+++ sun
2802+ |= [a=@u] (bit [%f & --0 a])
28142803```
28152804
28162805#### Examples
28172806
28182807```
2819− > (sun:ma:rd 658.149.282)
2820− 0x41c39d47d1000000
2808+> (sun:ma:rd 658.149.282)
2809+0x41c39d47d1000000
28212810```
28222811
28232812---
@@ -2839,15 +2828,15 @@ A `@r`, an IEEE float.
28392828#### Source
28402829
28412830```hoon
2842− ++ san
2843− |= [a=@s] (bit [%f (syn:si a) --0 (abs:si a)])
2831+++ san
2832+ |= [a=@s] (bit [%f (syn:si a) --0 (abs:si a)])
28442833```
28452834
28462835#### Examples
28472836
28482837```
2849− > (san:ma:rd --10)
2850− 0x4024000000000000
2838+> (san:ma:rd --10)
2839+0x4024000000000000
28512840```
28522841
28532842---
@@ -2869,15 +2858,15 @@ A `flag` of `@s`.
28692858#### Source
28702859
28712860```hoon
2872− ++ toi
2873− |= [a=@r] (toi:pa (sea a))
2861+++ toi
2862+ |= [a=@r] (toi:pa (sea a))
28742863```
28752864
28762865#### Examples
28772866
28782867```
2879− > (toi:ma:rd `@r`0x4af)
2880− [~ u=--0]
2868+> (toi:ma:rd `@r`0x4af)
2869+[~ u=--0]
28812870```
28822871
28832872---
@@ -2899,18 +2888,18 @@ A `dn`.
28992888#### Source
29002889
29012890```hoon
2902− ++ drg
2903− |= [a=@r] (drg:pa (sea a))
2891+++ drg
2892+ |= [a=@r] (drg:pa (sea a))
29042893```
29052894
29062895#### Examples
29072896
29082897```
2909− > (drg:ma:rd `@r`0x41c0)
2910− [%d s=%.y e=-323 a=8.316]
2898+> (drg:ma:rd `@r`0x41c0)
2899+[%d s=%.y e=-323 a=8.316]
29112900
2912− > (drg:ma:rd (sun:ma:rd 658.149.282))
2913− [%d s=%.y e=--0 a=658.149.282]
2901+> (drg:ma:rd (sun:ma:rd 658.149.282))
2902+[%d s=%.y e=--0 a=658.149.282]
29142903```
29152904
29162905---
@@ -2932,16 +2921,15 @@ A `@r`, an IEEE float.
29322921#### Source
29332922
29342923```hoon
2935− ++ grd
2936− |= [a=dn] (bif (grd:pa a))
2937− --
2924+++ grd
2925+ |= [a=dn] (bif (grd:pa a))
29382926```
29392927
29402928#### Examples
29412929
29422930```
2943− > (grd:ma:rd [%d s=%.y e=--0 a=658.149.282])
2944− 0x41c39d47d1000000
2931+> (grd:ma:rd [%d s=%.y e=--0 a=658.149.282])
2932+0x41c39d47d1000000
29452933```
29462934
29472935---
@@ -2963,14 +2951,14 @@ A `dn`.
29632951#### Source
29642952
29652953```hoon
2966− ++ rlyd |= a=@rd ^- dn (drg:rd a)
2954+++ rlyd |= a=@rd ^- dn (drg:rd a)
29672955```
29682956
29692957#### Examples
29702958
29712959```
2972− > (rlyd .~2.4703e-320)
2973− [%d s=%.y e=-324 a=24.703]
2960+> (rlyd .~2.4703e-320)
2961+[%d s=%.y e=-324 a=24.703]
29742962```
29752963
29762964---
@@ -2992,14 +2980,14 @@ A `dn`.
29922980#### Source
29932981
29942982```hoon
2995− ++ rlys |= a=@rs ^- dn (drg:rs a)
2983+++ rlys |= a=@rs ^- dn (drg:rs a)
29962984```
29972985
29982986#### Examples
29992987
30002988```
3001− > (rlys .1.681557e-39)
3002− [%d s=%.y e=-45 a=1.681.557]
2989+> (rlys .1.681557e-39)
2990+[%d s=%.y e=-45 a=1.681.557]
30032991```
30042992
30052993---
@@ -3021,14 +3009,14 @@ A `dn`.
30213009#### Source
30223010
30233011```hoon
3024− ++ rlyh |= a=@rh ^- dn (drg:rh a)
3012+++ rlyh |= a=@rh ^- dn (drg:rh a)
30253013```
30263014
30273015#### Examples
30283016
30293017```
3030− > (rlyh .~~3e1)
3031− [%d s=%.y e=--1 a=3]
3018+> (rlyh .~~3e1)
3019+[%d s=%.y e=--1 a=3]
30323020```
30333021
30343022---
@@ -3050,14 +3038,14 @@ A `dn`.
30503038#### Source
30513039
30523040```hoon
3053− ++ rlyq |= a=@rq ^- dn (drg:rq a)
3041+++ rlyq |= a=@rq ^- dn (drg:rq a)
30543042```
30553043
30563044#### Examples
30573045
30583046```
3059− > (rlyq .~~~2.2628017865927756787440310766086816e-4343)
3060− [%d s=%.y e=-4.377 a=22.628.017.865.927.756.787.440.310.766.086.816]
3047+> (rlyq .~~~2.2628017865927756787440310766086816e-4343)
3048+[%d s=%.y e=-4.377 a=22.628.017.865.927.756.787.440.310.766.086.816]
30613049```
30623050
30633051---
@@ -3079,14 +3067,14 @@ A a `@rd`, a double-precision float.
30793067#### Source
30803068
30813069```hoon
3082− ++ ryld |= a=dn ^- @rd (grd:rd a)
3070+++ ryld |= a=dn ^- @rd (grd:rd a)
30833071```
30843072
30853073#### Examples
30863074
30873075```
3088− > (ryld [%d s=%.y e=-324 a=24.703])
3089− .~2.4703e-320
3076+> (ryld [%d s=%.y e=-324 a=24.703])
3077+.~2.4703e-320
30903078```
30913079
30923080---
@@ -3108,17 +3096,17 @@ A a `@rs`, a single-precision float.
31083096#### Source
31093097
31103098```hoon
3111− ++ ryls |= a=dn ^- @rs (grd:rs a)
3099+++ ryls |= a=dn ^- @rs (grd:rs a)
31123100```
31133101
31143102#### Examples
31153103
31163104```
3117− > (ryls [%d s=%.y e=-324 a=24.703])
3118− .0
3105+> (ryls [%d s=%.y e=-324 a=24.703])
3106+.0
31193107
3120− > (ryls [%d s=%.y e=-32 a=24.703])
3121− .2.4703e-28
3108+> (ryls [%d s=%.y e=-32 a=24.703])
3109+.2.4703e-28
31223110```
31233111
31243112---
@@ -3140,20 +3128,20 @@ A a `@rh`, a half-precision float.
31403128#### Source
31413129
31423130```hoon
3143− ++ rylh |= a=dn ^- @rh (grd:rh a)
3131+++ rylh |= a=dn ^- @rh (grd:rh a)
31443132```
31453133
31463134#### Examples
31473135
31483136```
3149− > (rylh [%d s=%.y e=--1 a=703])
3150− .~~7.032e3
3137+> (rylh [%d s=%.y e=--1 a=703])
3138+.~~7.032e3
31513139
3152− > (rylh [%d s=%.y e=--3 a=56])
3153− .~~5.6e4
3140+> (rylh [%d s=%.y e=--3 a=56])
3141+.~~5.6e4
31543142
3155− > (rylh [%d s=%.y e=--4 a=56])
3156− .~~inf
3143+> (rylh [%d s=%.y e=--4 a=56])
3144+.~~inf
31573145```
31583146
31593147---
@@ -3175,14 +3163,14 @@ A a `@rq`, a quad-precision float.
31753163#### Source
31763164
31773165```hoon
3178− ++ rylq |= a=dn ^- @rq (grd:rq a)
3166+++ rylq |= a=dn ^- @rq (grd:rq a)
31793167```
31803168
31813169#### Examples
31823170
31833171```
3184− > (rylq [%d s=%.y e=-324 a=24.703])
3185− .~~~2.4703e-320
3172+> (rylq [%d s=%.y e=-324 a=24.703])
3173+.~~~2.4703e-320
31863174```
31873175
31883176---
@@ -3199,10 +3187,10 @@ down (`$d`), and round to zero (`$z`).
31993187#### Source
32003188
32013189```hoon
3202− ++ rd
3203− ^?
3204− ~% %rd +> ~
3205− |_ r=$?($n $u $d $z)
3190+++ rd
3191+ ^|
3192+ ~% %rd +> ~
3193+ |_ r=$?(%n %u %d %z)
32063194```
32073195
32083196---
@@ -3217,17 +3205,17 @@ configuration of the `rd` core.
32173205#### Source
32183206
32193207```hoon
3220− ++ ma
3221− %*(. ff w 11, p 52, b --1.023, r r)
3208+++ ma
3209+ %*(. ff w 11, p 52, b --1.023, r r)
32223210```
32233211
32243212#### Examples
32253213
32263214```
3227− > ~(ma rd %n)
3228− < 24.ltg
3229− {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3230− >
3215+> ~(ma rd %n)
3216+< 24.ltg
3217+ {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3218+>
32313219```
32323220
32333221---
@@ -3238,16 +3226,18 @@ configuration of the `rd` core.
32383226
32393227Converts `a` from a double-precision binary float to `fn`.
32403228
3229+#### Source
3230+
32413231```hoon
3242− ++ sea :: @rd to fn
3243− |= [a=@rd] (sea:ma a)
3232+++ sea
3233+ |= [a=@rd] (sea:ma a)
32443234```
32453235
32463236#### Examples
32473237
32483238```
3249− > (sea:rd .~4.94066e-319)
3250− [%f s=%.y e=-1.074 a=100.000]
3239+> (sea:rd .~4.94066e-319)
3240+[%f s=%.y e=-1.074 a=100.000]
32513241```
32523242
32533243---
@@ -3269,15 +3259,15 @@ A `@rd`, a double-precision float.
32693259#### Source
32703260
32713261```hoon
3272− ++ bit
3273− |= [a=fn] ^- @rd (bit:ma a)
3262+++ bit
3263+ |= [a=fn] ^- @rd (bit:ma a)
32743264```
32753265
32763266#### Examples
32773267
32783268```
3279− > (bit:rd [%f s=%.y e=-1.074 a=100.000])
3280− .~4.94066e-319
3269+> (bit:rd [%f s=%.y e=-1.074 a=100.000])
3270+.~4.94066e-319
32813271```
32823272
32833273---
@@ -3301,17 +3291,17 @@ A `@rd`.
33013291#### Source
33023292
33033293```hoon
3304− ++ add ~/ %add
3305− |= [a=@rd b=@rd] ^- @rd
3306− ~_ leaf+"rd-fail"
3307− (add:ma a b)
3294+++ add ~/ %add
3295+ |= [a=@rd b=@rd] ^- @rd
3296+ ~_ leaf+"rd-fail"
3297+ (add:ma a b)
33083298```
33093299
33103300#### Examples
33113301
33123302```
3313− > (add:rd .~3.94066e12 .~9.2846e11)
3314− .~4.86912e12
3303+> (add:rd .~3.94066e12 .~9.2846e11)
3304+.~4.86912e12
33153305```
33163306
33173307---
@@ -3335,17 +3325,17 @@ A `@rd`.
33353325#### Source
33363326
33373327```hoon
3338− ++ sub ~/ %sub
3339− |= [a=@rd b=@rd] ^- @rd
3340− ~_ leaf+"rd-fail"
3341− (sub:ma a b)
3328+++ sub ~/ %sub
3329+ |= [a=@rd b=@rd] ^- @rd
3330+ ~_ leaf+"rd-fail"
3331+ (sub:ma a b)
33423332```
33433333
33443334#### Examples
33453335
33463336```
3347− > (sub:rd .~7.94069e2 .~1.2846e3)
3348− .~-4.9053099999999995e2
3337+> (sub:rd .~7.94069e2 .~1.2846e3)
3338+.~-4.9053099999999995e2
33493339```
33503340
33513341---
@@ -3369,17 +3359,17 @@ A `@rd`.
33693359#### Source
33703360
33713361```hoon
3372− ++ mul ~/ %mul
3373− |= [a=@rd b=@rd] ^- @rd
3374− ~_ leaf+"rd-fail"
3375− (mul:ma a b)
3362+++ mul ~/ %mul
3363+ |= [a=@rd b=@rd] ^- @rd
3364+ ~_ leaf+"rd-fail"
3365+ (mul:ma a b)
33763366```
33773367
33783368#### Examples
33793369
33803370```
3381− > (mul:rd .~7.94069e2 .~1.2246e3)
3382− .~9.724168973999998e5
3371+> (mul:rd .~7.94069e2 .~1.2246e3)
3372+.~9.724168973999998e5
33833373```
33843374
33853375---
@@ -3403,17 +3393,17 @@ A `@rd`.
34033393#### Source
34043394
34053395```hoon
3406− ++ div ~/ %div
3407− |= [a=@rd b=@rd] ^- @rd
3408− ~_ leaf+"rd-fail"
3409− (div:ma a b)
3396+++ div ~/ %div
3397+ |= [a=@rd b=@rd] ^- @rd
3398+ ~_ leaf+"rd-fail"
3399+ (div:ma a b)
34103400```
34113401
34123402#### Examples
34133403
34143404```
3415− > (div:rd .~7.94099e2 .~1.2246e3)
3416− .~6.484558223093255e-1
3405+> (div:rd .~7.94099e2 .~1.2246e3)
3406+.~6.484558223093255e-1
34173407```
34183408
34193409---
@@ -3439,20 +3429,18 @@ A `@rd`.
34393429
34403430#### Source
34413431
3442−#### Source
3443−
34443432```hoon
3445− ++ fma ~/ %fma
3446− |= [a=@rd b=@rd c=@rd] ^- @rd
3447− ~_ leaf+"rd-fail"
3448− (fma:ma a b c)
3433+++ fma ~/ %fma
3434+ |= [a=@rd b=@rd c=@rd] ^- @rd
3435+ ~_ leaf+"rd-fail"
3436+ (fma:ma a b c)
34493437```
34503438
34513439#### Examples
34523440
34533441```
3454− > (fma:rd .~7.94099e2 .~1.2246e3 .~3.94066e3)
3455− .~9.763942954e5
3442+> (fma:rd .~7.94099e2 .~1.2246e3 .~3.94066e3)
3443+.~9.763942954e5
34563444```
34573445
34583446---
@@ -3474,16 +3462,16 @@ A `@rd`.
34743462#### Source
34753463
34763464```hoon
3477− ++ sqt ~/ %sqt
3478− |= [a=@rd] ^- @rd ~_ leaf+"rd-fail"
3479− (sqt:ma a)
3465+++ sqt ~/ %sqt
3466+ |= [a=@rd] ^- @rd ~_ leaf+"rd-fail"
3467+ (sqt:ma a)
34803468```
34813469
34823470#### Examples
34833471
34843472```
3485− > (sqt:rd .~3.94066e3)
3486− .~6.2774676422901614e1
3473+> (sqt:rd .~3.94066e3)
3474+.~6.2774676422901614e1
34873475```
34883476
34893477---
@@ -3507,23 +3495,23 @@ A `@rd`.
35073495#### Source
35083496
35093497```hoon
3510− ++ lth ~/ %lth
3511− |= [a=@rd b=@rd]
3512− ~_ leaf+"rd-fail"
3513− (lth:ma a b)
3498+++ lth ~/ %lth
3499+ |= [a=@rd b=@rd]
3500+ ~_ leaf+"rd-fail"
3501+ (lth:ma a b)
35143502```
35153503
35163504#### Examples
35173505
35183506```
3519− > (lth:rd .~7.94099e2 .~1.2246e3)
3520− %.y
3507+> (lth:rd .~7.94099e2 .~1.2246e3)
3508+%.y
35213509
3522− > (lth:rd .~7.94099e2 .~1.2246e2)
3523− %.n
3510+> (lth:rd .~7.94099e2 .~1.2246e2)
3511+%.n
35243512
3525− > (lth:rd .~1.2246e2 .~1.2246e2)
3526− %.n
3513+> (lth:rd .~1.2246e2 .~1.2246e2)
3514+%.n
35273515```
35283516
35293517---
@@ -3547,23 +3535,23 @@ A `@rd`.
35473535#### Source
35483536
35493537```hoon
3550− ++ lte ~/ %lte :: less-equals
3551− |= [a=@rd b=@rd]
3552− ~_ leaf+"rd-fail"
3553− (lte:ma a b)
3538+++ lte ~/ %lte
3539+ |= [a=@rd b=@rd]
3540+ ~_ leaf+"rd-fail"
3541+ (lte:ma a b)
35543542```
35553543
35563544#### Examples
35573545
35583546```
3559− > (lte:rd .~7.94099e2 .~1.2246e3)
3560− %.y
3547+> (lte:rd .~7.94099e2 .~1.2246e3)
3548+%.y
35613549
3562− > (lte:rd .~7.94099e2 .~1.2246e2)
3563− %.n
3550+> (lte:rd .~7.94099e2 .~1.2246e2)
3551+%.n
35643552
3565− > (lte:rd .~1.2246e2 .~1.2246e2)
3566− %.y
3553+> (lte:rd .~1.2246e2 .~1.2246e2)
3554+%.y
35673555```
35683556
35693557---
@@ -3587,23 +3575,23 @@ A `@rd`.
35873575#### Source
35883576
35893577```hoon
3590− ++ equ ~/ %equ
3591− |= [a=@rd b=@rd]
3592− ~_ leaf+"rd-fail"
3593− (equ:ma a b)
3578+++ equ ~/ %equ
3579+ |= [a=@rd b=@rd]
3580+ ~_ leaf+"rd-fail"
3581+ (equ:ma a b)
35943582```
35953583
35963584#### Examples
35973585
35983586```
3599− > (equ:rd .~7.94099e2 .~1.2246e3)
3600− %.n
3587+> (equ:rd .~7.94099e2 .~1.2246e3)
3588+%.n
36013589
3602− > (equ:rd .~7.94099e2 .~1.2246e2)
3603− %.n
3590+> (equ:rd .~7.94099e2 .~1.2246e2)
3591+%.n
36043592
3605− > (equ:rd .~1.2246e2 .~1.2246e2)
3606− %.y
3593+> (equ:rd .~1.2246e2 .~1.2246e2)
3594+%.y
36073595```
36083596
36093597---
@@ -3627,23 +3615,23 @@ A `@rd`.
36273615#### Source
36283616
36293617```hoon
3630− ++ gte ~/ %gte
3631− |= [a=@rd b=@rd]
3632− ~_ leaf+"rd-fail"
3633− (gte:ma a b)
3618+++ gte ~/ %gte
3619+ |= [a=@rd b=@rd]
3620+ ~_ leaf+"rd-fail"
3621+ (gte:ma a b)
36343622```
36353623
36363624#### Examples
36373625
36383626```
3639− > (gte:rd .~7.94099e2 .~1.2246e3)
3640− %.n
3627+> (gte:rd .~7.94099e2 .~1.2246e3)
3628+%.n
36413629
3642− > (gte:rd .~7.94099e2 .~1.2246e2)
3643− %.y
3630+> (gte:rd .~7.94099e2 .~1.2246e2)
3631+%.y
36443632
3645− > (gte:rd .~1.2246e2 .~1.2246e2)
3646− %.y
3633+> (gte:rd .~1.2246e2 .~1.2246e2)
3634+%.y
36473635```
36483636
36493637---
@@ -3667,23 +3655,23 @@ A `@rd`.
36673655#### Source
36683656
36693657```hoon
3670− ++ gth ~/ %gth
3671− |= [a=@rd b=@rd]
3672− ~_ leaf+"rd-fail"
3673− (gth:ma a b)
3658+++ gth ~/ %gth
3659+ |= [a=@rd b=@rd]
3660+ ~_ leaf+"rd-fail"
3661+ (gth:ma a b)
36743662```
36753663
36763664#### Examples
36773665
36783666```
3679− > (gth:rd .~7.94099e2 .~1.2246e3)
3680− %.n
3667+> (gth:rd .~7.94099e2 .~1.2246e3)
3668+%.n
36813669
3682− > (gth:rd .~7.94099e2 .~1.2246e2)
3683− %.y
3670+> (gth:rd .~7.94099e2 .~1.2246e2)
3671+%.y
36843672
3685− > (gth:rd .~1.2246e2 .~1.2246e2)
3686− %.n
3673+> (gth:rd .~1.2246e2 .~1.2246e2)
3674+%.n
36873675```
36883676
36893677---
@@ -3705,14 +3693,14 @@ A `@rd`.
37053693#### Source
37063694
37073695```hoon
3708− ++ sun |= [a=@u] ^- @rd (sun:ma a)
3696+++ sun |= [a=@u] ^- @rd (sun:ma a)
37093697```
37103698
37113699#### Examples
37123700
37133701```
3714− > (sun:rd 511)
3715− .~5.11e2
3702+> (sun:rd 511)
3703+.~5.11e2
37163704```
37173705
37183706---
@@ -3734,14 +3722,14 @@ A `@rd`.
37343722#### Source
37353723
37363724```hoon
3737− ++ san |= [a=@s] ^- @rd (san:ma a)
3725+++ san |= [a=@s] ^- @rd (san:ma a)
37383726```
37393727
37403728#### Examples
37413729
37423730```
3743− > (san:rd -511)
3744− .~-5.11e2
3731+> (san:rd -511)
3732+.~-5.11e2
37453733```
37463734
37473735---
@@ -3763,14 +3751,14 @@ A `flag`.
37633751#### Source
37643752
37653753```hoon
3766− ++ sig |= [a=@rd] ^- ? (sig:ma a)
3754+++ sig |= [a=@rd] ^- ? (sig:ma a)
37673755```
37683756
37693757#### Examples
37703758
37713759```
3772− > (sig:rd .~1.2246e3)
3773− %.y
3760+> (sig:rd .~1.2246e3)
3761+%.y
37743762```
37753763
37763764---
@@ -3792,14 +3780,14 @@ A `@s`.
37923780#### Source
37933781
37943782```hoon
3795− ++ exp |= [a=@rd] ^- @s (exp:ma a) :: get exponent
3783+++ exp |= [a=@rd] ^- @s (exp:ma a)
37963784```
37973785
37983786#### Examples
37993787
38003788```
3801− > (exp:rd .~1.2246e3)
3802− --10
3789+> (exp:rd .~1.2246e3)
3790+--10
38033791```
38043792
38053793---
@@ -3821,14 +3809,14 @@ A `unit` of `@s`.
38213809#### Source
38223810
38233811```hoon
3824− ++ toi |= [a=@rd] ^- (unit @s) (toi:ma a)
3812+++ toi |= [a=@rd] ^- (unit @s) (toi:ma a)
38253813```
38263814
38273815#### Examples
38283816
38293817```
3830− > (toi:rd .~1.2246e3)
3831− [~ u=--1.224]
3818+> (toi:rd .~1.2246e3)
3819+[~ u=--1.224]
38323820```
38333821
38343822---
@@ -3851,14 +3839,14 @@ A `dn`.
38513839#### Source
38523840
38533841```hoon
3854− ++ drg |= [a=@rd] ^- dn (drg:ma a)
3842+++ drg |= [a=@rd] ^- dn (drg:ma a)
38553843```
38563844
38573845#### Examples
38583846
38593847```
3860− > (drg:rd .~1.2246e3)
3861− [%d s=%.y e=-1 a=12.246]
3848+> (drg:rd .~1.2246e3)
3849+[%d s=%.y e=-1 a=12.246]
38623850```
38633851
38643852---
@@ -3880,15 +3868,14 @@ A `@rd`.
38803868#### Source
38813869
38823870```hoon
3883− ++ grd |= [a=dn] ^- @rd (grd:ma a) :: decimal float to @rd
3884− --
3871+++ grd |= [a=dn] ^- @rd (grd:ma a)
38853872```
38863873
38873874#### Examples
38883875
38893876```
3890− > (grd:rd [%d s=%.y e=-1 a=12.246])
3891− .~1.2246e3
3877+> (grd:rd [%d s=%.y e=-1 a=12.246])
3878+.~1.2246e3
38923879```
38933880
38943881---
@@ -3905,10 +3892,10 @@ down (`$d`), and round to zero (`$z`).
39053892#### Source
39063893
39073894```hoon
3908− ++ rs
3909− ~% %rs +> ~
3910− ^?
3911− |_ r=$?($n $u $d $z)
3895+++ rs
3896+ ~% %rs +> ~
3897+ ^|
3898+ |_ r=$?(%n %u %d %z)
39123899```
39133900
39143901---
@@ -3923,17 +3910,17 @@ configuration of the `rs` core.
39233910#### Source
39243911
39253912```hoon
3926− ++ ma
3927− %*(. ff w 8, p 23, b --127, r r)
3913+++ ma
3914+ %*(. ff w 8, p 23, b --127, r r)
39283915```
39293916
39303917#### Examples
39313918
39323919```
3933− > ~(ma rs %n)
3934− < 24.ltg
3935− {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3936− >
3920+> ~(ma rs %n)
3921+< 24.ltg
3922+ {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3923+>
39373924```
39383925
39393926---
@@ -3955,15 +3942,15 @@ An `fn`.
39553942#### Source
39563943
39573944```hoon
3958− ++ sea
3959− |= [a=@rs] (sea:ma a)
3945+++ sea
3946+ |= [a=@rs] (sea:ma a)
39603947```
39613948
39623949#### Examples
39633950
39643951```
3965− > (sea:rs .1.4e-43)
3966− [%f s=%.y e=-149 a=100]
3952+> (sea:rs .1.4e-43)
3953+[%f s=%.y e=-149 a=100]
39673954```
39683955
39693956---
@@ -3985,15 +3972,15 @@ A `@rs`, a single-precision float.
39853972#### Source
39863973
39873974```hoon
3988− ++ bit
3989− |= [a=fn] ^- @rs (bit:ma a)
3975+++ bit
3976+ |= [a=fn] ^- @rs (bit:ma a)
39903977```
39913978
39923979#### Examples
39933980
39943981```
3995− > (bit:rs [%f & -2 1.000])
3996− .2.5e2
3982+> (bit:rs [%f & -2 1.000])
3983+.2.5e2
39973984```
39983985
39993986---
@@ -4017,17 +4004,17 @@ A `@rs`.
40174004#### Source
40184005
40194006```hoon
4020− ++ add ~/ %add
4021− |= [a=@rs b=@rs] ^- @rs
4022− ~_ leaf+"rs-fail"
4023− (add:ma a b)
4007+++ add ~/ %add
4008+ |= [a=@rs b=@rs] ^- @rs
4009+ ~_ leaf+"rs-fail"
4010+ (add:ma a b)
40244011```
40254012
40264013#### Examples
40274014
40284015```
4029− > (add:rs .2.5e1 .2.5e2)
4030− .2.75e2
4016+> (add:rs .2.5e1 .2.5e2)
4017+.2.75e2
40314018```
40324019
40334020---
@@ -4038,20 +4025,26 @@ Subtract
40384025
40394026Subtracts `a` from `b`.
40404027
4028+#### Accepts
4029+
4030+`a` is a `@rs`.
4031+
4032+`b` is a `@rs`.
4033+
40414034#### Source
40424035
40434036```hoon
4044− ++ sub ~/ %sub
4045− |= [a=@rs b=@rs] ^- @rs
4046− ~_ leaf+"rs-fail"
4047− (sub:ma a b)
4037+++ sub ~/ %sub
4038+ |= [a=@rs b=@rs] ^- @rs
4039+ ~_ leaf+"rs-fail"
4040+ (sub:ma a b)
40484041```
40494042
40504043#### Examples
40514044
40524045```
4053− > (sub:rs .2.5e1 .2.5e2)
4054− .-2.25e2
4046+> (sub:rs .2.5e1 .2.5e2)
4047+.-2.25e2
40554048```
40564049
40574050---
@@ -4075,17 +4068,17 @@ A `@rs`.
40754068#### Source
40764069
40774070```hoon
4078− ++ mul ~/ %mul
4079− |= [a=@rs b=@rs] ^- @rs
4080− ~_ leaf+"rs-fail"
4081− (mul:ma a b)
4071+++ mul ~/ %mul
4072+ |= [a=@rs b=@rs] ^- @rs
4073+ ~_ leaf+"rs-fail"
4074+ (mul:ma a b)
40824075```
40834076
40844077#### Examples
40854078
40864079```
4087− > (mul:rs .2.5e1 .2.5e2)
4088− .6.25e3
4080+> (mul:rs .2.5e1 .2.5e2)
4081+.6.25e3
40894082```
40904083
40914084---
@@ -4109,17 +4102,17 @@ A `@rs`.
41094102#### Source
41104103
41114104```hoon
4112− ++ div ~/ %div
4113− |= [a=@rs b=@rs] ^- @rs
4114− ~_ leaf+"rs-fail"
4115− (div:ma a b)
4105+++ div ~/ %div
4106+ |= [a=@rs b=@rs] ^- @rs
4107+ ~_ leaf+"rs-fail"
4108+ (div:ma a b)
41164109```
41174110
41184111#### Examples
41194112
41204113```
4121− > (div:rs .4.5e1 .2.2e2)
4122− .2.0454545e-1
4114+> (div:rs .4.5e1 .2.2e2)
4115+.2.0454545e-1
41234116```
41244117
41254118---
@@ -4146,17 +4139,17 @@ A `@rs`.
41464139#### Source
41474140
41484141```hoon
4149− ++ fma ~/ %fma
4150− |= [a=@rs b=@rs c=@rs] ^- @rs
4151− ~_ leaf+"rs-fail"
4152− (fma:ma a b c)
4142+++ fma ~/ %fma
4143+ |= [a=@rs b=@rs c=@rs] ^- @rs
4144+ ~_ leaf+"rs-fail"
4145+ (fma:ma a b c)
41534146```
41544147
41554148#### Examples
41564149
41574150```
4158− > (fma:rs .2.5e1 .2.5e2 .8.2e1)
4159− .6.332e3
4151+> (fma:rs .2.5e1 .2.5e2 .8.2e1)
4152+.6.332e3
41604153```
41614154
41624155---
@@ -4178,17 +4171,17 @@ A `@rs`.
41784171#### Source
41794172
41804173```hoon
4181− ++ sqt ~/ %sqt
4182− |= [a=@rs] ^- @rs
4183− ~_ leaf+"rs-fail"
4184− (sqt:ma a)
4174+++ sqt ~/ %sqt
4175+ |= [a=@rs] ^- @rs
4176+ ~_ leaf+"rs-fail"
4177+ (sqt:ma a)
41854178```
41864179
41874180#### Examples
41884181
41894182```
4190− > (sqt:rs .2.5e2)
4191− .1.5811388e1
4183+> (sqt:rs .2.5e2)
4184+.1.5811388e1
41924185```
41934186
41944187---
@@ -4212,20 +4205,20 @@ A `@rs`.
42124205#### Source
42134206
42144207```hoon
4215− ++ lth ~/ %lth
4216− |= [a=@rs b=@rs]
4217− ~_ leaf+"rs-fail"
4218− (lth:ma a b)
4208+++ lth ~/ %lth
4209+ |= [a=@rs b=@rs]
4210+ ~_ leaf+"rs-fail"
4211+ (lth:ma a b)
42194212```
42204213
42214214#### Examples
42224215
42234216```
4224− > (lth:rs .9.9e1 .1.1e2)
4225− %.y
4217+> (lth:rs .9.9e1 .1.1e2)
4218+%.y
42264219
4227− > (lth:rs .9.9e1 .9.9e1)
4228− %.n
4220+> (lth:rs .9.9e1 .9.9e1)
4221+%.n
42294222```
42304223
42314224---
@@ -4249,20 +4242,20 @@ A `@rs`.
42494242#### Source
42504243
42514244```hoon
4252− ++ lte ~/ %lte
4253− |= [a=@rs b=@rs]
4254− ~_ leaf+"rs-fail"
4255− (lte:ma a b)
4245+++ lte ~/ %lte
4246+ |= [a=@rs b=@rs]
4247+ ~_ leaf+"rs-fail"
4248+ (lte:ma a b)
42564249```
42574250
42584251#### Examples
42594252
42604253```
4261− > (lte:rs .9.9e1 .1.1e2)
4262− %.y
4254+> (lte:rs .9.9e1 .1.1e2)
4255+%.y
42634256
4264− > (lte:rs .9.9e1 .9.9e1)
4265− %.y
4257+> (lte:rs .9.9e1 .9.9e1)
4258+%.y
42664259```
42674260
42684261---
@@ -4286,20 +4279,20 @@ A `@rs`.
42864279#### Source
42874280
42884281```hoon
4289− ++ equ ~/ %equ
4290− |= [a=@rs b=@rs]
4291− ~_ leaf+"rs-fail"
4292− (equ:ma a b)
4282+++ equ ~/ %equ
4283+ |= [a=@rs b=@rs]
4284+ ~_ leaf+"rs-fail"
4285+ (equ:ma a b)
42934286```
42944287
42954288#### Examples
42964289
42974290```
4298− > (equ:rs .9.9e1 .1.1e2)
4299− %.n
4291+> (equ:rs .9.9e1 .1.1e2)
4292+%.n
43004293
4301− > (equ:rs .9.9e1 .9.9e1)
4302− %.y
4294+> (equ:rs .9.9e1 .9.9e1)
4295+%.y
43034296```
43044297
43054298---
@@ -4323,20 +4316,20 @@ A `@rs`.
43234316#### Source
43244317
43254318```hoon
4326− ++ gte ~/ %gte
4327− |= [a=@rs b=@rs]
4328− ~_ leaf+"rs-fail"
4329− (gte:ma a b)
4319+++ gte ~/ %gte
4320+ |= [a=@rs b=@rs]
4321+ ~_ leaf+"rs-fail"
4322+ (gte:ma a b)
43304323```
43314324
43324325#### Examples
43334326
43344327```
4335− > (gte:rs .9.9e1 .9.9e1)
4336− %.y
4328+> (gte:rs .9.9e1 .9.9e1)
4329+%.y
43374330
4338− > (gte:rs .9.9e1 .9.2e2)
4339− %.n
4331+> (gte:rs .9.9e1 .9.2e2)
4332+%.n
43404333```
43414334
43424335---
@@ -4360,23 +4353,23 @@ A `@rs`.
43604353#### Source
43614354
43624355```hoon
4363− ++ gth ~/ %gth
4364− |= [a=@rs b=@rs]
4365− ~_ leaf+"rs-fail"
4366− (gth:ma a b)
4356+++ gth ~/ %gth
4357+ |= [a=@rs b=@rs]
4358+ ~_ leaf+"rs-fail"
4359+ (gth:ma a b)
43674360```
43684361
43694362#### Examples
43704363
43714364```
4372− > (gth:rs .9.9e1 .9.2e2)
4373− %.n
4365+> (gth:rs .9.9e1 .9.2e2)
4366+%.n
43744367
4375− > (gth:rs .9.9e1 .9.9e1)
4376− %.n
4368+> (gth:rs .9.9e1 .9.9e1)
4369+%.n
43774370
4378− > (gth:rs .9.9e1 .1.9e1)
4379− %.y
4371+> (gth:rs .9.9e1 .1.9e1)
4372+%.y
43804373```
43814374
43824375---
@@ -4398,14 +4391,14 @@ A `@rs`.
43984391#### Source
43994392
44004393```hoon
4401− ++ sun |= [a=@u] ^- @rs (sun:ma a)
4394+++ sun |= [a=@u] ^- @rs (sun:ma a)
44024395```
44034396
44044397#### Examples
44054398
44064399```
4407− > (sun:rs 343)
4408− .3.43e2
4400+> (sun:rs 343)
4401+.3.43e2
44094402```
44104403
44114404---
@@ -4427,16 +4420,18 @@ A `@rs`.
44274420#### Source
44284421
44294422```hoon
4430− ++ san |= [a=@s] ^- @rs (san:ma a)
4423+++ san |= [a=@s] ^- @rs (san:ma a)
44314424```
44324425
44334426#### Examples
44344427
44354428```
4436− > (san:rs -343)
4437− .-3.43e2'
4429+> (san:rs -343)
4430+.-3.43e2'
44384431```
44394432
4433+---
4434+
44404435### `++sig:rs`
44414436
44424437Get sign
@@ -4454,17 +4449,17 @@ A `flag`.
44544449#### Source
44554450
44564451```hoon
4457− ++ sig |= [a=@rs] ^- ? (sig:ma a)
4452+++ sig |= [a=@rs] ^- ? (sig:ma a)
44584453```
44594454
44604455#### Examples
44614456
44624457```
4463− > (sig:rs .3.43e2)
4464− %.y
4458+> (sig:rs .3.43e2)
4459+%.y
44654460
4466− > (sig:rs .-3.43e2)
4467− %.n
4461+> (sig:rs .-3.43e2)
4462+%.n
44684463```
44694464
44704465---
@@ -4486,14 +4481,14 @@ A signed integer.
44864481#### Source
44874482
44884483```hoon
4489− ++ exp |= [a=@rs] ^- @s (exp:ma a)
4484+++ exp |= [a=@rs] ^- @s (exp:ma a)
44904485```
44914486
44924487#### Examples
44934488
44944489```
4495− > (exp:rs .-3.43e2)
4496− --8
4490+> (exp:rs .-3.43e2)
4491+--8
44974492```
44984493
44994494---
@@ -4515,14 +4510,14 @@ A `unit` of `@s`.
45154510#### Source
45164511
45174512```hoon
4518− ++ toi |= [a=@rs] ^- (unit @s) (toi:ma a)
4513+++ toi |= [a=@rs] ^- (unit @s) (toi:ma a)
45194514```
45204515
45214516#### Examples
45224517
45234518```
4524− > (toi:rs .-3.43e2)
4525− [~ u=-343]
4519+> (toi:rs .-3.43e2)
4520+[~ u=-343]
45264521```
45274522
45284523---
@@ -4545,14 +4540,14 @@ A `dn`.
45454540#### Source
45464541
45474542```hoon
4548− ++ drg |= [a=@rs] ^- dn (drg:ma a)
4543+++ drg |= [a=@rs] ^- dn (drg:ma a)
45494544```
45504545
45514546#### Examples
45524547
45534548```
4554− > (drg:rs .-3.43e2)
4555− [%d s=%.n e=--0 a=343]
4549+> (drg:rs .-3.43e2)
4550+[%d s=%.n e=--0 a=343]
45564551```
45574552
45584553---
@@ -4574,15 +4569,14 @@ A `@rs`.
45744569#### Source
45754570
45764571```hoon
4577− ++ grd |= [a=dn] ^- @rs (grd:ma a)
4578− --
4572+++ grd |= [a=dn] ^- @rs (grd:ma a)
45794573```
45804574
45814575#### Examples
45824576
45834577```
4584− > (grd:rs [%d s=%.n e=--0 a=343])
4585− .-3.43e2
4578+> (grd:rs [%d s=%.n e=--0 a=343])
4579+.-3.43e2
45864580```
45874581
45884582---
@@ -4593,16 +4587,16 @@ Quadruple-precision fp
45934587
45944588A container core for operations related to quadruple-precision binary floats.
45954589
4596−`++rq` has four rounding modes: round to nearest (`$n`), round up (`$u`), round
4597−down (`$d`), and round to zero (`$z`).
4590+`++rq` has four rounding modes: round to nearest (`%n`), round up (`%u`), round
4591+down (`%d`), and round to zero (`%z`).
45984592
45994593#### Source
46004594
46014595```hoon
4602− ++ rq
4603− ~% %rq +> ~
4604− ^?
4605− |_ r=$?($n $u $d $z)
4596+++ rq
4597+ ~% %rq +> ~
4598+ ^|
4599+ |_ r=$?(%n %u %d %z)
46064600```
46074601
46084602### `++ma:rq`
@@ -4615,8 +4609,8 @@ configuration of the `rq` core.
46154609#### Source
46164610
46174611```hoon
4618− ++ ma
4619− %*(. ff w 15, p 112, b --16.383, r r)
4612+++ ma
4613+ %*(. ff w 15, p 112, b --16.383, r r)
46204614```
46214615
46224616---
@@ -4638,15 +4632,15 @@ An `fn`.
46384632#### Source
46394633
46404634```hoon
4641− ++ sea
4642− |= [a=@rq] (sea:ma a)
4635+++ sea
4636+ |= [a=@rq] (sea:ma a)
46434637```
46444638
46454639#### Examples
46464640
46474641```
4648− > (sea:rq .~~~1.05102e5)
4649− [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272]
4642+> (sea:rq .~~~1.05102e5)
4643+[%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272]
46504644```
46514645
46524646---
@@ -4668,15 +4662,15 @@ A `@rq`, a quad-precision float.
46684662#### Source
46694663
46704664```hoon
4671− ++ bit
4672− |= [a=n] ^- @rq (bit:ma a)
4665+++ bit
4666+ |= [a=fn] ^- @rq (bit:ma a)
46734667```
46744668
46754669#### Examples
46764670
46774671```
4678− > (bit:rq [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272])
4679− .~~~1.05102e5
4672+> (bit:rq [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272])
4673+.~~~1.05102e5
46804674```
46814675
46824676---
@@ -4700,17 +4694,17 @@ A `@rq`.
47004694#### Source
47014695
47024696```hoon
4703− ++ add ~/ %add
4704− |= [a=@rq b=@rq] ^- @rq
4705− ~_ leaf+"rq-fail"
4706− (add:ma a b)
4697+++ add ~/ %add
4698+ |= [a=@rq b=@rq] ^- @rq
4699+ ~_ leaf+"rq-fail"
4700+ (add:ma a b)
47074701```
47084702
47094703#### Examples
47104704
47114705```
4712− > (add:rq .~~~-1.821e5 .~~~1.05102e5)
4713− .~~~-7.6998e4
4706+> (add:rq .~~~-1.821e5 .~~~1.05102e5)
4707+.~~~-7.6998e4
47144708```
47154709
47164710---
@@ -4734,20 +4728,20 @@ A `@rq`.
47344728#### Source
47354729
47364730```hoon
4737− ++ sub ~/ %sub
4738− |= [a=@rq b=@rq] ^- @rq
4739− ~_ leaf+"rq-fail"
4740− (sub:ma a b)
4731+++ sub ~/ %sub
4732+ |= [a=@rq b=@rq] ^- @rq
4733+ ~_ leaf+"rq-fail"
4734+ (sub:ma a b)
47414735```
47424736
47434737#### Examples
47444738
47454739```
4746− > (sub:rq .~~~1.821e5 .~~~1.05102e5)
4747− .~~~7.6998e4
4740+> (sub:rq .~~~1.821e5 .~~~1.05102e5)
4741+.~~~7.6998e4
47484742
4749− > (sub:rq .~~~1.821e5 .~~~-1.05102e5)
4750− .~~~2.87202e5
4743+> (sub:rq .~~~1.821e5 .~~~-1.05102e5)
4744+.~~~2.87202e5
47514745```
47524746
47534747---
@@ -4771,17 +4765,17 @@ A `@rq`.
47714765#### Source
47724766
47734767```hoon
4774− ++ mul ~/ %mul
4775− |= [a=@rq b=@rq] ^- @rq
4776− ~_ leaf+"rq-fail"
4777− (mul:ma a b)
4768+++ mul ~/ %mul
4769+ |= [a=@rq b=@rq] ^- @rq
4770+ ~_ leaf+"rq-fail"
4771+ (mul:ma a b)
47784772```
47794773
47804774#### Examples
47814775
47824776```
4783− > (mul:rq .~~~1.821e5 .~~~-1.05102e5)
4784− .~~~-1.91390742e10
4777+> (mul:rq .~~~1.821e5 .~~~-1.05102e5)
4778+.~~~-1.91390742e10
47854779```
47864780
47874781---
@@ -4805,17 +4799,17 @@ A `@rq`.
48054799#### Source
48064800
48074801```hoon
4808− ++ div ~/ %div
4809− |= [a=@rq b=@rq] ^- @rq
4810− ~_ leaf+"rq-fail"
4811− (div:ma a b)
4802+++ div ~/ %div
4803+ |= [a=@rq b=@rq] ^- @rq
4804+ ~_ leaf+"rq-fail"
4805+ (div:ma a b)
48124806```
48134807
48144808#### Examples
48154809
48164810```
4817− > (div:rq .~~~1.821e5 .~~~1.05102e3)
4818− .~~~1.732602614602957127361991208540275e2
4811+> (div:rq .~~~1.821e5 .~~~1.05102e3)
4812+.~~~1.732602614602957127361991208540275e2
48194813```
48204814
48214815---
@@ -4842,17 +4836,17 @@ A `@rq`.
48424836#### Source
48434837
48444838```hoon
4845− ++ fma ~/ %fma
4846− |= [a=@rq b=@rq c=@rq] ^- @rq
4847− ~_ leaf+"rq-fail"
4848− (fma:ma a b c)
4839+++ fma ~/ %fma
4840+ |= [a=@rq b=@rq c=@rq] ^- @rq
4841+ ~_ leaf+"rq-fail"
4842+ (fma:ma a b c)
48494843```
48504844
48514845#### Examples
48524846
48534847```
4854− > (fma:rq .~~~1.821e5 .~~~-1.05102e2 .~~~6.2044e7)
4855− .~~~4.29049258e7
4848+> (fma:rq .~~~1.821e5 .~~~-1.05102e2 .~~~6.2044e7)
4849+.~~~4.29049258e7
48564850```
48574851
48584852---
@@ -4874,17 +4868,17 @@ A `@rq`.
48744868#### Source
48754869
48764870```hoon
4877− ++ sqt ~/ %sqt
4878− |= [a=@rq] ^- @rq
4879− ~_ leaf+"rq-fail"
4880− (sqt:ma a)
4871+++ sqt ~/ %sqt
4872+ |= [a=@rq] ^- @rq
4873+ ~_ leaf+"rq-fail"
4874+ (sqt:ma a)
48814875```
48824876
48834877#### Examples
48844878
48854879```
4886− > (sqt:rq .~~~6.2044e7)
4887− .~~~7.876801381271461258959876570289002e3
4880+> (sqt:rq .~~~6.2044e7)
4881+.~~~7.876801381271461258959876570289002e3
48884882```
48894883
48904884---
@@ -4908,20 +4902,20 @@ A `@rq`.
49084902#### Source
49094903
49104904```hoon
4911− ++ lth ~/ %lth
4912− |= [a=@rq b=@rq]
4913− ~_ leaf+"rq-fail"
4914− (lth:ma a b)
4905+++ lth ~/ %lth
4906+ |= [a=@rq b=@rq]
4907+ ~_ leaf+"rq-fail"
4908+ (lth:ma a b)
49154909```
49164910
49174911#### Examples
49184912
49194913```
4920− > (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4921− %.n
4914+> (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4915+%.n
49224916
4923− > (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4924− %.y
4917+> (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4918+%.y
49254919```
49264920
49274921---
@@ -4945,23 +4939,23 @@ A `@rq`.
49454939#### Source
49464940
49474941```hoon
4948− ++ lte ~/ %lte
4949− |= [a=@rq b=@rq]
4950− ~_ leaf+"rq-fail"
4951− (lte:ma a b)
4942+++ lte ~/ %lte
4943+ |= [a=@rq b=@rq]
4944+ ~_ leaf+"rq-fail"
4945+ (lte:ma a b)
49524946```
49534947
49544948#### Examples
49554949
49564950```
4957− > (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4958− %.n
4951+> (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4952+%.n
49594953
4960− > (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4961− %.y
4954+> (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4955+%.y
49624956
4963− > (lte:rq .~~~1.2044e7 .~~~1.2044e7)
4964− %.y
4957+> (lte:rq .~~~1.2044e7 .~~~1.2044e7)
4958+%.y
49654959```
49664960
49674961---
@@ -4985,20 +4979,20 @@ A `@rq`.
49854979#### Source
49864980
49874981```hoon
4988− ++ equ ~/ %equ
4989− |= [a=@rq b=@rq]
4990− ~_ leaf+"rq-fail"
4991− (equ:ma a b)
4982+++ equ ~/ %equ
4983+ |= [a=@rq b=@rq]
4984+ ~_ leaf+"rq-fail"
4985+ (equ:ma a b)
49924986```
49934987
49944988#### Examples
49954989
49964990```
4997− > (equ:rq .~~~1.2044e7 .~~~1.2044e7)
4998− %.y
4991+> (equ:rq .~~~1.2044e7 .~~~1.2044e7)
4992+%.y
49994993
5000− > (equ:rq .~~~2.2044e7 .~~~1.2044e7)
5001− %.n
4994+> (equ:rq .~~~2.2044e7 .~~~1.2044e7)
4995+%.n
50024996```
50034997
50044998---
@@ -5022,23 +5016,23 @@ A `@rq`.
50225016#### Source
50235017
50245018```hoon
5025− ++ gte ~/ %gte
5026− |= [a=@rq b=@rq]
5027− ~_ leaf+"rq-fail"
5028− (gte:ma a b)
5019+++ gte ~/ %gte
5020+ |= [a=@rq b=@rq]
5021+ ~_ leaf+"rq-fail"
5022+ (gte:ma a b)
50295023```
50305024
50315025#### Examples
50325026
50335027```
5034− > (gte:rq .~~~1.2044e7 .~~~1.2044e7)
5035− %.y
5028+> (gte:rq .~~~1.2044e7 .~~~1.2044e7)
5029+%.y
50365030
5037− > (gte:rq .~~~2.2044e7 .~~~1.2044e7)
5038− %.y
5031+> (gte:rq .~~~2.2044e7 .~~~1.2044e7)
5032+%.y
50395033
5040− > (gte:rq .~~~1.2044e7 .~~~2.2044e7)
5041− %.n
5034+> (gte:rq .~~~1.2044e7 .~~~2.2044e7)
5035+%.n
50425036```
50435037
50445038---
@@ -5060,23 +5054,23 @@ A `@rq`.
50605054#### Source
50615055
50625056```hoon
5063− ++ gth ~/ %gth
5064− |= [a=@rq b=@rq]
5065− ~_ leaf+"rq-fail"
5066− (gth:ma a b)
5057+++ gth ~/ %gth
5058+ |= [a=@rq b=@rq]
5059+ ~_ leaf+"rq-fail"
5060+ (gth:ma a b)
50675061```
50685062
50695063#### Examples
50705064
50715065```
5072− > (gth:rq .~~~1.2044e7 .~~~1.2044e7)
5073− %.n
5066+> (gth:rq .~~~1.2044e7 .~~~1.2044e7)
5067+%.n
50745068
5075− > (gth:rq .~~~2.2044e7 .~~~1.2044e7)
5076− %.y
5069+> (gth:rq .~~~2.2044e7 .~~~1.2044e7)
5070+%.y
50775071
5078− > (gth:rq .~~~1.2044e7 .~~~2.2044e7)
5079− %.n
5072+> (gth:rq .~~~1.2044e7 .~~~2.2044e7)
5073+%.n
50805074```
50815075
50825076---
@@ -5098,14 +5092,14 @@ A `@rq`, a quad-precision float.
50985092#### Source
50995093
51005094```hoon
5101− ++ sun |= [a=@u] ^- @rq (sun:ma a)
5095+++ sun |= [a=@u] ^- @rq (sun:ma a)
51025096```
51035097
51045098#### Examples
51055099
51065100```
5107− > (sun:rq 205)
5108− .~~~2.05e2
5101+> (sun:rq 205)
5102+.~~~2.05e2
51095103```
51105104
51115105---
@@ -5127,14 +5121,14 @@ A `@rq`, a quad-precision float.
51275121#### Source
51285122
51295123```hoon
5130− ++ san |= [a=@s] ^- @rq (san:ma a)
5124+++ san |= [a=@s] ^- @rq (san:ma a)
51315125```
51325126
51335127#### Examples
51345128
51355129```
5136− > (san:rq -205)
5137− .~~~-2.05e2
5130+> (san:rq -205)
5131+.~~~-2.05e2
51385132```
51395133
51405134---
@@ -5156,14 +5150,14 @@ A `flag`.
51565150#### Source
51575151
51585152```hoon
5159− ++ sig |= [a=@rq] ^- ? (sig:ma a)
5153+++ sig |= [a=@rq] ^- ? (sig:ma a)
51605154```
51615155
51625156#### Examples
51635157
51645158```
5165− > (sig:rq .~~~-2.05e2)
5166− %.n
5159+> (sig:rq .~~~-2.05e2)
5160+%.n
51675161```
51685162
51695163---
@@ -5185,14 +5179,14 @@ A `@s`, a signed integer.
51855179#### Source
51865180
51875181```hoon
5188− ++ exp |= [a=@rq] ^- @s (exp:ma a)
5182+++ exp |= [a=@rq] ^- @s (exp:ma a)
51895183```
51905184
51915185#### Examples
51925186
51935187```
5194− > (exp:rq .~~~-2.05e2)
5195− --7
5188+> (exp:rq .~~~-2.05e2)
5189+--7
51965190```
51975191
51985192---
@@ -5214,17 +5208,17 @@ A `unit` of `@s`.
52145208#### Source
52155209
52165210```hoon
5217− ++ toi |= [a=@rq] ^- (unit @s) (toi:ma a)
5211+++ toi |= [a=@rq] ^- (unit @s) (toi:ma a)
52185212```
52195213
52205214#### Examples
52215215
52225216```
5223− > (toi:rq .~~~-2.085e2)
5224− [~ u=-208]
5217+> (toi:rq .~~~-2.085e2)
5218+[~ u=-208]
52255219
5226− > (toi:rq .~~~-2.08e2)
5227− [~ u=-208]
5220+> (toi:rq .~~~-2.08e2)
5221+[~ u=-208]
52285222```
52295223
52305224---
@@ -5247,17 +5241,17 @@ A `dn`.
52475241#### Source
52485242
52495243```hoon
5250− ++ drg |= [a=@rq] ^- dn (drg:ma a) :: @rq to decimal float
5244+++ drg |= [a=@rq] ^- dn (drg:ma a)
52515245```
52525246
52535247#### Examples
52545248
52555249```
5256− > (drg:rq .~~~-2.085e2)
5257− [%d s=%.n e=-1 a=2.085]
5250+> (drg:rq .~~~-2.085e2)
5251+[%d s=%.n e=-1 a=2.085]
52585252
5259− > (drg:rq .~~~-2.08e2)
5260− [%d s=%.n e=--0 a=208]
5253+> (drg:rq .~~~-2.08e2)
5254+[%d s=%.n e=--0 a=208]
52615255```
52625256
52635257---
@@ -5281,15 +5275,14 @@ A `@rq`, a quad-precision float.
52815275#### Source
52825276
52835277```hoon
5284− ++ grd |= [a=dn] ^- @rq (grd:ma a)
5285− --
5278+++ grd |= [a=dn] ^- @rq (grd:ma a)
52865279```
52875280
52885281#### Examples
52895282
52905283```
5291− > (grd:rq [%d s=%.n e=--0 a=343])
5292− .~~~-3.43e2
5284+> (grd:rq [%d s=%.n e=--0 a=343])
5285+.~~~-3.43e2
52935286```
52945287
52955288---
@@ -5300,16 +5293,16 @@ Half-precision fp
53005293
53015294A container core for operations related to half-precision binary floats.
53025295
5303−`++rh` has four rounding modes: round to nearest (`$n`), round up (`$u`), round
5304−down (`$d`), and round to zero (`$z`).
5296+`++rh` has four rounding modes: round to nearest (`%n`), round up (`%u`), round
5297+down (`%d`), and round to zero (`%z`).
53055298
53065299#### Source
53075300
53085301```hoon
5309− ++ rh
5310− ~% %rh +> ~
5311− ^?
5312− |_ r=$?($n $u $d $z)
5302+++ rh
5303+ ~% %rh +> ~
5304+ ^|
5305+ |_ r=$?(%n %u %d %z)
53135306```
53145307
53155308---
@@ -5324,8 +5317,8 @@ configuration of the `rh` core.
53245317#### Source
53255318
53265319```hoon
5327− ++ ma
5328− %*(. ff w 5, p 10, b --15, r r)
5320+++ ma
5321+ %*(. ff w 5, p 10, b --15, r r)
53295322```
53305323
53315324---
@@ -5347,15 +5340,15 @@ An `fn`.
53475340#### Source
53485341
53495342```hoon
5350− ++ sea
5351− |= [a=@rh] (sea:ma a)
5343+++ sea
5344+ |= [a=@rh] (sea:ma a)
53525345```
53535346
53545347#### Examples
53555348
53565349```
5357− > (sea:rh .~~1.22e-5)
5358− [%f s=%.y e=-24 a=205]
5350+> (sea:rh .~~1.22e-5)
5351+[%f s=%.y e=-24 a=205]
53595352```
53605353
53615354---
@@ -5377,15 +5370,15 @@ A `@rh`, a half-precision float.
53775370#### Source
53785371
53795372```hoon
5380− ++ bit
5381− |= [a=fn] ^- @rh (bit:ma a)
5373+++ bit
5374+ |= [a=fn] ^- @rh (bit:ma a)
53825375```
53835376
53845377#### Examples
53855378
53865379```
5387− > (bit:rh [%f s=%.y e=-24 a=205])
5388− .~~1.22e-5
5380+> (bit:rh [%f s=%.y e=-24 a=205])
5381+.~~1.22e-5
53895382```
53905383
53915384---
@@ -5407,17 +5400,17 @@ A `@rh`.
54075400#### Source
54085401
54095402```hoon
5410− ++ add ~/ %add
5411− |= [a=@rh b=@rh] ^- @rh
5412− ~_ leaf+"rh-fail"
5413− (add:ma a b)
5403+++ add ~/ %add
5404+ |= [a=@rh b=@rh] ^- @rh
5405+ ~_ leaf+"rh-fail"
5406+ (add:ma a b)
54145407```
54155408
54165409#### Examples
54175410
54185411```
5419− > (add:rh .~~1.82e2 .~~1.02e2)
5420− .~~2.84e2
5412+> (add:rh .~~1.82e2 .~~1.02e2)
5413+.~~2.84e2
54215414```
54225415
54235416---
@@ -5441,20 +5434,20 @@ A `@rh`.
54415434#### Source
54425435
54435436```hoon
5444− ++ sub ~/ %sub
5445− |= [a=@rh b=@rh] ^- @rh
5446− ~_ leaf+"rh-fail"
5447− (sub:ma a b)
5437+++ sub ~/ %sub
5438+ |= [a=@rh b=@rh] ^- @rh
5439+ ~_ leaf+"rh-fail"
5440+ (sub:ma a b)
54485441```
54495442
54505443#### Examples
54515444
54525445```
5453− > (sub:rh .~~1.821e2 .~~1.051e2)
5454− .~~7.7e1
5446+> (sub:rh .~~1.821e2 .~~1.051e2)
5447+.~~7.7e1
54555448
5456− > (sub:rh .~~1.821e2 .~~6.051e2)
5457− .~~-4.228e2
5449+> (sub:rh .~~1.821e2 .~~6.051e2)
5450+.~~-4.228e2
54585451```
54595452
54605453---
@@ -5478,17 +5471,17 @@ A `@rh`.
54785471#### Source
54795472
54805473```hoon
5481− ++ mul ~/ %mul
5482− |= [a=@rh b=@rh] ^- @rh
5483− ~_ leaf+"rh-fail"
5484− (mul:ma a b)
5474+++ mul ~/ %mul
5475+ |= [a=@rh b=@rh] ^- @rh
5476+ ~_ leaf+"rh-fail"
5477+ (mul:ma a b)
54855478```
54865479
54875480#### Examples
54885481
54895482```
5490− > (mul:rh .~~1.821e1 .~~-1.05102e2)
5491− .~~-1.913e3
5483+> (mul:rh .~~1.821e1 .~~-1.05102e2)
5484+.~~-1.913e3
54925485```
54935486
54945487---
@@ -5512,17 +5505,17 @@ A `@rh`.
55125505#### Source
55135506
55145507```hoon
5515− ++ div ~/ %div
5516− |= [a=@rh b=@rh] ^- @rh
5517− ~_ leaf+"rh-fail"
5518− (div:ma a b)
5508+++ div ~/ %div
5509+ |= [a=@rh b=@rh] ^- @rh
5510+ ~_ leaf+"rh-fail"
5511+ (div:ma a b)
55195512```
55205513
55215514#### examples
55225515
55235516```
5524− > (div:rh .~~1.821e3 .~~1.05102e2)
5525− .~~1.731e1
5517+> (div:rh .~~1.821e3 .~~1.05102e2)
5518+.~~1.731e1
55265519```
55275520
55285521---
@@ -5549,17 +5542,17 @@ A `@rh`.
55495542#### Source
55505543
55515544```hoon
5552− ++ fma ~/ %fma
5553− |= [a=@rh b=@rh c=@rh] ^- @rh
5554− ~_ leaf+"rh-fail"
5555− (fma:ma a b c)
5545+++ fma ~/ %fma
5546+ |= [a=@rh b=@rh c=@rh] ^- @rh
5547+ ~_ leaf+"rh-fail"
5548+ (fma:ma a b c)
55565549```
55575550
55585551#### Examples
55595552
55605553```
5561− > (fma:rh .~~1.821e4 .~~-1.05102e2 .~~6.2044e3)
5562− .~~-6.55e4
5554+> (fma:rh .~~1.821e4 .~~-1.05102e2 .~~6.2044e3)
5555+.~~-6.55e4
55635556```
55645557
55655558---
@@ -5581,17 +5574,17 @@ A `@rh`.
55815574#### Source
55825575
55835576```hoon
5584− ++ sqt ~/ %sqt
5585− |= [a=@rh] ^- @rh
5586− ~_ leaf+"rh-fail"
5587− (sqt:ma a)
5577+++ sqt ~/ %sqt
5578+ |= [a=@rh] ^- @rh
5579+ ~_ leaf+"rh-fail"
5580+ (sqt:ma a)
55885581```
55895582
5590−#### Source
5583+#### Example
55915584
55925585```hoon
5593− > (sqt:rh .~~6.24e4)
5594− .~~2.498e2
5586+> (sqt:rh .~~6.24e4)
5587+.~~2.498e2
55955588```
55965589
55975590---
@@ -5615,20 +5608,20 @@ A `@rh`.
56155608#### Source
56165609
56175610```hoon
5618− ++ lth ~/ %lth
5619− |= [a=@rh b=@rh]
5620− ~_ leaf+"rh-fail"
5621− (lth:ma a b)
5611+++ lth ~/ %lth
5612+ |= [a=@rh b=@rh]
5613+ ~_ leaf+"rh-fail"
5614+ (lth:ma a b)
56225615```
56235616
56245617#### Examples
56255618
56265619```
5627− > (lth:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5628− %.n
5620+> (lth:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5621+%.n
56295622
5630− > (lth:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5631− %.y
5623+> (lth:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5624+%.y
56325625```
56335626
56345627---
@@ -5652,23 +5645,23 @@ A `@rh`.
56525645#### Source
56535646
56545647```hoon
5655− ++ lte ~/ %lte
5656− |= [a=@rh b=@rh]
5657− ~_ leaf+"rh-fail"
5658− (lte:ma a b)
5648+++ lte ~/ %lte
5649+ |= [a=@rh b=@rh]
5650+ ~_ leaf+"rh-fail"
5651+ (lte:ma a b)
56595652```
56605653
56615654#### Examples
56625655
56635656```
5664− > (lte:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5665− %.n
5657+> (lte:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5658+%.n
56665659
5667− > (lte:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5668− %.y
5660+> (lte:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5661+%.y
56695662
5670− > (lte:rh .~~1.2e3 .~~1.2e3)
5671− %.y
5663+> (lte:rh .~~1.2e3 .~~1.2e3)
5664+%.y
56725665```
56735666
56745667---
@@ -5692,20 +5685,20 @@ A `@rh`.
56925685#### Source
56935686
56945687```hoon
5695− ++ equ ~/ %equ
5696− |= [a=@rh b=@rh]
5697− ~_ leaf+"rh-fail"
5698− (equ:ma a b)
5688+++ equ ~/ %equ
5689+ |= [a=@rh b=@rh]
5690+ ~_ leaf+"rh-fail"
5691+ (equ:ma a b)
56995692```
57005693
57015694#### Examples
57025695
57035696```
5704− > (equ:rh .~~1.24e4 .~~1.24e4)
5705− %.y
5697+> (equ:rh .~~1.24e4 .~~1.24e4)
5698+%.y
57065699
5707− > (equ:rh .~~2.24e4 .~~1.24e4)
5708− %.n
5700+> (equ:rh .~~2.24e4 .~~1.24e4)
5701+%.n
57095702```
57105703
57115704---
@@ -5729,23 +5722,23 @@ A `@rh`.
57295722#### Source
57305723
57315724```hoon
5732− ++ gte ~/ %gte
5733− |= [a=@rh b=@rh]
5734− ~_ leaf+"rh-fail"
5735− (gte:ma a b)
5725+++ gte ~/ %gte
5726+ |= [a=@rh b=@rh]
5727+ ~_ leaf+"rh-fail"
5728+ (gte:ma a b)
57365729```
57375730
57385731#### Examples
57395732
57405733```
5741− > (gte:rh .~~1.24e4 .~~1.24e4)
5742− %.y
5734+> (gte:rh .~~1.24e4 .~~1.24e4)
5735+%.y
57435736
5744− > (gte:rh .~~2.24e4 .~~1.24e4)
5745− %.y
5737+> (gte:rh .~~2.24e4 .~~1.24e4)
5738+%.y
57465739
5747− > (gte:rh .~~1.24e4 .~~2.24e4)
5748− %.n
5740+> (gte:rh .~~1.24e4 .~~2.24e4)
5741+%.n
57495742```
57505743
57515744---
@@ -5767,23 +5760,23 @@ A `@rh`.
57675760#### Source
57685761
57695762```hoon
5770− ++ gth ~/ %gth
5771− |= [a=@rh b=@rh]
5772− ~_ leaf+"rh-fail"
5773− (gth:ma a b)
5763+++ gth ~/ %gth
5764+ |= [a=@rh b=@rh]
5765+ ~_ leaf+"rh-fail"
5766+ (gth:ma a b)
57745767```
57755768
57765769#### Examples
57775770
57785771```
5779− > (gth:rh .~~1.24e4 .~~1.244e4)
5780− %.n
5772+> (gth:rh .~~1.24e4 .~~1.244e4)
5773+%.n
57815774
5782− > (gth:rh .~~2.24e4 .~~1.24e4)
5783− %.y
5775+> (gth:rh .~~2.24e4 .~~1.24e4)
5776+%.y
57845777
5785− > (gth:rh .~~1.24e4 .~~2.24e4)
5786− %.n
5778+> (gth:rh .~~1.24e4 .~~2.24e4)
5779+%.n
57875780```
57885781
57895782---
@@ -5805,14 +5798,15 @@ A `@rs`, a single-precision float.
58055798#### Source
58065799
58075800```hoon
5808− ++ tos |= {a/@rh} (bit:rs (sea a))
5801+++ tos
5802+ |= [a=@rh] (bit:rs (sea a))
58095803```
58105804
58115805#### Examples
58125806
58135807```
5814− > (tos:rh .~~2.5e2)
5815− .2.5e2
5808+> (tos:rh .~~2.5e2)
5809+.2.5e2
58165810```
58175811
58185812---
@@ -5834,14 +5828,15 @@ A `@rh`, a half-precision float.
58345828#### Source
58355829
58365830```hoon
5837− ++ fos |= {a/@rs} (bit (sea:rs a))
5831+++ fos
5832+ |= [a=@rs] (bit (sea:rs a))
58385833```
58395834
58405835#### Examples
58415836
58425837```
5843− > (fos:rh .2.5e2)
5844− .~~2.5e2
5838+> (fos:rh .2.5e2)
5839+.~~2.5e2
58455840```
58465841
58475842---
@@ -5863,14 +5858,14 @@ A `@rh`, a half-precision float.
58635858#### Source
58645859
58655860```hoon
5866− ++ sun |= [a=@u] ^- @rh (sun:ma a)
5861+++ sun |= [a=@u] ^- @rh (sun:ma a)
58675862```
58685863
58695864#### Examples
58705865
58715866```
5872− > (sun:rh 205)
5873− .~~2.05e2
5867+> (sun:rh 205)
5868+.~~2.05e2
58745869```
58755870
58765871---
@@ -5892,14 +5887,14 @@ A `@rh`, a half-precision float.
58925887#### Source
58935888
58945889```hoon
5895− ++ san |= [a=@s] ^- @rh (san:ma a)
5890+++ san |= [a=@s] ^- @rh (san:ma a)
58965891```
58975892
58985893#### Examples
58995894
59005895```
5901− > (san:rh -205)
5902− .~~-2.05e2
5896+> (san:rh -205)
5897+.~~-2.05e2
59035898```
59045899
59055900---
@@ -5921,14 +5916,14 @@ A `flag`.
59215916#### Source
59225917
59235918```hoon
5924− ++ sig |= [a=@rh] ^- ? (sig:ma a)
5919+++ sig |= [a=@rh] ^- ? (sig:ma a)
59255920```
59265921
59275922#### Examples
59285923
59295924```
5930− > (sig:rh .~~-2.05e2)
5931− %.n
5925+> (sig:rh .~~-2.05e2)
5926+%.n
59325927```
59335928
59345929---
@@ -5950,14 +5945,14 @@ A `@s`, a signed integer.
59505945#### Source
59515946
59525947```hoon
5953− ++ exp |= [a=@rh] ^- @s (exp:ma a)
5948+++ exp |= [a=@rh] ^- @s (exp:ma a)
59545949```
59555950
59565951#### Examples
59575952
59585953```
5959− > (exp:rh .~~-2.05e2)
5960− --7
5954+> (exp:rh .~~-2.05e2)
5955+--7
59615956```
59625957
59635958---
@@ -5979,17 +5974,17 @@ A `unit` of `@s`.
59795974#### Source
59805975
59815976```hoon
5982− ++ toi |= [a=@rh] ^- (unit @s) (toi:ma a)
5977+++ toi |= [a=@rh] ^- (unit @s) (toi:ma a)
59835978```
59845979
59855980#### Examples
59865981
59875982```
5988− > (toi:rh .~~-2.085e2)
5989− [~ u=-208]
5983+> (toi:rh .~~-2.085e2)
5984+[~ u=-208]
59905985
5991− > (toi:rh .~~-2.08e2)
5992− [~ u=-208]
5986+> (toi:rh .~~-2.08e2)
5987+[~ u=-208]
59935988```
59945989
59955990---
@@ -6012,17 +6007,17 @@ A `dn`.
60126007#### Source
60136008
60146009```hoon
6015− ++ drg |= [a=@rh] ^- dn (drg:ma a)
6010+++ drg |= [a=@rh] ^- dn (drg:ma a)
60166011```
60176012
60186013#### Examples
60196014
60206015```
6021− > (drg:rh .~~-2.085e2)
6022− [%d s=%.n e=-1 a=2.085]
6016+> (drg:rh .~~-2.085e2)
6017+[%d s=%.n e=-1 a=2.085]
60236018
6024− > (drg:rh .~~-2.08e2)
6025− [%d s=%.n e=--0 a=208]
6019+> (drg:rh .~~-2.08e2)
6020+[%d s=%.n e=--0 a=208]
60266021```
60276022
60286023---
@@ -6046,15 +6041,14 @@ A `@rh`, a a half-precision float.
60466041#### Source
60476042
60486043```hoon
6049− ++ grd |= [a=dn] ^- @rh (grd:ma a)
6050− --
6044+++ grd |= [a=dn] ^- @rh (grd:ma a)
60516045```
60526046
60536047#### Examples
60546048
60556049```
6056− > (grd:rh [%d s=%.n e=--0 a=343])
6057− .~~-3.43e2
6050+> (grd:rh [%d s=%.n e=--0 a=343])
6051+.~~-3.43e2
60586052```
60596053
60606054---
content/docs/hoon/reference/stdlib/3c.md+241−242
@@ -4,353 +4,352 @@ weight = 23
44template = "doc.html"
55+++
66
7−## `++yall`
7+## `++year`
88
9−Time since beginning of time
9+Date to `@da`
1010
11−Produce the date tuple of `[y=@ud m=@ud d=@ud]` of the year, month, and
12−day from a number of days from the beginning of the Gregorian calendar.
11+Accept a parsed date of form `[[a=? y=@ud] m=@ud t=tarp]` and produce
12+its `@da` representation.
1313
1414#### Accepts
1515
16−`day` is a an unsigned decimal.
16+`det` is a `date`
1717
1818#### Produces
1919
20−A cell of unsigned decimals.
20+A `@da`.
2121
2222#### Source
2323
2424```hoon
25− ++ yall
26− |= day=@ud
27− ^- [y=@ud m=@ud d=@ud]
28− =+ [era=0 cet=0 lep=*?]
29− => .(era (div day era:yo), day (mod day era:yo))
30− => ^+ .
31− ?: (lth day +(cet:yo))
32− .(lep &, cet 0)
33− => .(lep |, cet 1, day (sub day +(cet:yo)))
34− .(cet (add cet (div day cet:yo)), day (mod day cet:yo))
35− =+ yer=(add (mul 400 era) (mul 100 cet))
36− |- ^- [y=@ud m=@ud d=@ud]
37− =+ dis=?:(lep 366 365)
38− ?. (lth day dis)
39− =+ ner=+(yer)
40− $(yer ner, day (sub day dis), lep =(0 (end 0 2 ner)))
41− |- ^- [y=@ud m=@ud d=@ud]
42− =+ [mot=0 cah=?:(lep moy:yo moh:yo)]
43− |- ^- [y=@ud m=@ud d=@ud]
44− =+ zis=(snag mot cah)
45− ?: (lth day zis)
46− [yer +(mot) +(day)]
47− $(mot +(mot), day (sub day zis))
25+++ year
26+ |= det=date
27+ ^- @da
28+ =+ ^= yer
29+ ?: a.det
30+ (add 292.277.024.400 y.det)
31+ (sub 292.277.024.400 (dec y.det))
32+ =+ day=(yawn yer m.det d.t.det)
33+ (yule day h.t.det m.t.det s.t.det f.t.det)
4834```
4935
5036#### Examples
5137
5238```
53− > (yall 198)
54− [y=0 m=7 d=17]
55−
56− > (yall 90.398)
57− [y=247 m=7 d=3]
58−
59− > (yall 0)
60− [y=0 m=1 d=1]
39+> (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
40+~2014.8.4..20.04.57..d940
6141```
6242
6343---
6444
65−## `++yawn`
45+## `++yore`
6646
67−Days since beginning of time
47+Date from atomic date
6848
69−Inverse of `yall`, computes number of days A.D. from y/m/d date as the
70−tuple `[yer=@ud mot=@ud day=@ud]`.
49+Produces a `date` from a `@da`.
7150
7251#### Accepts
7352
74−`yer` is an unsigned decimal.
75−
76−`mon` is an unsigned decimal.
77−
78−`day` is an unsigned decimal.
53+`now` is a time atom, `@da`.
7954
8055#### Produces
8156
82−An unsigned decimal.
57+A `date`.
8358
8459#### Source
8560
8661```hoon
87− ++ yawn
88− |= [yer=@ud mot=@ud day=@ud]
89− ^- @ud
90− => .(mot (dec mot), day (dec day))
91− => ^+ .
92− %= .
93− day
94− =+ cah=?:((yelp yer) moy:yo moh:yo)
95− |- ^- @ud
96− ?: =(0 mot)
97− day
98− $(mot (dec mot), cah (slag 1 cah), day (add day (snag 0 cah)))
99− ==
100− |- ^- @ud
101− ?. =(0 (mod yer 4))
102− =+ ney=(dec yer)
103− $(yer ney, day (add day ?:((yelp ney) 366 365)))
104− ?. =(0 (mod yer 100))
105− =+ nef=(sub yer 4)
106− $(yer nef, day (add day ?:((yelp nef) 1.461 1.460)))
107− ?. =(0 (mod yer 400))
108− =+ nec=(sub yer 100)
109− $(yer nec, day (add day ?:((yelp nec) 36.525 36.524)))
110− (add day (mul (div yer 400) (add 1 (mul 4 36.524))))
62+++ yore
63+ |= now=@da
64+ ^- date
65+ =+ rip=(yell now)
66+ =+ ger=(yall d.rip)
67+ :- ?: (gth y.ger 292.277.024.400)
68+ [a=& y=(sub y.ger 292.277.024.400)]
69+ [a=| y=+((sub 292.277.024.400 y.ger))]
70+ [m.ger d.ger h.rip m.rip s.rip f.rip]
11171```
11272
11373#### Examples
11474
11575```
116− > (yawn 2.018 7 4)
117− 737.244
118−
119− > (yawn 1.776 7 4)
120− 648.856
121−
122− > (yawn 1.990 10 11)
123− 727.116
76+> (yore ~2014.6.6..21.09.15..0a16)
77+[[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
12478```
12579
12680---
12781
128−## `++year`
82+## `++yell`
12983
130−Date to @d
84+Tarp from atomic date
13185
132−Accept a parsed date of form `[[a=? y=@ud] m=@ud t=tarp]` and produce
133−its `@d` representation.
86+Produce a [`$tarp`](/docs/hoon/reference/stdlib/2q#tarp) time format from a`@da`.
13487
13588#### Accepts
13689
137−`det` is a `date`
90+`now` is a `@da`.
13891
13992#### Produces
14093
141−A `@d`.
94+A `tarp`.
14295
14396#### Source
14497
14598```hoon
146− ++ year
147− |= det=date
148− ^- @da
149− =+ ^= yer
150− ?: a.det
151− (add 292.277.024.400 y.det)
152− (sub 292.277.024.400 (dec y.det))
153− =+ day=(yawn yer m.det d.t.det)
154− (yule day h.t.det m.t.det s.t.det f.t.det)
99+++ yell
100+ |= now=@d
101+ ^- tarp
102+ =+ sec=(rsh 6 now)
103+ =+ ^= fan
104+ =+ [muc=4 raw=(end 6 now)]
105+ |- ^- (list @ux)
106+ ?: |(=(0 raw) =(0 muc))
107+ ~
108+ => .(muc (dec muc))
109+ [(cut 4 [muc 1] raw) $(raw (end [4 muc] raw))]
110+ =+ day=(div sec day:yo)
111+ => .(sec (mod sec day:yo))
112+ =+ hor=(div sec hor:yo)
113+ => .(sec (mod sec hor:yo))
114+ =+ mit=(div sec mit:yo)
115+ => .(sec (mod sec mit:yo))
116+ [day hor mit sec fan]
155117```
156118
157119#### Examples
158120
159121```
160− > (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
161− 0x8000000d227df4e9d940000000000000
122+> (yell ~2014.3.20..05.42.53..7456)
123+[d=106.751.991.820.094 h=5 m=42 s=53 f=~[0x7456]]
124+
125+> (yell ~2014.6.9..19.09.40..8b66)
126+[d=106.751.991.820.175 h=19 m=9 s=40 f=~[0x8b66]]
127+
128+> (yell ~1776.7.4)
129+[d=106.751.991.733.273 h=0 m=0 s=0 f=~]
162130```
163131
164132---
165133
166−## `++yell`
134+## `++yule`
167135
168−Tarp from atomic date
136+Daily time to time atom
169137
170−Produce a parsed daily time format from, `@d`, an atomic date.
138+Accepts a [`$tarp`](/docs/hoon/reference/stdlib/2q#tarp), a parsed daily time,
139+and produces a `@da`.
171140
172141#### Accepts
173142
174−`now` is a `@d`.
143+`rip` is a `tarp`.
175144
176145#### Produces
177146
178−A `tarp`.
147+A time atom, `@da`.
179148
180149#### Source
181150
182151```hoon
183− ++ yell
184− |= now=@d
185− ^- tarp
186− =+ sec=(rsh 6 1 now)
187− =+ ^= fan
188− =+ [muc=4 raw=(end 6 1 now)]
189− |- ^- (list @ux)
190− ?: |(=(0 raw) =(0 muc))
191− ~
192− => .(muc (dec muc))
193− [(cut 4 [muc 1] raw) $(raw (end 4 muc raw))]
194− =+ day=(div sec day:yo)
195− => .(sec (mod sec day:yo))
196− =+ hor=(div sec hor:yo)
197− => .(sec (mod sec hor:yo))
198− =+ mit=(div sec mit:yo)
199− => .(sec (mod sec mit:yo))
200− [day hor mit sec fan]
152+++ yule
153+ |= rip=tarp
154+ ^- @d
155+ =+ ^= sec ;: add
156+ (mul d.rip day:yo)
157+ (mul h.rip hor:yo)
158+ (mul m.rip mit:yo)
159+ s.rip
160+ ==
161+ =+ ^= fac =+ muc=4
162+ |- ^- @
163+ ?~ f.rip
164+ 0
165+ => .(muc (dec muc))
166+ (add (lsh [4 muc] i.f.rip) $(f.rip t.f.rip))
167+ (con (lsh 6 sec) fac)
201168```
202169
203170#### Examples
204171
205172```
206− > (yell ~2014.3.20..05.42.53..7456)
207− [d=106.751.991.820.094 h=5 m=42 s=53 f=~[0x7456]]
173+> =murica (yell ~1776.7.4)
174+
175+> murica
176+[d=106.751.991.733.273 h=0 m=0 s=0 f=~]
177+
178+> (yule murica)
179+0x8000000b62aaf5800000000000000000
180+
181+> `@da`(yule murica)
182+~1776.7.4
183+
184+> `@da`(yule (yell ~2014.3.20..05.42.53..7456))
185+~2014.3.20..05.42.53..7456
208186
209− > (yell ~2014.6.9..19.09.40..8b66)
210− [d=106.751.991.820.175 h=19 m=9 s=40 f=~[0x8b66]]
187+> `tarp`[31 12 30 0 ~]
188+[d=31 h=12 m=30 s=0 f=~]
211189
212− > (yell ~1776.7.4)
213− [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
190+> `@dr`(yule `tarp`[31 12 30 0 ~])
191+~d31.h12.m30
214192```
215193
216194---
217195
218−## `++yelp`
196+## `++yall`
219197
220−Leap-week?
198+Time since beginning of time
221199
222−Determines whether a year contains an ISO 8601 leap-week. Produces a flag.
200+Produce the date tuple of `[y=@ud m=@ud d=@ud]` of the year, month, and
201+day from a number of days from the beginning of the Gregorian calendar.
223202
224203#### Accepts
225204
226−`yer` is an unsigned decimal.
205+`day` is a `@ud`.
227206
228207#### Produces
229208
230−A flag.
209+A cell of unsigned decimals.
231210
232211#### Source
233212
234213```hoon
235− ++ yelp
236− |= yer=@ud ^- ?
237− &(=(0 (mod yer 4)) |(!=(0 (mod yer 100)) =(0 (mod yer 400))))
214+++ yall
215+ |= day=@ud
216+ ^- [y=@ud m=@ud d=@ud]
217+ =+ [era=0 cet=0 lep=*?]
218+ => .(era (div day era:yo), day (mod day era:yo))
219+ => ^+ .
220+ ?: (lth day +(cet:yo))
221+ .(lep &, cet 0)
222+ => .(lep |, cet 1, day (sub day +(cet:yo)))
223+ .(cet (add cet (div day cet:yo)), day (mod day cet:yo))
224+ =+ yer=(add (mul 400 era) (mul 100 cet))
225+ |- ^- [y=@ud m=@ud d=@ud]
226+ =+ dis=?:(lep 366 365)
227+ ?. (lth day dis)
228+ =+ ner=+(yer)
229+ $(yer ner, day (sub day dis), lep =(0 (end [0 2] ner)))
230+ |- ^- [y=@ud m=@ud d=@ud]
231+ =+ [mot=0 cah=?:(lep moy:yo moh:yo)]
232+ |- ^- [y=@ud m=@ud d=@ud]
233+ =+ zis=(snag mot cah)
234+ ?: (lth day zis)
235+ [yer +(mot) +(day)]
236+ $(mot +(mot), day (sub day zis))
238237```
239238
240239#### Examples
241240
242241```
243− > (yelp 2.014)
244− %.n
242+> (yall 198)
243+[y=0 m=7 d=17]
245244
246− > (yelp 2.008)
247− %.y
245+> (yall 90.398)
246+[y=247 m=7 d=3]
248247
249− > (yelp 0)
250− %.y
251−
252− > (yelp 14.011)
253− %.n
248+> (yall 0)
249+[y=0 m=1 d=1]
254250```
255251
256252---
257253
258−## `++yore`
254+## `++yawn`
259255
260−Date from atomic date
256+Days since beginning of time
261257
262−Produces a `date` from a `@d`.
258+Inverse of `yall`, computes number of days A.D. from y/m/d date as the
259+tuple `[yer=@ud mot=@ud day=@ud]`.
263260
264261#### Accepts
265262
266−`now` is a time atom, `@d`.
263+`yer` is an unsigned decimal.
264+
265+`mon` is an unsigned decimal.
266+
267+`day` is an unsigned decimal.
267268
268269#### Produces
269270
270−A `date`.
271+An unsigned decimal.
271272
272273#### Source
273274
274275```hoon
275− ++ yore
276− |= now=@da
277− ^- date
278− =+ rip=(yell now)
279− =+ ger=(yall d.rip)
280− :- ?: (gth y.ger 292.277.024.400)
281− [a=& y=(sub y.ger 292.277.024.400)]
282− [a=| y=+((sub 292.277.024.400 y.ger))]
283− [m.ger d.ger h.rip m.rip s.rip f.rip]
276+++ yawn
277+ |= [yer=@ud mot=@ud day=@ud]
278+ ^- @ud
279+ => .(mot (dec mot), day (dec day))
280+ => ^+ .
281+ %= .
282+ day
283+ =+ cah=?:((yelp yer) moy:yo moh:yo)
284+ |- ^- @ud
285+ ?: =(0 mot)
286+ day
287+ $(mot (dec mot), cah (slag 1 cah), day (add day (snag 0 cah)))
288+ ==
289+ |- ^- @ud
290+ ?. =(0 (mod yer 4))
291+ =+ ney=(dec yer)
292+ $(yer ney, day (add day ?:((yelp ney) 366 365)))
293+ ?. =(0 (mod yer 100))
294+ =+ nef=(sub yer 4)
295+ $(yer nef, day (add day ?:((yelp nef) 1.461 1.460)))
296+ ?. =(0 (mod yer 400))
297+ =+ nec=(sub yer 100)
298+ $(yer nec, day (add day ?:((yelp nec) 36.525 36.524)))
299+ (add day (mul (div yer 400) (add 1 (mul 4 36.524))))
284300```
285301
286302#### Examples
287303
288304```
289− > (yore ~2014.6.6..21.09.15..0a16)
290− [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
305+> (yawn 2.018 7 4)
306+737.244
307+
308+> (yawn 1.776 7 4)
309+648.856
310+
311+> (yawn 1.990 10 11)
312+727.116
291313```
292314
293315---
294316
295−## `++yule`
317+## `++yelp`
296318
297−Daily time to time atom
319+Leap year?
298320
299−Accepts a `tarp`, a parsed daily time, and produces a time atom,
300−`@d`.
321+Determines whether a year is a leap year. Produces a flag.
301322
302323#### Accepts
303324
304−`rip` is a `tarp`.
325+`yer` is an unsigned decimal.
305326
306327#### Produces
307328
308−A time atom, `@d`.
329+A flag.
309330
310331#### Source
311332
312333```hoon
313− ++ yule :: time atom
314− |= rip=tarp
315− ^- @d
316− =+ ^= sec ;: add
317− (mul d.rip day:yo)
318− (mul h.rip hor:yo)
319− (mul m.rip mit:yo)
320− s.rip
321− ==
322− =+ ^= fac =+ muc=4
323− |- ^- @
324− ?~ f.rip
325− 0
326− => .(muc (dec muc))
327− (add (lsh 4 muc i.f.rip) $(f.rip t.f.rip))
328− (con (lsh 6 1 sec) fac)
329− ::
334+++ yelp
335+ |= yer=@ud ^- ?
336+ &(=(0 (mod yer 4)) |(!=(0 (mod yer 100)) =(0 (mod yer 400))))
330337```
331338
332339#### Examples
333340
334341```
335− > =murica (yell ~1776.7.4)
336−
337− > murica
338− [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
339−
340− > (yule murica)
341− 0x8000000b62aaf5800000000000000000
342−
343− > `@da`(yule murica)
344− ~1776.7.4
342+> (yelp 2.014)
343+%.n
345344
346− > `@da`(yule (yell ~2014.3.20..05.42.53..7456))
347− ~2014.3.20..05.42.53..7456
345+> (yelp 2.008)
346+%.y
348347
349− > `tarp`[31 12 30 0 ~]
350− [d=31 h=12 m=30 s=0 f=~]
348+> (yelp 0)
349+%.y
351350
352− > `@dr`(yule `tarp`[31 12 30 0 ~])
353− ~d31.h12.m30
351+> (yelp 14.011)
352+%.n
354353```
355354
356355---
@@ -364,7 +363,7 @@ Core whose arms contain constants for interacting with earth time.
364363#### Source
365364
366365```hoon
367− ++ yo
366+++ yo
368367```
369368
370369---
@@ -384,20 +383,20 @@ An atom.
384383#### Source
385384
386385```hoon
387− |% ++ cet 36.524
386+++ cet 36.524
388387```
389388
390389#### Examples
391390
392391```
393− > cet:yo
394− 36.524
392+> cet:yo
393+36.524
395394
396− > (add 365 cet:yo)
397− 36.889
395+> (add 365 cet:yo)
396+36.889
398397
399− > (sub (add 24 (mul 100 365)) cet:yo)
400− 0
398+> (sub (add 24 (mul 100 365)) cet:yo)
399+0
401400```
402401
403402---
@@ -415,17 +414,17 @@ An atom.
415414#### Source
416415
417416```hoon
418− ++ day 86.400
417+++ day 86.400
419418```
420419
421420#### Examples
422421
423422```
424− > day:yo
425− 86.400
423+> day:yo
424+86.400
426425
427− > (add 60 day:yo)
428− 86.460
426+> (add 60 day:yo)
427+86.460
429428```
430429
431430---
@@ -445,17 +444,17 @@ An atom.
445444#### Source
446445
447446```hoon
448− ++ era 146.097
447+++ era 146.097
449448```
450449
451450#### Examples
452451
453452```
454− > era:yo
455− 146.097
453+> era:yo
454+146.097
456455
457− > (sub era:yo (mul 4 cet:yo))
458− 1
456+> (sub era:yo (mul 4 cet:yo))
457+1
459458```
460459
461460#### Discussion
@@ -482,17 +481,17 @@ An atom.
482481#### Source
483482
484483```hoon
485− ++ hor 3.600
484+++ hor 3.600
486485```
487486
488487#### Examples
489488
490489```
491− > hor:yo
492− 3.600
490+> hor:yo
491+3.600
493492
494− > (div hor:yo 60)
495− 60
493+> (div hor:yo 60)
494+60
496495```
497496
498497---
@@ -511,14 +510,14 @@ An atom.
511510#### Source
512511
513512```hoon
514− ++ jes 106.751.991.084.417
513+++ jes 106.751.991.084.417
515514```
516515
517516#### Examples
518517
519518```
520− > jes:yo
521− 106.751.991.084.417
519+> jes:yo
520+106.751.991.084.417
522521```
523522
524523#### Discussion
@@ -540,14 +539,14 @@ An atom.
540539#### Source
541540
542541```hoon
543− ++ mit 60
542+++ mit 60
544543```
545544
546545#### Examples
547546
548547```
549− > mit:yo
550− 60
548+> mit:yo
549+60
551550```
552551
553552---
@@ -567,17 +566,17 @@ A `list` of `@ud`
567566#### Source
568567
569568```hoon
570− ++ moh `(list @ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
569+++ moh `(list @ud)`[31 28 31 30 31 30 31 31 30 31 30 31 ~]
571570```
572571
573572#### Examples
574573
575574```
576− > moh:yo
577− ~[31 28 31 30 31 30 31 31 30 31 30 31]
575+> moh:yo
576+~[31 28 31 30 31 30 31 31 30 31 30 31]
578577
579− > (snag 4 moh:yo)
580− 31
578+> (snag 4 moh:yo)
579+31
581580```
582581
583582---
@@ -597,17 +596,17 @@ A `list` of `@ud`.
597596#### Source
598597
599598```hoon
600− ++ moy `(list @ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
599+++ moy `(list @ud)`[31 29 31 30 31 30 31 31 30 31 30 31 ~]
601600```
602601
603602#### Examples
604603
605604```
606− > moy:yo
607− ~[31 29 31 30 31 30 31 31 30 31 30 31]
605+> moy:yo
606+~[31 29 31 30 31 30 31 31 30 31 30 31]
608607
609− > (snag 1 moy:yo)
610− 29
608+> (snag 1 moy:yo)
609+29
611610```
612611
613612---
@@ -626,14 +625,14 @@ An atom.
626625#### Source
627626
628627```hoon
629− ++ qad 126.144.001
628+++ qad 126.144.001
630629```
631630
632631#### Examples
633632
634633```
635− > qad:yo
636− 126.144.001
634+> qad:yo
635+126.144.001
637636```
638637
639638---
@@ -652,14 +651,14 @@ An atom.
652651#### Source
653652
654653```hoon
655− ++ yer 31.536.000
654+++ yer 31.536.000
656655```
657656
658657#### Examples
659658
660659```
661− > yer:yo
662− 31.536.000
660+> yer:yo
661+31.536.000
663662```
664663
665664---
content/docs/hoon/reference/stdlib/3d.md+437−452
@@ -22,15 +22,14 @@ An atom.
2222#### Source
2323
2424```hoon
25− ++ shad |=(ruz=@ (shax (shax ruz)))
25+++ shad |=(ruz=@ (shax (shax ruz)))
2626```
2727
2828#### Examples
2929
3030```
31− > (shad 11)
32− \/20.519.637.820.582.103.109.435.907.615.585.653.479.776.629.591.855.451.248.\/
33− 718.295.626.625.655.417.234
31+> `@uw`(shad 11)
32+0w2Rt.J1gzO.JjsQc.0Komy.DYUUO.27koh.QxwE0.Qgwt7.EPGCi
3433```
3534
3635---
@@ -39,8 +38,9 @@ An atom.
3938
4039Half SHA-256
4140
42−Produces a 128-bit atom by performing the [bitwise XOR](/docs/hoon/reference/stdlib/2d) on the
43−first and last halves of the 256-bit salted hash `shas`.
41+Produces a 128-bit atom by performing the [bitwise
42+XOR](/docs/hoon/reference/stdlib/2d) on the first and last halves of the 256-bit
43+salted hash `shas`.
4444
4545#### Accepts
4646
@@ -51,350 +51,238 @@ first and last halves of the 256-bit salted hash `shas`.
5151#### Source
5252
5353```hoon
54− ++ shaf :: half sha-256
55− |= [sal=@ ruz=@]
56− =+ haz=(shas sal ruz)
57− (mix (end 7 1 haz) (rsh 7 1 haz))
54+++ shaf
55+ |= [sal=@ ruz=@]
56+ =+ haz=(shas sal ruz)
57+ (mix (end 7 haz) (rsh 7 haz))
5858```
5959
6060#### Examples
6161
6262```
63− > (shaf 17 8)
64− 52.667.672.807.485.289.251.324.336.639.183.409.041
65−
66− > `@ub`(shaf 17 8)
67− \/0b1011.1111.1101.0110.1110.1000.0100.1110.1100.1000.0010.0100.1111.0001.0010.0010\/
68− .0100.1110.1110.0011.1100.1111.0001.1101.1101.1100.1110.1111.0100.0101.0001.0100
69− \/
63+> `@uw`(shaf 17 8)
64+0wD.DSP0L.WUuQg.-A765.4RY-h
7065```
7166
7267---
7368
74−## `++shal`
69+## `++sham`
7570
76−SHA-512 with length
71+128-bit noun hash
7772
78−Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
79−the byte-length of the theoretical buffer represented by the atom.
73+Produces a 128-bit atom by hashing a noun `yux` with the [`+shaf`](#shaf)
74+function. If that noun is a cell, then it is passed to the
75+[`jam`](/docs/hoon/reference/stdlib/2p#jam) function to produce an atom to be
76+hashed.
8077
8178#### Accepts
8279
83−`len` is an atom.
84−
85−`ruz` is an atom.
80+`yux` is a noun.
8681
8782#### Produces
8883
89−An atom.
84+A `@uvH`.
9085
9186#### Source
9287
9388```hoon
94− ++ shal
95− ~/ %shal
96− |= [len=@ ruz=@] ^- @
97− => .(ruz (cut 3 [0 len] ruz))
98− =+ [few==>(fe .(a 6)) wac=|=([a=@ b/@] (cut 6 [a 1] b))]
99− =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
100− =+ ral=(lsh 0 3 len)
101− =+ ^= ful
102− %+ can 0
103− :~ [ral ruz]
104− [8 128]
105− [(mod (sub 1.920 (mod (add 8 ral) 1.024)) 1.024) 0]
106− [128 (~(net fe 7) ral)]
107− ==
108− =+ lex=(met 10 ful)
109− =+ ^= kbx 0x6c44.198c.4a47.5817.5fcb.6fab.3ad6.faec.
110− 597f.299c.fc65.7e2a.4cc5.d4be.cb3e.42b6.
111− 431d.67c4.9c10.0d4c.3c9e.be0a.15c9.bebc.
112− 32ca.ab7b.40c7.2493.28db.77f5.2304.7d84.
113− 1b71.0b35.131c.471b.113f.9804.bef9.0dae.
114− 0a63.7dc5.a2c8.98a6.06f0.67aa.7217.6fba.
115− f57d.4f7f.ee6e.d178.eada.7dd6.cde0.eb1e.
116− d186.b8c7.21c0.c207.ca27.3ece.ea26.619c.
117− c671.78f2.e372.532b.bef9.a3f7.b2c6.7915.
118− a450.6ceb.de82.bde9.90be.fffa.2363.1e28.
119− 8cc7.0208.1a64.39ec.84c8.7814.a1f0.ab72.
120− 78a5.636f.4317.2f60.748f.82ee.5def.b2fc.
121− 682e.6ff3.d6b2.b8a3.5b9c.ca4f.7763.e373.
122− 4ed8.aa4a.e341.8acb.391c.0cb3.c5c9.5a63.
123− 34b0.bcb5.e19b.48a8.2748.774c.df8e.eb99.
124− 1e37.6c08.5141.ab53.19a4.c116.b8d2.d0c8.
125− 106a.a070.32bb.d1b8.f40e.3585.5771.202a.
126− d699.0624.5565.a910.d192.e819.d6ef.5218.
127− c76c.51a3.0654.be30.c24b.8b70.d0f8.9791.
128− a81a.664b.bc42.3001.a2bf.e8a1.4cf1.0364.
129− 9272.2c85.1482.353b.81c2.c92e.47ed.aee6.
130− 766a.0abb.3c77.b2a8.650a.7354.8baf.63de.
131− 5338.0d13.9d95.b3df.4d2c.6dfc.5ac4.2aed.
132− 2e1b.2138.5c26.c926.27b7.0a85.46d2.2ffc.
133− 1429.2967.0a0e.6e70.06ca.6351.e003.826f.
134− d5a7.9147.930a.a725.c6e0.0bf3.3da8.8fc2.
135− bf59.7fc7.beef.0ee4.b003.27c8.98fb.213f.
136− a831.c66d.2db4.3210.983e.5152.ee66.dfab.
137− 76f9.88da.8311.53b5.5cb0.a9dc.bd41.fbd4.
138− 4a74.84aa.6ea6.e483.2de9.2c6f.592b.0275.
139− 240c.a1cc.77ac.9c65.0fc1.9dc6.8b8c.d5b5.
140− efbe.4786.384f.25e3.e49b.69c1.9ef1.4ad2.
141− c19b.f174.cf69.2694.9bdc.06a7.25c7.1235.
142− 80de.b1fe.3b16.96b1.72be.5d74.f27b.896f.
143− 550c.7dc3.d5ff.b4e2.2431.85be.4ee4.b28c.
144− 1283.5b01.4570.6fbe.d807.aa98.a303.0242.
145− ab1c.5ed5.da6d.8118.923f.82a4.af19.4f9b.
146− 59f1.11f1.b605.d019.3956.c25b.f348.b538.
147− e9b5.dba5.8189.dbbc.b5c0.fbcf.ec4d.3b2f.
148− 7137.4491.23ef.65cd.428a.2f98.d728.ae22
149− =+ ^= hax 0x5be0.cd19.137e.2179.1f83.d9ab.fb41.bd6b.
150− 9b05.688c.2b3e.6c1f.510e.527f.ade6.82d1.
151− a54f.f53a.5f1d.36f1.3c6e.f372.fe94.f82b.
152− bb67.ae85.84ca.a73b.6a09.e667.f3bc.c908
153− =+ i=0
154− |- ^- @
155− ?: =(i lex)
156− (rep 6 (turn (rip 6 hax) net))
157− =+ ^= wox
158− =+ dux=(cut 10 [i 1] ful)
159− =+ wox=(rep 6 (turn (rip 6 dux) net))
160− =+ j=16
161− |- ^- @
162− ?: =(80 j)
163− wox
164− =+ :* l=(wac (sub j 15) wox)
165− m=(wac (sub j 2) wox)
166− n=(wac (sub j 16) wox)
167− o=(wac (sub j 7) wox)
168− ==
169− =+ x=:(mix (ror 0 1 l) (ror 0 8 l) (rsh 0 7 l))
170− =+ y=:(mix (ror 0 19 m) (ror 0 61 m) (rsh 0 6 m))
171− =+ z=:(sum n x o y)
172− $(wox (con (lsh 6 j z) wox), j +(j))
173− =+ j=0
174− =+ :* a=(wac 0 hax)
175− b=(wac 1 hax)
176− c=(wac 2 hax)
177− d=(wac 3 hax)
178− e=(wac 4 hax)
179− f=(wac 5 hax)
180− g=(wac 6 hax)
181− h=(wac 7 hax)
182− ==
183− |- ^- @
184− ?: =(80 j)
185− %= ^$
186− i +(i)
187− hax %+ rep 6
188− :~ (sum a (wac 0 hax))
189− (sum b (wac 1 hax))
190− (sum c (wac 2 hax))
191− (sum d (wac 3 hax))
192− (sum e (wac 4 hax))
193− (sum f (wac 5 hax))
194− (sum g (wac 6 hax))
195− (sum h (wac 7 hax))
196− ==
197− ==
198− =+ l=:(mix (ror 0 28 a) (ror 0 34 a) (ror 0 39 a)) :: S0
199− =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
200− =+ n=(sum l m) :: t2
201− =+ o=:(mix (ror 0 14 e) (ror 0 18 e) (ror 0 41 e)) :: S1
202− =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
203− =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
204− $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
89+++ sham
90+ |= yux=* ^- @uvH ^- @
91+ ?@ yux
92+ (shaf %mash yux)
93+ (shaf %sham (jam yux))
20594```
20695
20796#### Examples
20897
20998```
210− > (shal 1 'hello')
211− \/7.956.615.373.791.575.273.027.009.123.631.914.645.972.441.264.528.176.292.399.908\/
212− .424.469.676.078.106.561.839.264.176.650.109.335.825.608.088.511.266.620.100.157.
213− 847.055.280.028.606.252.747.432.021.213.474
214− \/
99+> (sham [2 4])
100+0v3.71s52.4bqnp.ki2b8.9hhsp.2ufgg
215101
216− > (shal 1 'hello')
217− \/7.956.615.373.791.575.273.027.009.123.631.914.645.972.441.264.528.176.292.399.908\/
218− .424.469.676.078.106.561.839.264.176.650.109.335.825.608.088.511.266.620.100.157.
219− 847.055.280.028.606.252.747.432.021.213.474
220− \/
102+> (sham "hello")
103+0v1.hg8mv.t7s3f.u4f8a.q5noe.dvqvh
221104```
222105
223−#### Discussion
224−
225−Because byte-strings can have leading zeros, but atoms cannot, we use `len`
226−as a way of saying that the atom `ruz` is shorter than its representative
227−byte-string.
228−
229106---
230107
231−## `++sham`
108+## `++shas`
232109
233−128-bit noun hash
110+Salted hash
234111
235−Produces a 128-bit atom by hashing a noun `yux` with the `shah` function. If
236−that noun is a cell, then it is passed to the [`jam`](/docs/hoon/reference/stdlib/2p) function to produce
237−an atom to be hashed.
112+Produces an atom by using SHA-256 plus a salt input. The [bitwise
113+XOR](/docs/hoon/reference/stdlib/2d) is performed on salt `sal` and the product
114+of atom `ruz` hashed with SHA-256. The product of that logical operation is then
115+itself hashed with SHA-256.
238116
239117#### Accepts
240118
241−`yux` is a noun.
242−
243−#### Produces
119+`sal` is an atom.
244120
245−An atom.
121+`ruz` is an atom.
246122
247123#### Source
248124
249125```hoon
250− ++ sham
251− |= yux=* ^- @uvH ^- @
252− ?@ yux
253− (shaf %mash yux)
254− (shaf %sham (jam yux))
255− ::
126+++ shas
127+ ~/ %shas
128+ |= [sal=@ ruz=@]
129+ (shax (mix sal (shax ruz)))
256130```
257131
258132#### Examples
259133
260134```
261− > (sham [2 4])
262− 0v3.71s52.4bqnp.ki2b8.9hhsp.2ufgg
263−
264− > (sham "hello")
265− 0v1.hg8mv.t7s3f.u4f8a.q5noe.dvqvh
135+> `@uw`(shas 1 1)
136+0w5hZ.Gim4L.9xKlU.jJJQr.2Bgi~.RHd5s.IwXuV.p43at.ZdsTY
266137```
267138
268139---
269140
270−## `++shan`
271−
272−SHA-1
273−
274−Produces an atom by hashing an atom `ruz` with SHA-1.
275−
276−#### Accepts
277−
278−`ruz` is an atom.
141+## `++shax`
279142
280−#### Produces
143+SHA-256
281144
282−An atom.
145+Produces an atom by hashing an atom `ruz` with SHA-256.
283146
284−#### Source
147+#### Sources
285148
286149```hoon
287− ++ shan
288− |= ruz=@
289− =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
290− =+ [sum=sum.few ror=ror.few rol=rol.few net=net.few inv=inv.few]
291− =+ ral=(lsh 0 3 (met 3 ruz))
292− =+ ^= ful
293− %+ can 0
294− :~ [ral ruz]
295− [8 128]
296− [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
297− [64 (~(net fe 6) ral)]
298− ==
299− =+ lex=(met 9 ful)
300− =+ kbx=0xca62.c1d6.8f1b.bcdc.6ed9.eba1.5a82.7999
301− =+ hax=0xc3d2.e1f0.1032.5476.98ba.dcfe.efcd.ab89.6745.2301
302− =+ i=0
303− |-
304− ?: =(i lex)
305− (rep 5 (flop (rip 5 hax)))
306− =+ ^= wox
307− =+ dux=(cut 9 [i 1] ful)
308− =+ wox=(rep 5 (turn (rip 5 dux) net))
309− =+ j=16
310− |- ^- @
311− ?: =(80 j)
312− wox
313− =+ :* l=(wac (sub j 3) wox)
314− m=(wac (sub j 8) wox)
315− n=(wac (sub j 14) wox)
316− o=(wac (sub j 16) wox)
317− ==
318− =+ z=(rol 0 1 :(mix l m n o))
319− $(wox (con (lsh 5 j z) wox), j +(j))
320− =+ j=0
321− =+ :* a=(wac 0 hax)
322− b=(wac 1 hax)
323− c=(wac 2 hax)
324− d=(wac 3 hax)
325− e=(wac 4 hax)
326− ==
327− |- ^- @
328− ?: =(80 j)
329− %= ^$
330− i +(i)
331− hax %+ rep 5
332− :~
333− (sum a (wac 0 hax))
334− (sum b (wac 1 hax))
335− (sum c (wac 2 hax))
336− (sum d (wac 3 hax))
337− (sum e (wac 4 hax))
338− ==
339− ==
340− =+ fx=(con (dis b c) (dis (not 5 1 b) d))
341− =+ fy=:(mix b c d)
342− =+ fz=:(con (dis b c) (dis b d) (dis c d))
343− =+ ^= tem
344− ?: &((gte j 0) (lte j 19))
345− :(sum (rol 0 5 a) fx e (wac 0 kbx) (wac j wox))
346− ?: &((gte j 20) (lte j 39))
347− :(sum (rol 0 5 a) fy e (wac 1 kbx) (wac j wox))
348− ?: &((gte j 40) (lte j 59))
349− :(sum (rol 0 5 a) fz e (wac 2 kbx) (wac j wox))
350− :(sum (rol 0 5 a) fy e (wac 3 kbx) (wac j wox))
351− $(j +(j), a tem, b a, c (rol 0 30 b), d c, e d)
150+++ shax
151+ ~/ %shax
152+ |= ruz=@ ^- @
153+ (shay [(met 3 ruz) ruz])
352154```
353155
354156#### Examples
355157
356158```
357− > (shan 'hello')
358− 975.987.071.262.755.080.377.722.350.727.279.193.143.145.743.181
159+> `@uw`(shax 'foo')
160+0waXD.pCa8n.EHVEb.-3p70.JgxcQ.gj0tf.4mr-o.~6~Sx.HJ2oI
359161```
360162
361−#### Discussion
362−
363−SHA-1 is a deprecated function; it is not considered secure.
364−
365163---
366164
367−## `++shas`
165+## `++shay`
368166
369−Salted hash
167+SHA-256 with length
370168
371−Produces an atom by using SHA-256 plus a salt input. The [bitwise XOR](/docs/hoon/reference/stdlib/2d)
372−is performed on `sal` and the product of `ruz` hashed with SHA-256. The product
373−of that logical operation is then itself hashed with SHA-256.
169+Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
170+the byte-length of the theoretical buffer represented by the atom.
374171
375172#### Accepts
376173
377−`sal` is an atom.
174+`len` is an atom.
378175
379176`ruz` is an atom.
380177
381178#### Source
382179
383180```hoon
384− ++ shas
385− |= [sal=@ ruz=@]
386− (shax (mix sal (shax ruz)))
181+++ shay
182+ ~/ %shay
183+ |= [len=@u ruz=@] ^- @
184+ => .(ruz (cut 3 [0 len] ruz))
185+ =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
186+ =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
187+ =+ ral=(lsh [0 3] len)
188+ =+ ^= ful
189+ %+ can 0
190+ :~ [ral ruz]
191+ [8 128]
192+ [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
193+ [64 (~(net fe 6) ral)]
194+ ==
195+ =+ lex=(met 9 ful)
196+ =+ ^= kbx 0xc671.78f2.bef9.a3f7.a450.6ceb.90be.fffa.
197+ 8cc7.0208.84c8.7814.78a5.636f.748f.82ee.
198+ 682e.6ff3.5b9c.ca4f.4ed8.aa4a.391c.0cb3.
199+ 34b0.bcb5.2748.774c.1e37.6c08.19a4.c116.
200+ 106a.a070.f40e.3585.d699.0624.d192.e819.
201+ c76c.51a3.c24b.8b70.a81a.664b.a2bf.e8a1.
202+ 9272.2c85.81c2.c92e.766a.0abb.650a.7354.
203+ 5338.0d13.4d2c.6dfc.2e1b.2138.27b7.0a85.
204+ 1429.2967.06ca.6351.d5a7.9147.c6e0.0bf3.
205+ bf59.7fc7.b003.27c8.a831.c66d.983e.5152.
206+ 76f9.88da.5cb0.a9dc.4a74.84aa.2de9.2c6f.
207+ 240c.a1cc.0fc1.9dc6.efbe.4786.e49b.69c1.
208+ c19b.f174.9bdc.06a7.80de.b1fe.72be.5d74.
209+ 550c.7dc3.2431.85be.1283.5b01.d807.aa98.
210+ ab1c.5ed5.923f.82a4.59f1.11f1.3956.c25b.
211+ e9b5.dba5.b5c0.fbcf.7137.4491.428a.2f98
212+ =+ ^= hax 0x5be0.cd19.1f83.d9ab.9b05.688c.510e.527f.
213+ a54f.f53a.3c6e.f372.bb67.ae85.6a09.e667
214+ =+ i=0
215+ |- ^- @
216+ ?: =(i lex)
217+ (run 5 hax net)
218+ =+ ^= wox
219+ =+ dux=(cut 9 [i 1] ful)
220+ =+ wox=(run 5 dux net)
221+ =+ j=16
222+ |- ^- @
223+ ?: =(64 j)
224+ wox
225+ =+ :* l=(wac (sub j 15) wox)
226+ m=(wac (sub j 2) wox)
227+ n=(wac (sub j 16) wox)
228+ o=(wac (sub j 7) wox)
229+ ==
230+ =+ x=:(mix (ror 0 7 l) (ror 0 18 l) (rsh [0 3] l))
231+ =+ y=:(mix (ror 0 17 m) (ror 0 19 m) (rsh [0 10] m))
232+ =+ z=:(sum n x o y)
233+ $(wox (con (lsh [5 j] z) wox), j +(j))
234+ =+ j=0
235+ =+ :* a=(wac 0 hax)
236+ b=(wac 1 hax)
237+ c=(wac 2 hax)
238+ d=(wac 3 hax)
239+ e=(wac 4 hax)
240+ f=(wac 5 hax)
241+ g=(wac 6 hax)
242+ h=(wac 7 hax)
243+ ==
244+ |- ^- @
245+ ?: =(64 j)
246+ %= ^$
247+ i +(i)
248+ hax %+ rep 5
249+ :~ (sum a (wac 0 hax))
250+ (sum b (wac 1 hax))
251+ (sum c (wac 2 hax))
252+ (sum d (wac 3 hax))
253+ (sum e (wac 4 hax))
254+ (sum f (wac 5 hax))
255+ (sum g (wac 6 hax))
256+ (sum h (wac 7 hax))
257+ ==
258+ ==
259+ =+ l=:(mix (ror 0 2 a) (ror 0 13 a) (ror 0 22 a)) :: s0
260+ =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
261+ =+ n=(sum l m) :: t2
262+ =+ o=:(mix (ror 0 6 e) (ror 0 11 e) (ror 0 25 e)) :: s1
263+ =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
264+ =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
265+ $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
387266```
388267
389268#### Examples
390269
391270```
392− > (shas 12.845 6)
393− \/111.115.941.493.032.291.043.932.789.632.248.509.108.945.255.494.251.860.287\/
394− .707.279.709.200.349.471.936
395− \/
271+> `@uw`(shay 1 'hello')
272+0w2eN.jupNe.OyGTU.-l0Co.SWSGS.fFD9k.HPHg1.-AYmg.CgaCG
396273```
397274
275+```
276+> `@uw`(shay 2 'hello')
277+0wdUu.vKccX.fhjYt.tY2a4.B~sqA.KWNOM.1TnEu.8sQd8.LvyYT
278+```
279+
280+#### Discussion
281+
282+Because byte-strings can have leading zeros, but atoms cannot, we use `len`
283+as a way of saying that the atom `ruz` is shorter than its representative
284+byte-string.
285+
398286---
399287
400288## `++shaw`
@@ -419,52 +307,57 @@ An atom.
419307#### Source
420308
421309```hoon
422− ++ shaw
423− |= [sal=@ len=@ ruz=@]
424− (~(raw og (shas sal (mix len ruz))) len)
310+++ shaw
311+ |= [sal=@ len=@ ruz=@]
312+ (~(raw og (shas sal (mix len ruz))) len)
425313```
426314
427315#### Examples
428316
429317```
430− > `@ub`(shaw 3 6 98)
431− 0b11.0111
318+> `@ub`(shaw 3 6 98)
319+0b11.0111
432320
433− > `@ub`(shaw 2 6 98)
434− 0b11
321+> `@ub`(shaw 2 6 98)
322+0b11
435323```
436324
437325---
438326
439−## `++shax`
327+## `++shaz`
440328
441−SHA-256
329+SHA-512
442330
443−Produces an atom by hashing an atom `ruz` with SHA-256.
331+Produces an atom by hashing an atom `ruz` with SHA-512.
444332
445−#### Sources
333+#### Accepts
334+
335+`ruz` is an atom.
336+
337+#### Produces
338+
339+An atom.
340+
341+#### Source
446342
447343```hoon
448− ++ shax
449− ~/ %shax
450− |= ruz=@ ^- @
451− (shay [(met 3 ruz) ruz])
344+++ shaz
345+ |= ruz=@ ^- @
346+ (shal [(met 3 ruz) ruz])
452347```
453348
454349#### Examples
455350
456351```
457− > (shax 'hello')
458− \/16.552.786.619.039.860.277.601.417.878.457.384.195.409.020.923.835.016.617.984.82\/
459− 0.774.431.701.725.740
460− \/
352+`@uw`(shaz 'hello')
353+0w1.3MdWY.sS~QT.zFsbB.N7oQo.cSImU.56Xcu.DMtMq.mrSsc.z8WsY.pNABZ.Z~ySG.Ecysb.XCP5P.fuHjq.Jimnn.zPoHQ.AQD6r
461354```
462355
463356---
464357
465−## `++shay`
358+## `++shal`
466359
467−SHA-256 with length
360+SHA-512 with length
468361
469362Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
470363the byte-length of the theoretical buffer represented by the atom.
@@ -475,108 +368,136 @@ the byte-length of the theoretical buffer represented by the atom.
475368
476369`ruz` is an atom.
477370
371+#### Produces
372+
373+An atom.
374+
478375#### Source
479376
480377```hoon
481− ++ shay
482− ~/ %shay
483− |= [len=@u ruz=@] ^- @
484− => .(ruz (cut 3 [0 len] ruz))
485− =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
486− =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
487− =+ ral=(lsh 0 3 len)
488− =+ ^= ful
489− %+ can 0
490− :~ [ral ruz]
491− [8 128]
492− [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
493− [64 (~(net fe 6) ral)]
494− ==
495− =+ lex=(met 9 ful)
496− =+ ^= kbx 0xc671.78f2.bef9.a3f7.a450.6ceb.90be.fffa.
497− 8cc7.0208.84c8.7814.78a5.636f.748f.82ee.
498− 682e.6ff3.5b9c.ca4f.4ed8.aa4a.391c.0cb3.
499− 34b0.bcb5.2748.774c.1e37.6c08.19a4.c116.
500− 106a.a070.f40e.3585.d699.0624.d192.e819.
501− c76c.51a3.c24b.8b70.a81a.664b.a2bf.e8a1.
502− 9272.2c85.81c2.c92e.766a.0abb.650a.7354.
503− 5338.0d13.4d2c.6dfc.2e1b.2138.27b7.0a85.
504− 1429.2967.06ca.6351.d5a7.9147.c6e0.0bf3.
505− bf59.7fc7.b003.27c8.a831.c66d.983e.5152.
506− 76f9.88da.5cb0.a9dc.4a74.84aa.2de9.2c6f.
507− 240c.a1cc.0fc1.9dc6.efbe.4786.e49b.69c1.
508− c19b.f174.9bdc.06a7.80de.b1fe.72be.5d74.
509− 550c.7dc3.2431.85be.1283.5b01.d807.aa98.
510− ab1c.5ed5.923f.82a4.59f1.11f1.3956.c25b.
511− e9b5.dba5.b5c0.fbcf.7137.4491.428a.2f98
512− =+ ^= hax 0x5be0.cd19.1f83.d9ab.9b05.688c.510e.527f.
513− a54f.f53a.3c6e.f372.bb67.ae85.6a09.e667
514− =+ i=0
378+++ shal
379+ ~/ %shal
380+ |= [len=@ ruz=@] ^- @
381+ => .(ruz (cut 3 [0 len] ruz))
382+ =+ [few==>(fe .(a 6)) wac=|=([a=@ b=@] (cut 6 [a 1] b))]
383+ =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
384+ =+ ral=(lsh [0 3] len)
385+ =+ ^= ful
386+ %+ can 0
387+ :~ [ral ruz]
388+ [8 128]
389+ [(mod (sub 1.920 (mod (add 8 ral) 1.024)) 1.024) 0]
390+ [128 (~(net fe 7) ral)]
391+ ==
392+ =+ lex=(met 10 ful)
393+ =+ ^= kbx 0x6c44.198c.4a47.5817.5fcb.6fab.3ad6.faec.
394+ 597f.299c.fc65.7e2a.4cc5.d4be.cb3e.42b6.
395+ 431d.67c4.9c10.0d4c.3c9e.be0a.15c9.bebc.
396+ 32ca.ab7b.40c7.2493.28db.77f5.2304.7d84.
397+ 1b71.0b35.131c.471b.113f.9804.bef9.0dae.
398+ 0a63.7dc5.a2c8.98a6.06f0.67aa.7217.6fba.
399+ f57d.4f7f.ee6e.d178.eada.7dd6.cde0.eb1e.
400+ d186.b8c7.21c0.c207.ca27.3ece.ea26.619c.
401+ c671.78f2.e372.532b.bef9.a3f7.b2c6.7915.
402+ a450.6ceb.de82.bde9.90be.fffa.2363.1e28.
403+ 8cc7.0208.1a64.39ec.84c8.7814.a1f0.ab72.
404+ 78a5.636f.4317.2f60.748f.82ee.5def.b2fc.
405+ 682e.6ff3.d6b2.b8a3.5b9c.ca4f.7763.e373.
406+ 4ed8.aa4a.e341.8acb.391c.0cb3.c5c9.5a63.
407+ 34b0.bcb5.e19b.48a8.2748.774c.df8e.eb99.
408+ 1e37.6c08.5141.ab53.19a4.c116.b8d2.d0c8.
409+ 106a.a070.32bb.d1b8.f40e.3585.5771.202a.
410+ d699.0624.5565.a910.d192.e819.d6ef.5218.
411+ c76c.51a3.0654.be30.c24b.8b70.d0f8.9791.
412+ a81a.664b.bc42.3001.a2bf.e8a1.4cf1.0364.
413+ 9272.2c85.1482.353b.81c2.c92e.47ed.aee6.
414+ 766a.0abb.3c77.b2a8.650a.7354.8baf.63de.
415+ 5338.0d13.9d95.b3df.4d2c.6dfc.5ac4.2aed.
416+ 2e1b.2138.5c26.c926.27b7.0a85.46d2.2ffc.
417+ 1429.2967.0a0e.6e70.06ca.6351.e003.826f.
418+ d5a7.9147.930a.a725.c6e0.0bf3.3da8.8fc2.
419+ bf59.7fc7.beef.0ee4.b003.27c8.98fb.213f.
420+ a831.c66d.2db4.3210.983e.5152.ee66.dfab.
421+ 76f9.88da.8311.53b5.5cb0.a9dc.bd41.fbd4.
422+ 4a74.84aa.6ea6.e483.2de9.2c6f.592b.0275.
423+ 240c.a1cc.77ac.9c65.0fc1.9dc6.8b8c.d5b5.
424+ efbe.4786.384f.25e3.e49b.69c1.9ef1.4ad2.
425+ c19b.f174.cf69.2694.9bdc.06a7.25c7.1235.
426+ 80de.b1fe.3b16.96b1.72be.5d74.f27b.896f.
427+ 550c.7dc3.d5ff.b4e2.2431.85be.4ee4.b28c.
428+ 1283.5b01.4570.6fbe.d807.aa98.a303.0242.
429+ ab1c.5ed5.da6d.8118.923f.82a4.af19.4f9b.
430+ 59f1.11f1.b605.d019.3956.c25b.f348.b538.
431+ e9b5.dba5.8189.dbbc.b5c0.fbcf.ec4d.3b2f.
432+ 7137.4491.23ef.65cd.428a.2f98.d728.ae22
433+ =+ ^= hax 0x5be0.cd19.137e.2179.1f83.d9ab.fb41.bd6b.
434+ 9b05.688c.2b3e.6c1f.510e.527f.ade6.82d1.
435+ a54f.f53a.5f1d.36f1.3c6e.f372.fe94.f82b.
436+ bb67.ae85.84ca.a73b.6a09.e667.f3bc.c908
437+ =+ i=0
438+ |- ^- @
439+ ?: =(i lex)
440+ (run 6 hax net)
441+ =+ ^= wox
442+ =+ dux=(cut 10 [i 1] ful)
443+ =+ wox=(run 6 dux net)
444+ =+ j=16
515445 |- ^- @
516− ?: =(i lex)
517− (rep 5 (turn (rip 5 hax) net))
518− =+ ^= wox
519− =+ dux=(cut 9 [i 1] ful)
520− =+ wox=(rep 5 (turn (rip 5 dux) net))
521− =+ j=16
522− |- ^- @
523− ?: =(64 j)
524− wox
525− =+ :* l=(wac (sub j 15) wox)
526− m=(wac (sub j 2) wox)
527− n=(wac (sub j 16) wox)
528− o=(wac (sub j 7) wox)
529− ==
530− =+ x=:(mix (ror 0 7 l) (ror 0 18 l) (rsh 0 3 l))
531− =+ y=:(mix (ror 0 17 m) (ror 0 19 m) (rsh 0 10 m))
532− =+ z=:(sum n x o y)
533− $(wox (con (lsh 5 j z) wox), j +(j))
534− =+ j=0
535− =+ :* a=(wac 0 hax)
536− b=(wac 1 hax)
537− c=(wac 2 hax)
538− d=(wac 3 hax)
539− e=(wac 4 hax)
540− f=(wac 5 hax)
541− g=(wac 6 hax)
542− h=(wac 7 hax)
446+ ?: =(80 j)
447+ wox
448+ =+ :* l=(wac (sub j 15) wox)
449+ m=(wac (sub j 2) wox)
450+ n=(wac (sub j 16) wox)
451+ o=(wac (sub j 7) wox)
543452 ==
544− |- ^- @
545− ?: =(64 j)
546− %= ^$
547− i +(i)
548− hax %+ rep 5
549− :~ (sum a (wac 0 hax))
550− (sum b (wac 1 hax))
551− (sum c (wac 2 hax))
552− (sum d (wac 3 hax))
553− (sum e (wac 4 hax))
554− (sum f (wac 5 hax))
555− (sum g (wac 6 hax))
556− (sum h (wac 7 hax))
557− ==
558− ==
559− =+ l=:(mix (ror 0 2 a) (ror 0 13 a) (ror 0 22 a)) :: s0
560− =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
561− =+ n=(sum l m) :: t2
562− =+ o=:(mix (ror 0 6 e) (ror 0 11 e) (ror 0 25 e)) :: s1
563− =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
564− =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
565− $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
453+ =+ x=:(mix (ror 0 1 l) (ror 0 8 l) (rsh [0 7] l))
454+ =+ y=:(mix (ror 0 19 m) (ror 0 61 m) (rsh [0 6] m))
455+ =+ z=:(sum n x o y)
456+ $(wox (con (lsh [6 j] z) wox), j +(j))
457+ =+ j=0
458+ =+ :* a=(wac 0 hax)
459+ b=(wac 1 hax)
460+ c=(wac 2 hax)
461+ d=(wac 3 hax)
462+ e=(wac 4 hax)
463+ f=(wac 5 hax)
464+ g=(wac 6 hax)
465+ h=(wac 7 hax)
466+ ==
467+ |- ^- @
468+ ?: =(80 j)
469+ %= ^$
470+ i +(i)
471+ hax %+ rep 6
472+ :~ (sum a (wac 0 hax))
473+ (sum b (wac 1 hax))
474+ (sum c (wac 2 hax))
475+ (sum d (wac 3 hax))
476+ (sum e (wac 4 hax))
477+ (sum f (wac 5 hax))
478+ (sum g (wac 6 hax))
479+ (sum h (wac 7 hax))
480+ ==
481+ ==
482+ =+ l=:(mix (ror 0 28 a) (ror 0 34 a) (ror 0 39 a)) :: S0
483+ =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
484+ =+ n=(sum l m) :: t2
485+ =+ o=:(mix (ror 0 14 e) (ror 0 18 e) (ror 0 41 e)) :: S1
486+ =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
487+ =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
488+ $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
566489```
567490
568491#### Examples
569492
570493```
571− > (shay 1 'hello')
572− \/16.144.219.278.061.159.438.339.586.294.967.166.038.336.988.797.862.808.055.174.98\/
573− 7.398.597.302.069.674
574− \/
494+> `@uw`(shal 1 'hello')
495+0w2.nWO0R.zMAzH.OSWU1.apOje.19Mta.RE24o.4u~MB.wQuj4.NDdG6.0QZA0.w21Br.yQVhu.pFBII.Cdgvd.WT-bH.g51Yu.fL44y
496+```
575497
576− > (shay 2 'hello')
577− \/100.467.333.538.737.303.691.714.735.404.408.035.555.613.179.595.938.688.113.300.8\/
578− 01.974.878.934.544.183
579− \/
498+```
499+> `@uw`(shal 2 'hello')
500+0w1.r3W4g.hae37.8YUFp.ntryr.DsQuY.rPsdm.p3Xjv.rayLz.DslEc.Lxvll.OJUc3.tZeLZ.TjUnu.XMyGr.82qPA.zl1y0.HbSpT
580501```
581502
582503#### Discussion
@@ -587,11 +508,11 @@ byte-string.
587508
588509---
589510
590−## `++shaz`
511+## `++shan`
591512
592−SHA-512
513+SHA-1
593514
594−Produces an atom by hashing an atom `ruz` with SHA-512.
515+Produces an atom by hashing an atom `ruz` with SHA-1.
595516
596517#### Accepts
597518
@@ -604,21 +525,84 @@ An atom.
604525#### Source
605526
606527```hoon
607− ++ shaz
608− |= ruz=@ ^- @
609− (shal [(met 3 ruz) ruz])
528+++ shan
529+ |= ruz=@
530+ =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
531+ =+ [sum=sum.few ror=ror.few rol=rol.few net=net.few inv=inv.few]
532+ =+ ral=(lsh [0 3] (met 3 ruz))
533+ =+ ^= ful
534+ %+ can 0
535+ :~ [ral ruz]
536+ [8 128]
537+ [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
538+ [64 (~(net fe 6) ral)]
539+ ==
540+ =+ lex=(met 9 ful)
541+ =+ kbx=0xca62.c1d6.8f1b.bcdc.6ed9.eba1.5a82.7999
542+ =+ hax=0xc3d2.e1f0.1032.5476.98ba.dcfe.efcd.ab89.6745.2301
543+ =+ i=0
544+ |-
545+ ?: =(i lex)
546+ (rep 5 (flop (rip 5 hax)))
547+ =+ ^= wox
548+ =+ dux=(cut 9 [i 1] ful)
549+ =+ wox=(rep 5 (turn (rip 5 dux) net))
550+ =+ j=16
551+ |- ^- @
552+ ?: =(80 j)
553+ wox
554+ =+ :* l=(wac (sub j 3) wox)
555+ m=(wac (sub j 8) wox)
556+ n=(wac (sub j 14) wox)
557+ o=(wac (sub j 16) wox)
558+ ==
559+ =+ z=(rol 0 1 :(mix l m n o))
560+ $(wox (con (lsh [5 j] z) wox), j +(j))
561+ =+ j=0
562+ =+ :* a=(wac 0 hax)
563+ b=(wac 1 hax)
564+ c=(wac 2 hax)
565+ d=(wac 3 hax)
566+ e=(wac 4 hax)
567+ ==
568+ |- ^- @
569+ ?: =(80 j)
570+ %= ^$
571+ i +(i)
572+ hax %+ rep 5
573+ :~
574+ (sum a (wac 0 hax))
575+ (sum b (wac 1 hax))
576+ (sum c (wac 2 hax))
577+ (sum d (wac 3 hax))
578+ (sum e (wac 4 hax))
579+ ==
580+ ==
581+ =+ fx=(con (dis b c) (dis (not 5 1 b) d))
582+ =+ fy=:(mix b c d)
583+ =+ fz=:(con (dis b c) (dis b d) (dis c d))
584+ =+ ^= tem
585+ ?: &((gte j 0) (lte j 19))
586+ :(sum (rol 0 5 a) fx e (wac 0 kbx) (wac j wox))
587+ ?: &((gte j 20) (lte j 39))
588+ :(sum (rol 0 5 a) fy e (wac 1 kbx) (wac j wox))
589+ ?: &((gte j 40) (lte j 59))
590+ :(sum (rol 0 5 a) fz e (wac 2 kbx) (wac j wox))
591+ :(sum (rol 0 5 a) fy e (wac 3 kbx) (wac j wox))
592+ $(j +(j), a tem, b a, c (rol 0 30 b), d c, e d)
610593```
611594
612595#### Examples
613596
614597```
615− > (shaz 'hello')
616− \/3.548.533.422.469.437.734.729.094.584.175.910.682.076.656.883.559.953.324.378.007\/
617− .735.849.386.038.666.450.748.109.671.344.747.196.048.200.348.948.408.339.256.384.
618− 360.070.359.656.053.016.948.640.159.265.179
619− \/
598+> `@uw`(shan 'hello')
599+0waH.QNxTs.NuyyS.HXu3P.J8bdC.KGkdd
620600```
621601
602+#### Discussion
603+
604+SHA-1 is a deprecated function; it is not considered secure.
605+
622606---
623607
624608## `++og`
@@ -637,16 +621,16 @@ A core.
637621#### Source
638622
639623```hoon
640− ++ og
641− ~/ %og
642− |_ a=@
624+++ og
625+ ~/ %og
626+ |_ a=@
643627```
644628
645629#### Examples
646630
647631```
648− > ~(. og 919)
649− <4.wmp {a/@ud <54.tyv 119.olq 31.ohr 1.jmk $143>}>
632+> ~(. og 919)
633+<4.wmp {a/@ud <54.tyv 119.olq 31.ohr 1.jmk $143>}>
650634```
651635
652636#### Discussion
@@ -675,26 +659,28 @@ An atom.
675659#### Source
676660
677661```hoon
678− ++ rad
679− |= b=@ ^- @
680− =+ c=(raw (met 0 b))
681− ?:((lth c b) c $(a +(a)))
662+++ rad
663+ |= b=@ ^- @
664+ ~_ leaf+"rad-zero"
665+ ?< =(0 b)
666+ =+ c=(raw (met 0 b))
667+ ?:((lth c b) c $(a +(a)))
682668```
683669
684670#### Examples
685671
686672```
687− > (~(rad og 5) 11)
688− 4
673+> (~(rad og 5) 11)
674+4
689675
690− > (~(rad og 758.716.593) 11)
691− 2
676+> (~(rad og 758.716.593) 11)
677+2
692678
693− > (~(rad og 1) 100.000)
694− 71.499
679+> (~(rad og 1) 100.000)
680+71.499
695681
696− > (~(rad og eny) 11) :: `eny` acts as a random sample
697− 7
682+> (~(rad og eny) 11) :: `eny` acts as a random sample
683+7
698684```
699685
700686---
@@ -718,23 +704,23 @@ A cell.
718704#### Source
719705
720706```hoon
721− ++ rads
722− |= b=@
723− =+ r=(rad b)
724− [r +>.$(a (shas %og-s (mix a r)))]
707+++ rads
708+ |= b=@
709+ =+ r=(rad b)
710+ [r +>.$(a (shas %og-s (mix a r)))]
725711```
726712
727713#### Examples
728714
729715```
730− > (~(rads og 4) 10)
731− [2 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
716+> (~(rads og 4) 10)
717+[2 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
732718
733− > =/ rng ~(. og 7)
734− =^ a rng (rads:rng 10)
735− =^ b rng (rads:rng 10)
736− [a b]
737− [2 8]
719+> =/ rng ~(. og 7)
720+ =^ a rng (rads:rng 10)
721+ =^ b rng (rads:rng 10)
722+ [a b]
723+[2 8]
738724```
739725
740726#### Discussion
@@ -762,35 +748,35 @@ An atom.
762748#### Source
763749
764750```hoon
765− ++ raw
766− ~/ %raw
767− |= b=@ ^- @
768− %+ can
769− 0
770− =+ c=(shas %og-a (mix b a))
771− |- ^- (list [@ @])
772− ?: =(0 b)
773− ~
774− =+ d=(shas %og-b (mix b (mix a c)))
775− ?: (lth b 256)
776− [[b (end 0 b d)] ~]
777− [[256 d] $(c d, b (sub b 256))]
751+++ raw
752+ ~/ %raw
753+ |= b=@ ^- @
754+ %+ can
755+ 0
756+ =+ c=(shas %og-a (mix b a))
757+ |- ^- (list [@ @])
758+ ?: =(0 b)
759+ ~
760+ =+ d=(shas %og-b (mix b (mix a c)))
761+ ?: (lth b 256)
762+ [[b (end [0 b] d)] ~]
763+ [[256 d] $(c d, b (sub b 256))]
778764```
779765
780766#### Examples
781767
782768```
783− > `@ud`(~(raw og 27) 4)
784− 0b1001
769+> `@ud`(~(raw og 27) 4)
770+0b1001
785771
786− > `@ub`(~(raw og 27) 3)
787− 0b0
772+> `@ub`(~(raw og 27) 3)
773+0b0
788774
789− > `@ub`(~(raw og 11) 4)
790− 0b1111
775+> `@ub`(~(raw og 11) 4)
776+0b1111
791777
792− > `@ub`(~(raw og 11) 3)
793− 0b100
778+> `@ub`(~(raw og 11) 3)
779+0b100
794780```
795781
796782---
@@ -806,24 +792,23 @@ parent core with `(raw b)`.
806792#### Source
807793
808794```hoon
809− ++ raws
810− |= b=@
811− =+ r=(raw b)
812− [r +>.$(a (shas %og-s r))]
813− --
795+++ raws
796+ |= b=@
797+ =+ r=(raw b)
798+ [r +>.$(a (shas %og-s (mix a r)))]
814799```
815800
816801#### Examples
817802
818803```
819− > `[@ub _og]`(~(raws og 7) 4)
820− [0b1100 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
804+> `[@ub _og]`(~(raws og 7) 4)
805+[0b1100 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
821806
822− > =/ rng ~(. og 7)
823− =^ a rng (rads:rng 4)
824− =^ b rng (rads:rng 4)
825− [`@ub`a `@ub`b]
826− [0b10 0b1]
807+> =/ rng ~(. og 7)
808+ =^ a rng (rads:rng 4)
809+ =^ b rng (rads:rng 4)
810+ [`@ub`a `@ub`b]
811+[0b10 0b1]
827812```
828813
829814#### Discussion
content/docs/hoon/reference/stdlib/3f.md+444−314
@@ -14,8 +14,8 @@ Used in the `@p` phonetic base.
1414#### Source
1515
1616```hoon
17− ++ un
18− |%
17+++ un
18+ |%
1919```
2020
2121---
@@ -39,36 +39,35 @@ An atom.
3939#### Source
4040
4141```hoon
42− ++ wren
43− |= pyn=@ ^- @
44− =+ len=(met 3 pyn)
45− ?: =(0 len)
46− 0
47− => .(len (dec len))
48− =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
49− %+ can 3
50− %- flop ^- (list [@ @])
51− :- [1 mig]
52− |- ^- (list [@ @])
53− ?: =(0 len)
54− ~
55− => .(len (dec len))
56− =+ mog=(zyft :(mix mig (end 3 1 len) (cut 3 [len 1] pyn)))
57− [[1 mog] $(mig mog)]
58− ::
42+++ wren
43+ |= pyn=@ ^- @
44+ =+ len=(met 3 pyn)
45+ ?: =(0 len)
46+ 0
47+ => .(len (dec len))
48+ =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
49+ %+ can 3
50+ %- flop ^- (list [@ @])
51+ :- [1 mig]
52+ |- ^- (list [@ @])
53+ ?: =(0 len)
54+ ~
55+ => .(len (dec len))
56+ =+ mog=(zyft :(mix mig (end 3 len) (cut 3 [len 1] pyn)))
57+ [[1 mog] $(mig mog)]
5958```
6059
6160#### Examples
6261
6362```
64− > `@ux`(wren:un 'testing')
65− 0x30.bf6a.b9fe.7d8f
63+> `@ux`(wren:un 'testing')
64+0x30.bf6a.b9fe.7d8f
6665
67− > `@ux`'testing'
68− 0x67.6e69.7473.6574
66+> `@ux`'testing'
67+0x67.6e69.7473.6574
6968
70− > `@da`(wred:un (wren:un ~2001.2.5))
71− ~2001.2.5
69+> `@da`(wred:un (wren:un ~2001.2.5))
70+~2001.2.5
7271```
7372
7473---
@@ -92,36 +91,35 @@ An atom.
9291#### Source
9392
9493```hoon
95− ++ wred
96− |= cry=@ ^- @
97− =+ len=(met 3 cry)
98− ?: =(0 len)
99− 0
100− => .(len (dec len))
101− =+ mig=(cut 3 [len 1] cry)
102− %+ can 3
103− %- flop ^- (list [@ @])
104− :- [1 (xaro len (zart mig))]
105− |- ^- (list [@ @])
106− ?: =(0 len)
107− ~
108− => .(len (dec len))
109− =+ mog=(cut 3 [len 1] cry)
110− [[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)]
111− ::
94+++ wred
95+ |= cry=@ ^- @
96+ =+ len=(met 3 cry)
97+ ?: =(0 len)
98+ 0
99+ => .(len (dec len))
100+ =+ mig=(cut 3 [len 1] cry)
101+ %+ can 3
102+ %- flop ^- (list [@ @])
103+ :- [1 (xaro len (zart mig))]
104+ |- ^- (list [@ @])
105+ ?: =(0 len)
106+ ~
107+ => .(len (dec len))
108+ =+ mog=(cut 3 [len 1] cry)
109+ [[1 :(mix mig (end 3 len) (zyrt mog))] $(mig mog)]
112110```
113111
114112#### Examples
115113
116114```
117− > (wred:un 0x30.bf6a.b9fe.7d8f)
118− 29.113.321.805.538.676
115+> (wred:un 0x30.bf6a.b9fe.7d8f)
116+29.113.321.805.538.676
119117
120− > `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
121− 'testing'
118+> `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
119+'testing'
122120
123− > (wred:un (wren:un 200.038.426))
124− 200.038.426
121+> (wred:un (wren:un 200.038.426))
122+200.038.426
125123```
126124
127125---
@@ -146,20 +144,20 @@ An atom.
146144#### Source
147145
148146```hoon
149− ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
147+++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
150148```
151149
152150#### Examples
153151
154152```
155− > (xafo:un 5 6)
156− 11
153+> (xafo:un 5 6)
154+11
157155
158− > (xafo:un 256 20)
159− 21
156+> (xafo:un 256 20)
157+21
160158
161− > (xafo:un 256 (xaro:un 256 20))
162− 20
159+> (xafo:un 256 (xaro:un 256 20))
160+20
163161```
164162
165163---
@@ -184,20 +182,20 @@ An atom.
184182#### Source
185183
186184```hoon
187− ++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
185+++ xaro |=([a=@ b=@] +((mod (add (dec b) (sub 255 (mod a 255))) 255)))
188186```
189187
190188#### Examples
191189
192190```
193− > (xaro:un 17 57)
194− 40
191+> (xaro:un 17 57)
192+40
195193
196− > (xaro:un 265 12)
197− 2
194+> (xaro:un 265 12)
195+2
198196
199− > (xaro:un 256 (xafo:un 256 20))
200− 20
197+> (xaro:un 256 (xafo:un 256 20))
198+20
201199```
202200
203201---
@@ -220,37 +218,37 @@ An atom.
220218#### Source
221219
222220```hoon
223− ++ zaft
224− |= a=@D
225− =+ ^= b
226− 0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
227− 7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038.
228− 1f4a.dca2.6fdf.66f9.f561.a12e.5a16.f7b0.a39f.364e.cb70.7318.
229− 1de1.ad31.63d1.abd4.db68.6a33.134d.a760.edee.5434.493a.e323.
230− 930d.8f3d.3562.bb81.0b24.43cf.bea5.a6eb.52b4.0229.06b2.6704.
231− 78c9.45ec.d75e.58af.c577.b7b9.c40e.017d.90c3.87f8.96fa.1153.
232− 0372.7f30.1c32.ac83.ff17.c6e4.d36d.6b55.e2ce.8c71.8a5b.b6f3.
233− 9d4b.eab5.8b3c.e7f2.a8fe.9574.5de0.bf20.3f15.9784.9939.5f9c.
234− e609.564f.d8a4.b825.9819.94aa.2c08.8e4c.9b22.477a.2840.3ed6.
235− 3750.6ef1.44dd.89ef.6576.d00a.fbda.9ed2.3b6c.7b0c.bde9.2ade.
236− 5c88.c182.481a.1b0f.2bfd.d591.2726.57ba
237− (cut 3 [(dec a) 1] b)
221+++ zaft
222+ |= a=@D
223+ =+ ^= b
224+ 0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
225+ 7e85.51ae.1005.c72d.1246.07e8.7c64.a914.8d69.d9f4.59c2.8038.
226+ 1f4a.dca2.6fdf.66f9.f561.a12e.5a16.f7b0.a39f.364e.cb70.7318.
227+ 1de1.ad31.63d1.abd4.db68.6a33.134d.a760.edee.5434.493a.e323.
228+ 930d.8f3d.3562.bb81.0b24.43cf.bea5.a6eb.52b4.0229.06b2.6704.
229+ 78c9.45ec.d75e.58af.c577.b7b9.c40e.017d.90c3.87f8.96fa.1153.
230+ 0372.7f30.1c32.ac83.ff17.c6e4.d36d.6b55.e2ce.8c71.8a5b.b6f3.
231+ 9d4b.eab5.8b3c.e7f2.a8fe.9574.5de0.bf20.3f15.9784.9939.5f9c.
232+ e609.564f.d8a4.b825.9819.94aa.2c08.8e4c.9b22.477a.2840.3ed6.
233+ 3750.6ef1.44dd.89ef.6576.d00a.fbda.9ed2.3b6c.7b0c.bde9.2ade.
234+ 5c88.c182.481a.1b0f.2bfd.d591.2726.57ba
235+ (cut 3 [(dec a) 1] b)
238236```
239237
240238#### Examples
241239
242240```
243− > (zaft:un 0x12)
244− 42
241+> (zaft:un 0x12)
242+42
245243
246− > (zaft:un 0xff)
247− 204
248− > `@ux`(zart:un 204)
249− 0xff
244+> (zaft:un 0xff)
245+204
246+> `@ux`(zart:un 204)
247+0xff
250248
251− > (zaft:un 0x0)
252− ! decrement-underflow
253− ! exit
249+> (zaft:un 0x0)
250+! decrement-underflow
251+! exit
254252```
255253
256254---
@@ -273,35 +271,34 @@ An atom.
273271#### Source
274272
275273```hoon
276− ++ zart :: reverse 255-sbox
277− |= a=@D
278− =+ ^= b
279− 0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
280− dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3.
281− 1e95.5fec.ffbc.f187.fbe2.6680.7c77.d30e.e94a.9414.fd9a.017d.
282− 3a7e.5a55.8ff5.8bf9.c181.e5b6.6ab2.35da.50aa.9293.3bc0.cdc6.
283− f3bf.1a58.4130.f844.3846.744e.36a0.f205.789e.32d8.5e54.5c22.
284− 0f76.fce7.4569.0d99.d26e.e879.dc16.2df4.887f.1ffe.4dba.6f5d.
285− bbcc.2663.1762.aed7.af8a.ca20.dbb4.9bc7.a942.834c.105b.c4d4.
286− 8202.3e61.a671.90e6.273d.bdab.3157.cfa4.0c2e.df86.2496.f7ed.
287− 2b48.2a9d.5318.a343.d128.be9c.a5ad.6bb5.6dfa.c5e1.3408.128d.
288− 2c04.0339.97a1.2ff0.49d0.eeb8.6c0a.0b37.b967.c347.d9ac.e072.
289− e409.7b9f.1598.1d3f.33de.8ce3.8970.8e7a
290− (cut 3 [(dec a) 1] b)
291− ::
274+++ zart
275+ |= a=@D
276+ =+ ^= b
277+ 0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
278+ dd52.40eb.65a2.60b7.4bcb.1123.ceb0.1bd6.3c84.2906.b164.19b3.
279+ 1e95.5fec.ffbc.f187.fbe2.6680.7c77.d30e.e94a.9414.fd9a.017d.
280+ 3a7e.5a55.8ff5.8bf9.c181.e5b6.6ab2.35da.50aa.9293.3bc0.cdc6.
281+ f3bf.1a58.4130.f844.3846.744e.36a0.f205.789e.32d8.5e54.5c22.
282+ 0f76.fce7.4569.0d99.d26e.e879.dc16.2df4.887f.1ffe.4dba.6f5d.
283+ bbcc.2663.1762.aed7.af8a.ca20.dbb4.9bc7.a942.834c.105b.c4d4.
284+ 8202.3e61.a671.90e6.273d.bdab.3157.cfa4.0c2e.df86.2496.f7ed.
285+ 2b48.2a9d.5318.a343.d128.be9c.a5ad.6bb5.6dfa.c5e1.3408.128d.
286+ 2c04.0339.97a1.2ff0.49d0.eeb8.6c0a.0b37.b967.c347.d9ac.e072.
287+ e409.7b9f.1598.1d3f.33de.8ce3.8970.8e7a
288+ (cut 3 [(dec a) 1] b)
292289```
293290
294291#### Examples
295292
296293```
297− > `@ux`(zart:un 204)
298− 0xff
294+> `@ux`(zart:un 204)
295+0xff
299296
300− > `@ux`(zart:un 42)
301− 0x12
297+> `@ux`(zart:un 42)
298+0x12
302299
303− > (zaft:un 0x12)
304− 42
300+> (zaft:un 0x12)
301+42
305302```
306303
307304---
@@ -324,38 +321,37 @@ An atom.
324321#### Source
325322
326323```hoon
327− ++ zyft :: forward 256-sbox
328− |= a=@D
329− =+ ^= b
330− 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
331− 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
332− 986a.768c.f8e8.c4c7.2f1c.effe.3cae.01c0.253e.65d3.3872.
333− ce0e.7a74.8ac6.daac.7e5c.6479.44ec.4143.3d20.4af0.ee6c.
334− c828.deca.0377.249f.ffcd.7b4f.eb7d.66f2.8951.042e.595a.
335− 8e13.f9c3.a79a.f788.6199.9391.7fab.6200.4ce5.0758.e2f1.
336− 7594.c945.d218.4248.afa1.e61a.54fb.1482.bea4.96a2.3473.
337− 63c2.e7cb.155b.120a.4ed7.bfd8.b31b.4008.f329.fca3.5380.
338− 9556.0cb2.8722.2bea.e96e.3ac5.d1bc.10e3.2c52.a62a.b1d6.
339− 35aa.d05e.f6a8.0f3b.31ed.559d.09ad.f585.6d21.fd1d.8d67.
340− 370b.26f4.70c1.b923.4684.6fbd.cf8b.5036.0539.9cdc.d93f.
341− 9068.1edf.8f33.b632.d427.97fa.9ee1
342− (cut 3 [a 1] b)
343− ::
324+++ zyft
325+ |= a=@D
326+ =+ ^= b
327+ 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
328+ 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
329+ 986a.768c.f8e8.c4c7.2f1c.effe.3cae.01c0.253e.65d3.3872.
330+ ce0e.7a74.8ac6.daac.7e5c.6479.44ec.4143.3d20.4af0.ee6c.
331+ c828.deca.0377.249f.ffcd.7b4f.eb7d.66f2.8951.042e.595a.
332+ 8e13.f9c3.a79a.f788.6199.9391.7fab.6200.4ce5.0758.e2f1.
333+ 7594.c945.d218.4248.afa1.e61a.54fb.1482.bea4.96a2.3473.
334+ 63c2.e7cb.155b.120a.4ed7.bfd8.b31b.4008.f329.fca3.5380.
335+ 9556.0cb2.8722.2bea.e96e.3ac5.d1bc.10e3.2c52.a62a.b1d6.
336+ 35aa.d05e.f6a8.0f3b.31ed.559d.09ad.f585.6d21.fd1d.8d67.
337+ 370b.26f4.70c1.b923.4684.6fbd.cf8b.5036.0539.9cdc.d93f.
338+ 9068.1edf.8f33.b632.d427.97fa.9ee1
339+ (cut 3 [a 1] b)
344340```
345341
346342#### Examples
347343
348344```
349− > (zyft:un 0x12)
350− 57
345+> (zyft:un 0x12)
346+57
351347
352− > (zyft:un 0x0)
353− 225
348+> (zyft:un 0x0)
349+225
354350
355− > (zyft:un 0xff)
356− 187
357− > `@ux`(zyrt:un 187)
358− 0xff
351+> (zyft:un 0xff)
352+187
353+> `@ux`(zyrt:un 187)
354+0xff
359355```
360356
361357---
@@ -378,66 +374,76 @@ An atom.
378374#### Source
379375
380376```hoon
381− ++ zyrt :: reverse 256-sbox
382− |= a=@D
383− =+ ^= b
384− 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
385− 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
386− c077.4337.17bd.9eda.62a4.79a7.ccb8.44cd.8e64.1ec4.5b6b.
387− 1842.ffd8.1dfb.fd07.f2f9.594c.3be3.73c6.2cb6.8438.e434.
388− 8d3d.ea6a.5268.72db.a001.2e11.de8c.88d3.0369.4f7a.87e2.
389− 860d.0991.25d0.16b9.978a.4bf4.2a1a.e96c.fa50.85b5.9aeb.
390− 9dbb.b2d9.a2d1.7bba.66be.e81f.1946.29a8.f5d2.f30c.2499.
391− c1b3.6583.89e1.ee36.e0b4.6092.937e.d74e.2f6f.513e.9615.
392− 9c5d.d581.e7ab.fe74.f01b.78b1.ae75.af57.0ec2.adc7.3245.
393− 12bf.2314.3967.0806.31dc.cb94.d43f.493c.54a6.0421.c3a1.
394− 1c4a.28ac.fc0b.26ca.5870.e576.f7f1.616d.905f.ef41.33bc.
395− df4d.225e.2d56.7fd6.1395.a3f8.c582
396− (cut 3 [a 1] b)
377+++ zyrt
378+ |= a=@D
379+ =+ ^= b
380+ 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
381+ 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
382+ c077.4337.17bd.9eda.62a4.79a7.ccb8.44cd.8e64.1ec4.5b6b.
383+ 1842.ffd8.1dfb.fd07.f2f9.594c.3be3.73c6.2cb6.8438.e434.
384+ 8d3d.ea6a.5268.72db.a001.2e11.de8c.88d3.0369.4f7a.87e2.
385+ 860d.0991.25d0.16b9.978a.4bf4.2a1a.e96c.fa50.85b5.9aeb.
386+ 9dbb.b2d9.a2d1.7bba.66be.e81f.1946.29a8.f5d2.f30c.2499.
387+ c1b3.6583.89e1.ee36.e0b4.6092.937e.d74e.2f6f.513e.9615.
388+ 9c5d.d581.e7ab.fe74.f01b.78b1.ae75.af57.0ec2.adc7.3245.
389+ 12bf.2314.3967.0806.31dc.cb94.d43f.493c.54a6.0421.c3a1.
390+ 1c4a.28ac.fc0b.26ca.5870.e576.f7f1.616d.905f.ef41.33bc.
391+ df4d.225e.2d56.7fd6.1395.a3f8.c582
392+ (cut 3 [a 1] b)
397393```
398394
399395#### Examples
400396
401397```
402− > `@ux`(zyrt:un 57)
403− 0x12
398+> `@ux`(zyrt:un 57)
399+0x12
404400
405− > `@ux`(zyrt:un 225)
406− 0x0
401+> `@ux`(zyrt:un 225)
402+0x0
407403
408− > `@ux`(zyrt:un 187)
409− 0xff
410− > (zyft:un 0xff)
411− 187
404+> `@ux`(zyrt:un 187)
405+0xff
406+> (zyft:un 0xff)
407+187
412408```
413409
414410---
415411
416412## `++ob`
417413
418−Reversible scrambling, v2
419−
420−```hoon
421− ++ ob
422− |%
423−```
414+Reversible scrambling, v3
424415
425416A core for performing reversible scrambling operations for the `@p` phonetic
426417base.
427418
419+#### Source
420+
421+```hoon
422+++ ob
423+ ~% %ob ..ob
424+ ==
425+ %fein fein
426+ %fynd fynd
427+ ==
428+ |%
429+```
430+
428431---
429432
430−### `++feen:ob`
433+### `++fein:ob`
431434
432−Conceal structure, v2
435+conceal structure, v3
433436
434−Randomly permutes atoms that fit into 17 to 32 bits into one another. If the
435−atom fits into 33 to 64 bits, does the same permutation on the low 32 bits
436−only. Otherwise, passes the atom through unchanged.
437+`+fein` conceals planet-sized atoms. The idea is that it should not be trivial
438+to tell which planet a star has spawned under.
439+
440+Permutes atom `pyn` which fits into 17 to 32 bits, or if `pyn` fits
441+into 33 to 64 bits, does the same permutation on the low 32 bits only.
442+Otherwise, passes `pyn` through unchanged.
437443
438444#### Accepts
439445
440−An atom.
446+`pyn` is an atom.
441447
442448#### Produces
443449
@@ -446,49 +452,44 @@ An atom.
446452#### Source
447453
448454```hoon
449− ++ feen
450− |= pyn=@ ^- @
451− ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
452− (add 0x1.0000 (fice (sub pyn 0x1.0000)))
453− ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
454− =+ lo=(dis pyn 0xffff.ffff)
455− =+ hi=(dis pyn 0xffff.ffff.0000.0000)
456− %+ con hi
457− (add 0x1.0000 (fice (sub lo 0x1.0000)))
458− pyn
459− ::
455+++ fein
456+ ~/ %fein
457+ |= pyn=@ ^- @
458+ ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
459+ (add 0x1.0000 (feis (sub pyn 0x1.0000)))
460+ ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
461+ =/ lo (dis pyn 0xffff.ffff)
462+ =/ hi (dis pyn 0xffff.ffff.0000.0000)
463+ %+ con hi
464+ $(pyn lo)
465+ pyn
460466```
461467
462468#### Examples
463469
464470```
465− > `@p`(feen:ob 111.103)
466− ~mophul-pagwyx
471+> (fein:ob 111.103)
472+2.783.373.008
467473
468− > `@p`(feen:ob ~mophul-pagwyx)
469− ~wisfed-lonwes
470−
471− > `@p`(feen:ob (fend:ob ~mophul-pagwyx))
472− ~mophul-pagwyx
473−
474− > `@p`(feen:ob ~wex)
475− ~wex
474+> (fynd:ob 2.783.373.008)
475+111.103
476476```
477477
478478---
479479
480−### `++fend:ob`
480+### `++fynd:ob`
481+
482+Restore structure, v3
481483
482−Restore structure, v2
484+Restores obfuscated values that have been enciphered with [+fein](feinob).
483485
484−Randomly permutes atoms that fit into 17 to 32 bits into one another, and
485−randomly permutes the low 32 bits of atoms that fit into 33 to 64 bits;
486−otherwise, passes the atom through unchanged. The inverse of the one applied
487−by `feen`.
486+Permutes atom `cry` that fits into 17 to 32 bits, or permutes the low 32 bits of
487+`cry` if it fits into 33 to 64 bits. Otherwise, passes the atom through
488+unchanged. The inverse of the one applied by [`+fein`](#feinob).
488489
489490#### Accepts
490491
491−An atom.
492+`cry` is an atom.
492493
493494#### Produces
494495
@@ -497,52 +498,42 @@ An atom.
497498#### Source
498499
499500```hoon
500− ++ fend
501− |= cry=@ ^- @
502− ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
503− (add 0x1.0000 (teil (sub cry 0x1.0000)))
504− ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
505− =+ lo=(dis cry 0xffff.ffff)
506− =+ hi=(dis cry 0xffff.ffff.0000.0000)
507− %+ con hi
508− (add 0x1.0000 (teil (sub lo 0x1.0000)))
509− cry
510− ::
501+++ fynd
502+ ~/ %fynd
503+ |= cry=@ ^- @
504+ ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
505+ (add 0x1.0000 (tail (sub cry 0x1.0000)))
506+ ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
507+ =/ lo (dis cry 0xffff.ffff)
508+ =/ hi (dis cry 0xffff.ffff.0000.0000)
509+ %+ con hi
510+ $(cry lo)
511+ cry
511512```
512513
513514#### Examples
514515
515516```
516− > `@p`(fend:ob 111.103)
517− ~doznec-sapfes
518−
519− > `@p`(fend:ob ~doznec-sapfes)
520− ~hanrud-widwyc
521−
522− > `@p`(fend:ob ~wisfed-lonwes)
523− ~mophul-pagwyx
524−
525− > `@p`(fend:ob (feen:ob ~wisfed-lonwes))
526− ~wisfed-lonwes
517+> (fein:ob 111.103)
518+2.783.373.008
527519
528− > `@p`(fend:ob ~tarmed)
529− ~tarmed
520+> (fynd:ob 2.783.373.008)
521+111.103
530522```
531523
532524---
533525
534−### `++fice:ob`
526+### `++feis:ob`
535527
536−Feistel-like cipher
528+Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1]
537529
538−Produces an atom by applying a variant of the Feistel cipher. Unlike
539−a conventional Feistel cipher that is its own inverse if keys are used in
540−reverse order, this Feistel-like cipher uses two moduli that must be swapped
541−when applying the reverse transformation. The inverse of `teil`.
530+See: Black & Rogaway (2002), Ciphers for arbitrary finite domains.
531+
532+Inverse of [`+tail`](#tailob).
542533
543534#### Accepts
544535
545−`nor` is an atom.
536+`m` is an atom.
546537
547538#### Produces
548539
@@ -551,42 +542,33 @@ An atom.
551542#### Source
552543
553544```hoon
554− ++ fice :: adapted from
555− |= nor=@ :: black and rogaway
556− ^- @ :: "ciphers with
557− =+ ^= sel :: arbitrary finite
558− %+ rynd 2 :: domains", 2002
559− %+ rynd 1
560− %+ rynd 0
561− [(mod nor 65.535) (div nor 65.535)]
562− (add (mul 65.535 -.sel) +.sel)
563− ::
545+++ feis
546+ |= m=@
547+ ^- @
548+ (fee 4 0xffff 0x1.0000 (mul 0xffff 0x1.0000) eff m)
564549```
565550
566551#### Examples
567552
568553```
569− > (fice:ob 11)
570− 776.343.932
554+> (feis:ob 11)
555+776.343.932
571556
572− > (fice:ob (teil:ob 11))
573− 11
557+> (tail:ob 776.343.932)
558+11
574559```
575560
576561---
577562
578−### `++teil:ob`
563+### `++tail:ob`
579564
580−Reverse Feistel-like cipher
565+Reverse [`+feis`](#feisob)
581566
582−Applies the reverse of the Feistel-like cipher applied by `fice`. Unlike
583−a conventional Feistel cipher that is its own inverse if keys are used in
584−reverse order, this Feistel-like cipher uses two moduli that must be swapped
585−when applying the reverse transformation.
567+Applies the reverse of the Feistel cipher applied by `+feis`.
586568
587569#### Accepts
588570
589−`vip` is an atom.
571+`m` is an atom.
590572
591573#### Produces
592574
@@ -595,112 +577,261 @@ An atom.
595577#### Source
596578
597579```hoon
598− ++ teil :: reverse ++fice
599− |= vip=@
600− ^- @
601− =+ ^= sel
602− %+ rund 0
603− %+ rund 1
604− %+ rund 2
605− [(mod vip 65.535) (div vip 65.535)]
606− (add (mul 65.535 -.sel) +.sel)
607− ::
580+++ tail
581+ |= m=@
582+ ^- @
583+ (feen 4 0xffff 0x1.0000 (mul 0xffff 0x1.0000) eff m)
608584```
609585
610586#### Examples
611587
612588```
613− > (teil:ob 11)
614− 514.230.493
589+> (feis:ob 11)
590+776.343.932
615591
616− > (teil:ob (fice:ob 11))
617− 11
592+> (tail:ob 776.343.932)
593+11
618594```
619595
620596---
621597
622−### `++rynd:ob`
598+### `++fee:ob`
599+
600+"Fe" in B&R (2002)
623601
624−Reverse Feistel-like cipher
602+A Feistel cipher given the following parameters:
625603
626−A single round of the Feistel-like cipher `fice`. AES ([`aesc`](/docs/hoon/reference/stdlib/3f)) is
627−used as the round function. The inverse of `rund`.
604+- `r`: Number of Feistel rounds.
605+- `a`, `b`: Parameters such that `ab` >= `k`.
606+- `k`: Value such that the domain of the cipher is [0, k - 1].
607+- `prf`: A gate denoting a family of pseudorandom functions indexed by its first argument and taking its second argument as input.
608+- `m`: An input value in the domain [0, k - 1].
628609
629610#### Accepts
630611
631−`n` is an atom.
612+`r`, `a`, `b`, `k` are an atoms.
632613
633−`l` is an atom.
614+`prft` is a gate: `$-([j=@ r=@] @)`.
634615
635−`r` is an atom.
616+`m` is an atom.
636617
637618#### Produces
638619
639−A cell of two atoms.
620+An atom.
640621
641622#### Source
642623
643624```hoon
644− ++ rynd
645− |= [n=@ l=@ r=@]
646− ^- [@ @]
647− :- r
648− ?~ (mod n 2)
649− (~(sum fo 65.535) l (en:aesc (snag n raku) r))
650− (~(sum fo 65.536) l (en:aesc (snag n raku) r))
625+++ fee
626+ |= [r=@ a=@ b=@ k=@ prf=$-([j=@ r=@] @) m=@]
627+ ^- @
628+ =/ c (fe r a b prf m)
629+ ?: (lth c k)
630+ c
631+ (fe r a b prf c)
651632```
652633
653−#### Examples
634+---
635+
636+### `++feen:ob`
637+
638+Reverse [`+fee`](#feeob)
639+
640+"Fe^-1" in B&R (2002). Reverses a Feistel cipher constructed with parameters as
641+described in `+fee`.
642+
643+#### Accepts
644+
645+`r`, `a`, `b`, and `k` are atoms.
646+
647+`prf` is a gate: `$-([j=@ r=@] @)`.
648+
649+`m` is an atom.
650+
651+#### Produces
652+
653+An atom.
654+
655+#### Source
654656
657+```hoon
658+++ feen
659+ |= [r=@ a=@ b=@ k=@ prf=$-([j=@ r=@] @) m=@]
660+ ^- @
661+ =/ c (fen r a b prf m)
662+ ?: (lth c k)
663+ c
664+ (fen r a b prf c)
655665```
656− > (rynd:ob 2 261 9)
657− [9 37.422]
658666
659− > (rynd:ob 2 (rund:ob 2 37.422 9))
660− [261 32.902]
667+---
668+
669+### `+fe:ob`
670+
671+An internal function to [`+fee`](#feeob).
672+
673+Note that this implementation differs slightly from the reference paper to
674+support some legacy behaviour.
675+
676+#### Accepts
677+
678+`r`, `a`, and `b` are atoms.
679+
680+`prf` is a gate: `$-([j=@ r=@] @)`.
681+
682+`m` is an atom.
683+
684+#### Produces
685+
686+An atom.
687+
688+#### Source
689+
690+```hoon
691+++ fe
692+ |= [r=@ a=@ b=@ prf=$-([j=@ r=@] @) m=@]
693+ =/ j 1
694+ =/ ell (mod m a)
695+ =/ arr (div m a)
696+ |- ^- @
697+ ::
698+ ?: (gth j r)
699+ ?. =((mod r 2) 0)
700+ (add (mul arr a) ell)
701+ ::
702+ :: Note that +fe differs from B&R (2002)'s "fe" below, as a previous
703+ :: implementation of this cipher contained a bug such that certain inputs
704+ :: could encipher to the same output.
705+ ::
706+ :: To correct these problem cases while also preserving the cipher's
707+ :: legacy behaviour on most inputs, we check for a problem case (which
708+ :: occurs when 'arr' is equal to 'a') and, if detected, use an alternate
709+ :: permutation instead.
710+ ::
711+ ?: =(arr a)
712+ (add (mul arr a) ell)
713+ (add (mul ell a) arr)
714+ ::
715+ =/ f (prf (sub j 1) arr)
716+ ::
717+ =/ tmp
718+ ?. =((mod j 2) 0)
719+ (mod (add f ell) a)
720+ (mod (add f ell) b)
721+ ::
722+ $(j +(j), ell arr, arr tmp)
661723```
662724
663725---
664726
665−### `++rund:ob`
727+### `++fen:ob`
728+
729+Reverse [`+fe`](#feob)
666730
667−Reverse single Feistel-like
731+This is an internal function to [`+feen`](#feenob)
668732
669−A single round of the Feistel-like reverse cipher `teil`. AES ([`aesc`](/docs/hoon/reference/stdlib/3f))
670−is used as the round function. The inverse of `rynd`.
733+Note that this implementation differs slightly from the reference paper
734+to support some legacy behaviour.
671735
672736#### Accepts
673737
674−`n` is an atom.
738+`r`, `a` and `b` are atoms.
675739
676−`l` is an atom.
740+`prf` is a gate: `$-([j=@ r=@] @)`.
677741
678−`r` is an atom.
742+`m` is an atom.
679743
680744#### Produces
681745
682−A cell of two atoms.
746+An atom.
683747
684748#### Source
685749
686750```hoon
687− ++ rund
688− |= [n=@ l=@ r=@]
689− ^- [@ @]
690− :- r
691− ?~ (mod n 2)
692− (~(dif fo 65.535) l (muk (snag n raku) 2 r))
693− (~(dif fo 65.536) l (muk (snag n raku) 2 r))
751+++ fen
752+ |= [r=@ a=@ b=@ prf=$-([j=@ r=@] @) m=@]
753+ =/ j r
754+ ::
755+ =/ ahh
756+ ?. =((mod r 2) 0)
757+ (div m a)
758+ (mod m a)
759+ ::
760+ =/ ale
761+ ?. =((mod r 2) 0)
762+ (mod m a)
763+ (div m a)
764+ ::
765+ :: Similar to the comment in +fe, +fen differs from B&R (2002)'s "fe^-1"
766+ :: here in order to preserve the legacy cipher's behaviour on most inputs.
767+ ::
768+ :: Here problem cases can be identified by 'ahh' equating with 'a'; we
769+ :: correct those cases by swapping the values of 'ahh' and 'ale'.
770+ ::
771+ =/ ell
772+ ?: =(ale a)
773+ ahh
774+ ale
775+ ::
776+ =/ arr
777+ ?: =(ale a)
778+ ale
779+ ahh
780+ ::
781+ |- ^- @
782+ ?: (lth j 1)
783+ (add (mul arr a) ell)
784+ =/ f (prf (sub j 1) ell)
785+ ::
786+ :: Note that there is a slight deviation here to avoid dealing with
787+ :: negative values. We add 'a' or 'b' to arr as appropriate and reduce
788+ :: 'f' modulo the same number before performing subtraction.
789+ ::
790+ =/ tmp
791+ ?. =((mod j 2) 0)
792+ (mod (sub (add arr a) (mod f a)) a)
793+ (mod (sub (add arr b) (mod f b)) b)
794+ ::
795+ $(j (sub j 1), ell tmp, arr ell)
694796```
695797
696−#### Examples
798+---
799+
800+### `++eff:ob`
801+
802+murmur3-based pseudorandom function.
803+
804+'F' in B&R (2002).
805+
806+- `j` is a number between 0 and 3, selecting the seed with that index in
807+ [+raku](#rakuob).
808+- `r` is an atom with a maximum length of two bytes. This is an internal
809+ function of [`+feis`](#feisob) and [`+tail`](#tailob).
810+
811+#### Accepts
812+
813+`j` is an atom.
814+
815+`r` is an atom.
697816
817+#### Produces
818+
819+An atom.
820+
821+#### Source
822+
823+```hoon
824+++ eff
825+ |= [j=@ r=@]
826+ ^- @
827+ (muk (snag j raku) 2 r)
698828```
699− > (rund:ob 2 261 9)
700− [9 28.635]
701829
702− > (rund:ob 2 (rynd:ob 2 28.635 9))
703− [261 32.651]
830+#### Example
831+
832+```
833+> (eff:ob 0 'ab')
834+1.178.819.349
704835```
705836
706837---
@@ -709,7 +840,7 @@ A cell of two atoms.
709840
710841Key list
711842
712−Produces a list of arbitrary hexademical keys for use with [`aesc`](/docs/hoon/reference/stdlib/3f).
843+Produces a list of arbitrary hexademical keys for use with [`+eff`](#effob).
713844
714845#### Produces
715846
@@ -718,21 +849,20 @@ A list of atoms of aura `@ux` (hexadecimal).
718849#### Source
719850
720851```hoon
721− ++ raku
722− ^- (list @ux)
723− :~ 0xb76d.5eed
724− 0xee28.1300
725− 0x85bc.ae01
726− 0x4b38.7af7
727− ==
728− --
852+++ raku
853+ ^- (list @ux)
854+ :~ 0xb76d.5eed
855+ 0xee28.1300
856+ 0x85bc.ae01
857+ 0x4b38.7af7
858+ ==
729859```
730860
731861#### Examples
732862
733863```
734− > raku:ob
735− ~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
864+> raku:ob
865+~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
736866```
737867
738868---
content/docs/hoon/reference/stdlib/3g.md+124−134
@@ -4,7 +4,7 @@ weight = 27
44template = "doc.html"
55+++
66
7−## `++coin`
7+## `+$coin`
88
99Noun-literal syntax cases
1010
@@ -14,91 +14,92 @@ and printed using `++so` and `++co` cores.
1414#### Source
1515
1616```hoon
17− ++ coin $% [$$ p=dime]
18− [$blob p=*]
19− [$many p=(list coin)]
20− ==
17++$ coin $~ [%$ %ud 0]
18+ $% [%$ p=dime]
19+ [%blob p=*]
20+ [%many p=(list coin)]
2121```
2222
23−---
24−
2523#### Examples
2624
2725```
28− > `coin`(need (slay '~s1'))
29− [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
26+> `coin`(need (slay '~s1'))
27+[%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
3028
31− > `coin`(need (slay '0x2b59'))
32− [%$ p=[p=~.ux q=11.097]]
29+> `coin`(need (slay '0x2b59'))
30+[%$ p=[p=~.ux q=11.097]]
3331
34− > ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
35− "._1_a_-2__"
36− > ._1_a_-2__
37− [1 %a -2]
32+> ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
33+"._1_a_-2__"
34+> ._1_a_-2__
35+[1 %a -2]
3836
39− > `@uv`(jam [3 4])
40− 0v2cd1
37+> `@uv`(jam [3 4])
38+0v2cd1
4139
42− > (slay '~02cd1')
43− [~ u=[%blob p=[3 4]]]
40+> (slay '~02cd1')
41+[~ u=[%blob p=[3 4]]]
4442
45− > ~02cd1
46− [3 4]
43+> ~02cd1
44+[3 4]
4745```
4846
4947---
5048
51−## `++dime`
49+## `+$dime`
5250
5351Aura-atom pair
5452
55−Used in `++coin`. Convenience methods [`++scot`](/docs/hoon/reference/stdlib/4m) and
56−[`++scow`](/docs/hoon/reference/stdlib/4m) print dimes as `++cord` and `++tape`, respectively.
57−[`++slat`](/docs/hoon/reference/stdlib/4m), [`++slav`](/docs/hoon/reference/stdlib/4m), and [`++slaw`](/docs/hoon/reference/stdlib/4m) are used
58−to parse atoms of specific auras.
53+Used in `++coin`. Convenience methods
54+[`++scot`](/docs/hoon/reference/stdlib/4m#scot) and
55+[`++scow`](/docs/hoon/reference/stdlib/4m#scow) print dimes as `++cord` and
56+`++tape`, respectively. [`++slat`](/docs/hoon/reference/stdlib/4m#slat),
57+[`++slav`](/docs/hoon/reference/stdlib/4m#slav), and
58+[`++slaw`](/docs/hoon/reference/stdlib/4m#slaw) are used to parse atoms of
59+specific auras.
5960
6061#### Source
6162
6263```hoon
63− ++ dime [p=@ta q=@]
64++$ dime [p=@ta q=@]
6465```
6566
6667#### Examples
6768
6869```
69− > +>:(slay '0x123')
70− p=[p=~.ux q=291]
70+> +>:(slay '0x123')
71+p=[p=~.ux q=291]
7172```
7273
7374---
7475
75−## `++edge`
76+## `+$edge`
7677
7778Parsing location metadata. Parsing location input `p` and optional result `p.q` and parsing continuation `q.q`.
7879
7980#### Source
8081
8182```hoon
82− ++ edge [p=hair q=(unit [p=* q=nail])] :: parsing output
83++$ edge [p=hair q=(unit [p=* q=nail])]
8384```
8485
8586#### Examples
8687
8788```
88− > *edge
89− [p=[p=0 q=0] q=~]
89+> *edge
90+[p=[p=0 q=0] q=~]
9091
91− > (tall:vast [1 1] "a b")
92− [p=[p=1 q=3] q=[~ u=[p=[%wing p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
92+> (tall:vast [1 1] "a b")
93+[p=[p=1 q=3] q=[~ u=[p=[%wing p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
9394```
9495
9596#### Discussion
9697
97−See also: [Section 3g](/docs/hoon/reference/stdlib/3g#rule), `++rule`
98+See also: [$rule](#rule).
9899
99100---
100101
101−## `++hair`
102+## `+$hair`
102103
103104Parsing line and column
104105
@@ -107,23 +108,23 @@ A pair of two `@ud` used in parsing indicating line and column number.
107108#### Source
108109
109110```hoon
110− ++ hair [p=@ud q=@ud]
111++$ hair [p=@ud q=@ud]
111112```
112113
113114#### Examples
114115
115116```
116− > *hair
117− [p=0 q=0]
117+> *hair
118+[p=0 q=0]
118119
119− > `hair`[1 1] :: parsing starts at [1 1] as a convention.
120− [p=1 q=1]
120+> `hair`[1 1] :: parsing starts at [1 1] as a convention.
121+[p=1 q=1]
121122
122− > ((plus ace) [1 1] " --")
123− [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
123+> ((plus ace) [1 1] " --")
124+[p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
124125
125− > `hair`p:((plus ace) [1 1] " --")
126− [p=1 q=4]
126+> `hair`p:((plus ace) [1 1] " --")
127+[p=1 q=4]
127128```
128129
129130---
@@ -132,38 +133,39 @@ A pair of two `@ud` used in parsing indicating line and column number.
132133
133134Generic edge
134135
135−Generates an `++edge` with a parsed result set to a specific type.
136+Generates an [`$edge`](#edge) with a parsed result set to a specific type.
136137
137138#### Source
138139
139140```hoon
140− ++ like |* a=gate
141− |= b=_`*`[(hair) ~]
142− :- p=(hair -.b)
143− ^= q
144− :- ~
145− u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]]
141+++ like |* a=$-(* *)
142+ |: b=`*`[(hair) ~]
143+ :- p=(hair -.b)
144+ ^= q
145+ ?@ +.b ~
146+ :- ~
147+ u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]]
146148```
147149
148150#### Examples
149151
150152```
151− > *(like char)
152− [p=[p=0 q=0] q=~]
153+> *(like char)
154+[p=[p=0 q=0] q=~]
153155
154− > (ace [1 1] " a")
155− [p=[p=1 q=2] q=[~ u=[p=' ' q=[p=[p=1 q=2] q="a"]]]]
156+> (ace [1 1] " a")
157+[p=[p=1 q=2] q=[~ u=[p=' ' q=[p=[p=1 q=2] q="a"]]]]
156158
157− > `(like char)`(ace [1 1] " a")
158− [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
159+> `(like char)`(ace [1 1] " a")
160+[p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
159161
160− > `(like ,@)`(ace [1 1] " a")
161− [p=[p=1 q=2] q=[~ u=[p=32 q=[p=[p=1 q=2] q="a"]]]]
162+> `(like ,@)`(ace [1 1] " a")
163+[p=[p=1 q=2] q=[~ u=[p=32 q=[p=[p=1 q=2] q="a"]]]]
162164```
163165
164166---
165167
166−## `++nail`
168+## `+$nail`
167169
168170Location, remainder of parsed text
169171
@@ -172,44 +174,44 @@ Indicates parsing position `p`, and remaining text to be parsed `q`.
172174#### Source
173175
174176```hoon
175− ++ nail [p=hair q=tape]
177++$ nail [p=hair q=tape]
176178```
177179
178180#### Examples
179181
180182```
181− > +<:;~(plug cab cab)
182− c=[p=[p=0 q=0] q=""]
183+> +<:;~(plug cab cab)
184+c=[p=[p=0 q=0] q=""]
183185```
184186
185187---
186188
187−## `++pint`
189+## `+$pint`
188190
189191Parsing range
190192
191−A `++pint` is a pair of `++hair`, indicating from `p` to `q`. Mostly used for
193+A `$pint` is a pair of [`$hair`](#hair), indicating from `p` to `q`. Mostly used for
192194stack traces.
193195
194196#### Source
195197
196198```hoon
197− ++ pint [p=[p=@ q=@] q=[p=@ q=@]]
199++$ pint [p=[p=@ q=@] q=[p=@ q=@]]
198200```
199201
200202#### Examples
201203
202204```
203− > !:(!!) :: !! always produces a crash
204− /~zod/home/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
205+> !:(!!) :: !! always produces a crash
206+/~zod/home/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
205207
206− > `pint`[[1 4] [1 6]]
207− [p=[p=1 q=4] q=[p=1 q=6]]
208+> `pint`[[1 4] [1 6]]
209+[p=[p=1 q=4] q=[p=1 q=6]]
208210```
209211
210212---
211213
212−## `++rule`
214+## `+$rule`
213215
214216Parsing rule
215217
@@ -218,19 +220,19 @@ An empty parsing rule, but used to check that parsing rules match this with `_`.
218220#### Source
219221
220222```hoon
221− ++ rule _|=(nail *edge)
223++$ rule _|:($:nail $:edge)
222224```
223225
224226#### Examples
225227
226228```
227− > ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
228− [[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
229+> ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
230+[[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
229231```
230232
231233---
232234
233−## `++spot`
235+## `+$spot`
234236
235237Stack trace line
236238
@@ -245,14 +247,14 @@ The stack trace that is printed after crashing.
245247#### Examples
246248
247249```
248− > !: !! :: !! always produces a crash
249− /~zod/home/~2018.8.8..21.42.40..7852:<[1 5].[1 7]>
250− ! exit
250+> !: !! :: !! always produces a crash
251+/~zod/home/~2018.8.8..21.42.40..7852:<[1 5].[1 7]>
252+! exit
251253```
252254
253255---
254256
255−## `++tone`
257+## `+$tone`
256258
257259Nock result, error report
258260
@@ -262,45 +264,27 @@ or failure with an error report (`%2`).
262264#### Source
263265
264266```hoon
265− ++ tone $% [$0 p=*] :: success
266− [$1 p=(list)] :: blocks
267− [$2 p=(list [@ta *])] :: error report
268− ==
267++$ tone $% [%0 product=*]
268+ [%1 block=*]
269+ [%2 trace=(list [@ta *])]
270+ ==
269271```
270272
271273#### Examples
272274
273275```
274− > (mink [[20 21] 0 3] $~)
275− [%0 p=21]
276−
277−
278− > (mink [[1 2] !=(!:(+(.)))] ,~)
279− [ %2
280− p
281− ~[
282− [ ~.spot
283− [ [ \/72.245.008.048.359.254.300.063.028.130.093.488.830.539.186.242.06\/
284− 3.318.457.928.725.368.447.417.075.673.617.723.940.025.940.705.343
285− .057.601.925.133.611.559.292.046.932.324.629.048.702
286− \/ \/
287− 1.701.670.760
288− \/347.698.068.472.453.194.464.038.059.283.550.210.118.689.128.761.6\/
289− 88.459.326.078
290− \/ \/
291− 0
292− ]
293− [1 20]
294− 1
295− 24
296− ]
297− ]
298− ]
276+> (mink [[20 21] 0 3] $~)
277+[%0 product=21]
278+```
279+
280+```
281+> (mink [[1 2] !=(!:(+(.)))] ,~)
282+[%2 trace=~[[~.spot [[1.685.027.454 1.702.060.386 20.241.306.789.072.368.304.935.424.358.627.395.315.601.229.215.400.789.787.861.332.606 0] [1 20] 1 24]]]]
299283```
300284
301285---
302286
303−## `++toon`
287+## `+$toon`
304288
305289Nock result, stack trace
306290
@@ -310,20 +294,30 @@ or failure with a stack trace (`%2`).
310294#### Source
311295
312296```hoon
313− ++ toon $% [$0 p=*] :: success
314− [$1 p=(list)] :: blocks
315− [$2 p=(list tank)] :: stack trace
316− ==
297++$ toon $% [%0 p=*] :: success
298+ [%1 p=*] :: block
299+ [%2 p=(list tank)] :: stack trace
300+ == ::
317301```
318302
319303#### Examples
320304
321305```
322− > (mock [[20 21] 0 3] $~)
323− [%0 p=21]
306+> (mock [[20 21] 0 3] $~)
307+[%0 p=21]
308+```
324309
325− > (mock [[1 2] !=(!:(+(.)))] ,~)
326− [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
310+```
311+> (mock [[1 2] !=(!:(+(.)))] ,~)
312+[ %2
313+ p
314+ ~[
315+ [ %rose
316+ p=[p=":" q="" r=""]
317+ q=[i=[%rose p=[p="/" q="/" r=""] q=[i=[%leaf p="~zod"] t=[i=[%leaf p="base"] t=[i=[%leaf p="~2021.10.16..10.03.16..59ee"] t=~]]]] t=[i=[%leaf p="<[1 20].[1 24]>"] t=~]]
318+ ]
319+ ]
320+]
327321```
328322
329323---
@@ -332,34 +326,30 @@ or failure with a stack trace (`%2`).
332326
333327Product from edge
334328
335−Pull result out of a `++edge`, or crash if there's no result.
329+Pull result out of a [`$edge`](#edge), or crash if there's no result.
336330
337331#### Source
338332
339333```hoon
340− ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq))
334+++ wonk =+ veq=$:edge
335+ |@ ++ $ ?~(q.veq !! p.u.q.veq)
336+ --
341337```
342338
343339#### Examples
344340
345341```
346− > (wide:vast [1 1] "(add 2 2)")
347− [ p=[p=1 q=10]
348− q
349− [ ~
350− u
351− [ p=[%cnhp p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
352− q=[p=[p=1 q=10] q=""]
353− ]
354− ]
355− ]
342+> (wide:vast [1 1] "(add 2 2)")
343+[p=[p=1 q=10] q=[~ [p=[%cncl p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]] q=[p=[p=1 q=10] q=""]]]]
344+```
356345
357− > (wonk (wide:vast [1 1] "(add 2 2)"))
358− [%cnhp p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
346+```
347+> (wonk (wide:vast [1 1] "(add 2 2)"))
348+[%cncl p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
359349```
360350
361351#### Discussion
362352
363−See also: `++edge`
353+See also: [`$edge`](#edge)
364354
365355---
content/docs/hoon/reference/stdlib/table-of-contents.md+39−34
@@ -99,7 +99,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
9999<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
100100<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
101101<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
102−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#coin' title="Nounliteral syntax cases"><code>++coin</code></a>
102+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#coin' title="Nounliteral syntax cases"><code>+$coin</code></a>
103103<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#col' title="Parse : (col)"><code>++col</code></a>
104104<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#cold' title="Replace with constant"><code>++cold</code></a>
105105<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#com' title="Parse , (com)"><code>++com</code></a>
@@ -138,7 +138,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
138138<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#digby' title="Address of key (map)"><code>++dig:by</code></a>
139139<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#digin' title="Address of a in set"><code>++dig:in</code></a>
140140<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#dimag' title="Parse decimal number"><code>++dim:ag</code></a>
141−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#dime' title="Auraatom pair"><code>++dime</code></a>
141+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#dime' title="Auraatom pair"><code>+$dime</code></a>
142142<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#dinre' title="(Undocumented)"><code>++din:re</code></a>
143143<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#dis' title="Binary AND (atoms)"><code>++dis</code></a>
144144<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#dit' title="Decimal digit"><code>++dit</code></a>
@@ -172,7 +172,8 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
172172<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#eadfl' title="Exact add"><code>++ead:fl</code></a>
173173<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#each' title="Mold of fork between two types"><code>++each</code></a>
174174<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#easy' title="Always parse"><code>++easy</code></a>
175−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#edge' title="Parsing location metadata"><code>++edge</code></a>
175+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#edge' title="Parsing location metadata"><code>+$edge</code></a>
176+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#effob' title="murmur3-based pseudorandom function"><code>++eff:ob</code></a>
176177<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#egcd' title="Extended Euclidean algorithm"><code>++egcd</code></a>
177178<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#emnfl' title="Minimum exponent"><code>++emn:fl</code></a>
178179<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#emufl' title="Exact multiply"><code>++emu:fl</code></a>
@@ -200,9 +201,12 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
200201<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#fas' title="Parse / (fas)"><code>++fas</code></a>
201202<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fe' title="Modulo bloq"><code>++fe</code></a>
202203<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#fedag' title="Parse @p"><code>++fed:ag</code></a>
203−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feenob' title="Conceal structure v2"><code>++feen:ob</code></a>
204−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fendob' title="Restore structure v2"><code>++fend:ob</code></a>
205−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ficeob' title="Feistellike cipher"><code>++fice:ob</code></a>
204+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feob' title="Internal function to +fee"><code>++fe:ob</code></a>
205+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feeob' title="Feistel cipher Fe in B&R (2002)"><code>++fee:ob</code></a>
206+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feenob' title="Reverse +fee"><code>++feen:ob</code></a>
207+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feinob' title="Conceal structure v3"><code>++fein:ob</code></a>
208+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feisob' title="Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1]"><code>++feis:ob</code></a>
209+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fenob' title="Reverse +fe"><code>++fen:ob</code></a>
206210<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fil' title="Fill bloqstream"><code>++fil</code></a>
207211<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
208212<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
@@ -224,6 +228,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
224228<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
225229<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#full' title="Parse to end"><code>++full</code></a>
226230<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#funk' title="Add to tape"><code>++funk</code></a>
231+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fyndob' title="Restore structure v3"><code>++fynd:ob</code></a>
227232
228233### g
229234
@@ -272,7 +277,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
272277
273278### h
274279
275−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
280+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>+$hair</code></a>
276281<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
277282<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
278283<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
@@ -420,7 +425,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
420425
421426### n
422427
423−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>++nail</code></a>
428+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>+$nail</code></a>
424429<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#napto' title="Remove head of queue"><code>++nap:to</code></a>
425430<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ne' title="Digit rendering engine"><code>++ne</code></a>
426431<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#nedfl' title="Require float"><code>++ned:fl</code></a>
@@ -461,7 +466,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
461466<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pevab' title="Parse <=5 in base 32"><code>++pev:ab</code></a>
462467<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pewab' title="Parse <= 5 in base 64"><code>++pew:ab</code></a>
463468<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#pfix' title="Discard first rule"><code>++pfix</code></a>
464−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>++pint</code></a>
469+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>+$pint</code></a>
465470<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pivab' title="Parse 5 digits in base 32"><code>++piv:ab</code></a>
466471<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#piwab' title="Parse 5 digits in base 64"><code>++piw:ab</code></a>
467472<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#plug' title="Parse to tuple"><code>++plug</code></a>
@@ -535,11 +540,10 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
535540<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#rub' title="Lengthdecode"><code>++rub</code></a>
536541<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rubat' title="(Undocumented)"><code>++rub:at</code></a>
537542<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rudat' title="(Undocumented)"><code>++rud:at</code></a>
538−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>++rule</code></a>
543+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>+$rule</code></a>
539544<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rumat' title="(Undocumented)"><code>++rum:at</code></a>
540545<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#runby' title="Transform values (map)"><code>++run:by</code></a>
541546<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#runin' title="Apply gate to set"><code>++run:in</code></a>
542−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#rundob' title="Reverse single Feistellike"><code>++rund:ob</code></a>
543547<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#runt' title="Prepend n times"><code>++runt</code></a>
544548<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rupat' title="(Undocumented)"><code>++rup:at</code></a>
545549<a class="tooltip" href='/docs/hoon/reference/stdlib/4g/#rush' title="Parse or null"><code>++rush</code></a>
@@ -547,7 +551,6 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
547551<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#rutby' title="Transform nodes (map)"><code>++rut:by</code></a>
548552<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#ruvat' title="(Undocumented)"><code>++ruv:at</code></a>
549553<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#ruxat' title="(Undocumented)"><code>++rux:at</code></a>
550−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ryndob' title="Reverse Feistellike cipher"><code>++rynd:ob</code></a>
551554
552555### s
553556
@@ -642,7 +645,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
642645<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#spdfl' title="Produce smallest denormalized float"><code>++spd:fl</code></a>
643646<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spin' title="Gate to list (with state)"><code>++spin</code></a>
644647<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#spnfl' title="Produce smallest normal float"><code>++spn:fl</code></a>
645−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>++spot</code></a>
648+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>+$spot</code></a>
646649<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#spud' title="Render path as tape"><code>++spud</code></a>
647650<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spun' title="Gate to list (with state)"><code>++spun</code></a>
648651<a class="tooltip" href='/docs/hoon/reference/stdlib/2g/#sqt' title="Compute square root with remainder"><code>++sqt</code></a>
@@ -702,7 +705,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
702705<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tec' title="Parse ` (tec)"><code>++tec</code></a>
703706<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tedab' title="Parse decimal number with <= 3 digits"><code>++ted:ab</code></a>
704707<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#teff' title="UTF8 length"><code>++teff</code></a>
705−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#teilob' title="Reverse Feistellike cipher"><code>++teil:ob</code></a>
708+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#tailob' title="Reverse +feis"><code>++tail:ob</code></a>
706709<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>+$term</code></a>
707710<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
708711<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tidab' title="Parse 3 decimal digits"><code>++tid:ab</code></a>
@@ -721,8 +724,8 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
721724<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirs' title="Round singleprecision float to nearest signed integer"><code>++toi:rs</code></a>
722725<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirq' title="Round quadprecision float to nearest signed integer"><code>++toi:rq</code></a>
723726<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tojfl' title="Round unsigned and signed integer to float"><code>++toj:fl</code></a>
724−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#tone' title="Nock result (error report)"><code>++tone</code></a>
725−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>++toon</code></a>
727+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#tone' title="Nock result (error report)"><code>+$tone</code></a>
728+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>+$toon</code></a>
726729<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#topto' title="Produce head of queue"><code>++top:to</code></a>
727730<a class="tooltip" href='/docs/hoon/reference/stdlib/4a/#tospo' title="Fetch prefix"><code>++tos:po</code></a>
728731<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tosrh' title="Convert halfprecision float to singleprecision float"><code>++tos:rh</code></a>
@@ -1372,14 +1375,16 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
13721375### 3f: scrambling
13731376
13741377<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ob' title="Reversible scrambling v2"><code>++ob</code></a>
1375−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feenob' title="Conceal structure v2"><code>++feen:ob</code></a>
1376−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fendob' title="Restore structure v2"><code>++fend:ob</code></a>
1377−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ficeob' title="Feistellike cipher"><code>++fice:ob</code></a>
1378+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feinob' title="Conceal structure v3"><code>++fein:ob</code></a>
1379+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fyndob' title="Restore structure v3"><code>++fynd:ob</code></a>
1380+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feisob' title="Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1]"><code>++feis:ob</code></a>
13781381<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#rakuob' title="Key list"><code>++raku:ob</code></a>
1379−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#rundob' title="Reverse single Feistellike"><code>++rund:ob</code></a>
1380−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ryndob' title="Reverse Feistellike cipher"><code>++rynd:ob</code></a>
1381−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#teilob' title="Reverse Feistellike cipher"><code>++teil:ob</code></a>
1382−
1382+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#tailob' title="Reverse +feis"><code>++tail:ob</code></a>
1383+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feeob' title="Feistel cipher Fe in B&R (2002)"><code>++fee:ob</code></a>
1384+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feenob' title="Reverse +fee"><code>++feen:ob</code></a>
1385+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feob' title="Internal function to +fee"><code>++fe:ob</code></a>
1386+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fenob' title="Reverse +fe"><code>++fen:ob</code></a>
1387+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#effob' title="murmur3-based pseudorandom function"><code>++eff:ob</code></a>
13831388<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#un' title="Reversible scrambling"><code>++un</code></a>
13841389<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#wredun' title="Restore structure"><code>++wred:un</code></a>
13851390<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#wrenun' title="Conceal structure"><code>++wren:un</code></a>
@@ -1392,17 +1397,17 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
13921397
13931398### 3g: molds and mold builders
13941399
1395−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#coin' title="Nounliteral syntax cases"><code>++coin</code></a>
1396−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#dime' title="Auraatom pair"><code>++dime</code></a>
1397−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#edge' title="Parsing location metadata"><code>++edge</code></a>
1398−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>++hair</code></a>
1400+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#coin' title="Nounliteral syntax cases"><code>+$coin</code></a>
1401+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#dime' title="Auraatom pair"><code>+$dime</code></a>
1402+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#edge' title="Parsing location metadata"><code>+$edge</code></a>
1403+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>+$hair</code></a>
13991404<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#like' title="Generic edge"><code>++like</code></a>
1400−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>++nail</code></a>
1401−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>++pint</code></a>
1402−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>++rule</code></a>
1403−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>++spot</code></a>
1404−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#tone' title="Nock result (error report)"><code>++tone</code></a>
1405−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>++toon</code></a>
1405+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#nail' title="Location, remainder of parsed text"><code>+$nail</code></a>
1406+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#pint' title="Parsing range"><code>+$pint</code></a>
1407+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#rule' title="Parsing rule (match this with _)"><code>+$rule</code></a>
1408+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#spot' title="Stack trace line"><code>+$spot</code></a>
1409+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#tone' title="Nock result (error report)"><code>+$tone</code></a>
1410+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>+$toon</code></a>
14061411<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#wonk' title="Product from edge"><code>++wonk</code></a>
14071412
14081413### 4a: exotic bases
@@ -1716,7 +1721,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
17161721<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#span' title="ASCII atom"><code>++span</code></a>
17171722<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tiki' title="(Undocumented)"><code>++tiki</code></a>
17181723<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#toga' title="Tree of faces"><code>++toga</code></a>
1719−<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tone'><code>++tone</code></a>
1724+<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tone'><code>+$tone</code></a>
17201725<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tuna' title="XML template tree"><code>++tuna</code></a>
17211726<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tusk' title="List of expressions"><code>++tusk</code></a>
17221727<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tyke' title="List of 'maybe' hoons"><code>++tyke</code></a>
lib/glossary.js+45−24
@@ -2431,6 +2431,13 @@ export const glossary = [
24312431 slug: "https://urbit.org/docs/reference/library/3g/#edge",
24322432 desc: "Used in the Hoon standard library.",
24332433 },
2434+ {
2435+ name: "murmur3-based pseudorandom function",
2436+ symbol: "eff:ob",
2437+ usage: "stdlib",
2438+ slug: "https://urbit.org/docs/reference/library/3f/#effob",
2439+ desc: "Used in the Hoon standard library.",
2440+ },
24342441 {
24352442 name: "Extended Euclidean algorithm",
24362443 symbol: "egcd",
@@ -2600,24 +2607,52 @@ export const glossary = [
26002607 desc: "Used in the Hoon standard library.",
26012608 },
26022609 {
2603− name: "Conceal structure v2",
2610+ name: "Internal function to +fee",
2611+ symbol: "fe:ob",
2612+ usage: "stdlib",
2613+ slug: "https://urbit.org/docs/reference/library/3f/#feob",
2614+ desc: "Used in the Hoon standard library.",
2615+ },
2616+ {
2617+ name: "Feistel cipher Fe in B&R (2002)",
2618+ symbol: "fee:ob",
2619+ usage: "stdlib",
2620+ slug: "https://urbit.org/docs/reference/library/3f/#feeob",
2621+ desc: "Used in the Hoon standard library.",
2622+ },
2623+ {
2624+ name: "Reverse +fee",
26042625 symbol: "feen:ob",
26052626 usage: "stdlib",
26062627 slug: "https://urbit.org/docs/reference/library/3f/#feenob",
26072628 desc: "Used in the Hoon standard library.",
26082629 },
26092630 {
2610− name: "Restore structure v2",
2611− symbol: "fend:ob",
2631+ name: "Conceal structure v3",
2632+ symbol: "fein:ob",
2633+ usage: "stdlib",
2634+ slug: "https://urbit.org/docs/reference/library/3f/#feinob",
2635+ desc: "Used in the Hoon standard library.",
2636+ },
2637+ {
2638+ name: "Reverse +fe",
2639+ symbol: "fen:ob",
26122640 usage: "stdlib",
2613− slug: "https://urbit.org/docs/reference/library/3f/#fendob",
2641+ slug: "https://urbit.org/docs/reference/library/3f/#fenob",
26142642 desc: "Used in the Hoon standard library.",
26152643 },
26162644 {
2617− name: "Feistel-like cipher",
2618− symbol: "fice:ob",
2645+ name: "Restore structure v3",
2646+ symbol: "fynd:ob",
26192647 usage: "stdlib",
2620− slug: "https://urbit.org/docs/reference/library/3f/#ficeob",
2648+ slug: "https://urbit.org/docs/reference/library/3f/#fyndob",
2649+ desc: "Used in the Hoon standard library.",
2650+ },
2651+ {
2652+ name: "Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1]",
2653+ symbol: "feis:ob",
2654+ usage: "stdlib",
2655+ slug: "https://urbit.org/docs/reference/library/3f/#feisob",
26212656 desc: "Used in the Hoon standard library.",
26222657 },
26232658 {
@@ -4713,13 +4748,6 @@ export const glossary = [
47134748 slug: "https://urbit.org/docs/reference/library/2h/#runin",
47144749 desc: "Used in the Hoon standard library.",
47154750 },
4716− {
4717− name: "Reverse single Feistel-like",
4718− symbol: "rund:ob",
4719− usage: "stdlib",
4720− slug: "https://urbit.org/docs/reference/library/3f/#rundob",
4721− desc: "Used in the Hoon standard library.",
4722− },
47234751 {
47244752 name: "Prepend n times",
47254753 symbol: "runt",
@@ -4769,13 +4797,6 @@ export const glossary = [
47694797 slug: "https://urbit.org/docs/reference/library/4b/#ruxat",
47704798 desc: "Used in the Hoon standard library.",
47714799 },
4772− {
4773− name: "Reverse Feistel-like cipher",
4774− symbol: "rynd:ob",
4775− usage: "stdlib",
4776− slug: "https://urbit.org/docs/reference/library/3f/#ryndob",
4777− desc: "Used in the Hoon standard library.",
4778− },
47794800 {
47804801 name: "Identity (produces same value)",
47814802 symbol: "same",
@@ -5813,10 +5834,10 @@ export const glossary = [
58135834 desc: "Used in the Hoon standard library.",
58145835 },
58155836 {
5816− name: "Reverse Feistel-like cipher",
5817− symbol: "teil:ob",
5837+ name: "Reverse +feis",
5838+ symbol: "tail:ob",
58185839 usage: "stdlib",
5819− slug: "https://urbit.org/docs/reference/library/3f/#teilob",
5840+ slug: "https://urbit.org/docs/reference/library/3f/#tailob",
58205841 desc: "Used in the Hoon standard library.",
58215842 },
58225843 {