on master help sign in
Merge pull request #1218 from tinnus-napbus/update-stdlib-3a-to-3g
819df11tinnus-napbus
content/docs/hoon/reference/stdlib/3a.md+234−232
@@ -8,9 +8,9 @@ template = "doc.html"
8
8
9Extended Euclidean algorithm
9Extended Euclidean algorithm
10
10
11−Produces `d`, the
11+Produces `d`, the [greatest common
12−[greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor)
12+divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor) of `a` and `b`.
13−of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
13+Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
14
14
15#### Accepts
15#### Accepts
16
16
@@ -29,28 +29,28 @@ of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
29#### Source
29#### Source
30
30
31```hoon
31```hoon
32− ++ egcd
32+++ egcd
33− |= [a=@ b=@]
33+ |= [a=@ b=@]
34− =+ si
34+ =+ si
35− =+ [c=(sun a) d=(sun b)]
35+ =+ [c=(sun a) d=(sun b)]
36− =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
36+ =+ [u=[c=(sun 1) d=--0] v=[c=--0 d=(sun 1)]]
37− |- ^- [d=@ u=@s v=@s]
37+ |- ^- [d=@ u=@s v=@s]
38− ?: =(--0 c)
38+ ?: =(--0 c)
39− [(abs d) d.u d.v]
39+ [(abs d) d.u d.v]
40− =+ q=(fra d c)
40+ =+ q=(fra d c)
41− %= $
41+ %= $
42− c (dif d (pro q c))
42+ c (dif d (pro q c))
43− d c
43+ d c
44− u [(dif d.u (pro q c.u)) c.u]
44+ u [(dif d.u (pro q c.u)) c.u]
45− v [(dif d.v (pro q c.v)) c.v]
45+ v [(dif d.v (pro q c.v)) c.v]
46− ==
46+ ==
47```
47```
48
48
49#### Examples
49#### Examples
50
50
51```
51```
52− > (egcd 11 2)
52+> (egcd 11 2)
53− [d=1 u=--1 v=-5]
53+[d=1 u=--1 v=-5]
54```
54```
55
55
56---
56---
@@ -59,14 +59,18 @@ of `a` and `b`. Also produces `u` and `v` such that `au + bv = GCD(a, b)`.
59
59
60Modulo prime
60Modulo prime
61
61
62−Container core for modular arithmetic functions.
62+Container `door` for modular arithmetic functions.
63+
64+#### Accepts
65+
66+`a` is an atom
63
67
64#### Source
68#### Source
65
69
66```hoon
70```hoon
67− ++ fo
71+++ fo
68− ^?
72+ ^|
69− |_ a=@
73+ |_ a=@
70```
74```
71
75
72---
76---
@@ -79,7 +83,7 @@ Produces the difference between atoms `b` and `c`, with `a` as the modular base.
79
83
80#### Accepts
84#### Accepts
81
85
82−`a` is an atom.
86+`a` is an atom, and is the sample of `+fo`.
83
87
84`b` is an atom.
88`b` is an atom.
85
89
@@ -92,19 +96,19 @@ An atom.
92#### Source
96#### Source
93
97
94```hoon
98```hoon
95− ++ dif
99+++ dif
96− |= [b=@ c=@]
100+ |= [b=@ c=@]
97− (sit (sub (add a b) (sit c)))
101+ (sit (sub (add a b) (sit c)))
98```
102```
99
103
100#### Examples
104#### Examples
101
105
102```
106```
103− > (~(dif fo 6) 1 2)
107+> (~(dif fo 6) 1 2)
104− 5
108+5
105
109
106− > (~(dif fo 21) 11 45)
110+> (~(dif fo 21) 11 45)
107− 8
111+8
108```
112```
109
113
110---
114---
@@ -117,7 +121,7 @@ Produces the power of `c` raised to the `b`, with `a` as the modular base.
117
121
118#### Accepts
122#### Accepts
119
123
120−`a` is an atom.
124+`a` is an atom, and is the sample of `+fo`.
121
125
122`b` is an atom.
126`b` is an atom.
123
127
@@ -130,13 +134,13 @@ An atom.
130#### Source
134#### Source
131
135
132```hoon
136```hoon
133− ++ exp
137+++ exp
134− |= [b=@ c=@]
138+ |= [b=@ c=@]
135− ?: =(0 b)
139+ ?: =(0 b)
136− 1
140+ 1
137− =+ d=$(b (rsh 0 1 b))
141+ =+ d=$(b (rsh 0 b))
138− =+ e=(pro d d)
142+ =+ e=(pro d d)
139− ?:(=(0 (end 0 1 b)) e (pro c e))
143+ ?:(=(0 (end 0 b)) e (pro c e))
140```
144```
141
145
142#### Examples
146#### Examples
@@ -165,7 +169,7 @@ Produces the quotient of `b` divided by `c`, with `a` as the modular base.
165
169
166#### Accepts
170#### Accepts
167
171
168−`a` is an atom.
172+`a` is an atom, and is the sample of `+fo`.
169
173
170`b` is an atom.
174`b` is an atom.
171
175
@@ -175,34 +179,28 @@ Produces the quotient of `b` divided by `c`, with `a` as the modular base.
175
179
176An atom.
180An atom.
177
181
178−#### Accepts
179−
180−`a` is an atom.
181−
182−`b` is an atom.
183−
184#### Source
182#### Source
185
183
186```hoon
184```hoon
187− ++ fra
185+++ fra
188− |= [b=@ c=@]
186+ |= [b=@ c=@]
189− (pro b (inv c))
187+ (pro b (inv c))
190```
188```
191
189
192#### Examples
190#### Examples
193
191
194```
192```
195− > (~(fra fo 2) 8 2)
193+> (~(fra fo 2) 8 2)
196− 0
194+0
197
195
198− > (~(fra fo 3) 8 2)
196+> (~(fra fo 3) 8 2)
199− 1
197+1
200
198
201− > (~(fra fo 4) 8 2)
199+> (~(fra fo 4) 8 2)
202− 0
200+0
203
201
204− > (~(fra fo 5) 8 2)
202+> (~(fra fo 5) 8 2)
205− 4
203+4
206```
204```
207
205
208---
206---
@@ -212,11 +210,11 @@ An atom.
212Inverse
210Inverse
213
211
214Produces an atom by taking the signed modulus of `a` with the coefficient `u`;
212Produces 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`.
216
214
217#### Accepts
215#### Accepts
218
216
219−`a` is an atom.
217+`a` is an atom, and is the sample of `+fo`.
220
218
221`b` is an atom.
219`b` is an atom.
222
220
@@ -227,29 +225,29 @@ An atom.
227#### Source
225#### Source
228
226
229```hoon
227```hoon
230− ++ inv
228+++ inv
231− |= b=@
229+ |= b=@
232− =+ c=(dul:si u:(egcd b a) a)
230+ =+ c=(dul:si u:(egcd b a) a)
233− c
231+ c
234```
232```
235
233
236#### Examples
234#### Examples
237
235
238```
236```
239− > (~(inv fo 11) 2)
237+> (~(inv fo 11) 2)
240− 6
238+6
241
239
242− > (~(inv fo 71) 255)
240+> (~(inv fo 71) 255)
243− 22
241+22
244
242
245− > (~(inv fo 79) 255)
243+> (~(inv fo 79) 255)
246− 22
244+22
247
245
248− > (~(inv fo 78) 255)
246+> (~(inv fo 78) 255)
249− 67
247+67
250
248
251− > (~(inv fo 70) 255)
249+> (~(inv fo 70) 255)
252− 67
250+67
253```
251```
254
252
255---
253---
@@ -262,7 +260,7 @@ Produces the multiplication of `b` and `c` modulo `a`.
262
260
263#### Accepts
261#### Accepts
264
262
265−`a` is an atom.
263+`a` is an atom, and is the sample of `+fo`.
266
264
267`b` is an atom.
265`b` is an atom.
268
266
@@ -275,19 +273,19 @@ An atom.
275#### Source
273#### Source
276
274
277```hoon
275```hoon
278− ++ pro
276+++ pro
279− |= [b=@ c=@]
277+ |= [b=@ c=@]
280− (sit (mul b c))
278+ (sit (mul b c))
281```
279```
282
280
283#### Examples
281#### Examples
284
282
285```
283```
286− > (~(pro fo 3) 11 4)
284+> (~(pro fo 3) 11 4)
287− 2
285+2
288
286
289− > (mod 44 3)
287+> (mod 44 3)
290− 2
288+2
291```
289```
292
290
293---
291---
@@ -300,7 +298,7 @@ Produces the remainder of `b` modulo `a`.
300
298
301#### Accepts
299#### Accepts
302
300
303−`a` is an atom.
301+`a` is an atom, and is the sample of `+fo`.
304
302
305`b` is an atom.
303`b` is an atom.
306
304
@@ -311,16 +309,16 @@ An atom.
311#### Source
309#### Source
312
310
313```hoon
311```hoon
314− ++ sit
312+++ sit
315− |= b=@
313+ |= b=@
316− (mod b a)
314+ (mod b a)
317```
315```
318
316
319#### Examples
317#### Examples
320
318
321```
319```
322− > (~(sit fo 3) 14)
320+> (~(sit fo 3) 14)
323− 2
321+2
324```
322```
325
323
326---
324---
@@ -333,7 +331,7 @@ Produces the remainder of `(b + c) mod a`.
333
331
334#### Accepts
332#### Accepts
335
333
336−`a` is an atom.
334+`a` is an atom, and is the sample of `+fo`.
337
335
338`b` is an atom.
336`b` is an atom.
339
337
@@ -346,20 +344,19 @@ An atom.
346#### Source
344#### Source
347
345
348```hoon
346```hoon
349− ++ sum
347+++ sum
350− |= [b=@ c=@]
348+ |= [b=@ c=@]
351− (sit (add b c))
349+ (sit (add b c))
352− --
353```
350```
354
351
355#### Examples
352#### Examples
356
353
357```
354```
358− > (~(sum fo 3) 14 3)
355+> (~(sum fo 3) 14 3)
359− 2
356+2
360
357
361− > (mod 17 3)
358+> (mod 17 3)
362− 2
359+2
363```
360```
364
361
365---
362---
@@ -373,9 +370,9 @@ Container core for signed integer functions.
373#### Source
370#### Source
374
371
375```hoon
372```hoon
376− ++ si
373+++ si
377− ^?
374+ ^?
378− |%
375+ |%
379```
376```
380
377
381#### Discussion
378#### Discussion
@@ -390,15 +387,17 @@ signed integers correspond to odd atoms of twice their absolute value minus
390one. For example:
387one. For example:
391
388
392```
389```
393− > `@`--4
390+> `@`--4
394− 8
391+8
395− > `@s`8
392+> `@s`8
396− --4
393+--4
394+```
397
395
396+```
398− > `@`-4
397+> `@`-4
399− 7
398+7
400− > `@s`7
399+> `@s`7
401− -4
400+-4
402```
401```
403
402
404---
403---
@@ -420,17 +419,17 @@ An atom.
420#### Source
419#### Source
421
420
422```hoon
421```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)))
424```
423```
425
424
426#### Examples
425#### Examples
427
426
428```
427```
429− > (abs:si -11)
428+> (abs:si -11)
430− 11
429+11
431
430
432− > (abs:si --520)
431+> (abs:si --520)
433− 520
432+520
434```
433```
435
434
436---
435---
@@ -454,18 +453,18 @@ A signed integer.
454#### Source
453#### Source
455
454
456```hoon
455```hoon
457− ++ dif |= [a=@s b=@s]
456+++ dif |= [a=@s b=@s]
458− (sum a (new !(syn b) (abs b)))
457+ (sum a (new !(syn b) (abs b)))
459```
458```
460
459
461#### Examples
460#### Examples
462
461
463```
462```
464− > (dif:si --3 -2)
463+> (dif:si --3 -2)
465− --5
464+--5
466
465
467− > (dif:si -3 --2)
466+> (dif:si -3 --2)
468− -5
467+-5
469```
468```
470
469
471---
470---
@@ -489,23 +488,23 @@ An atom.
489#### Source
488#### Source
490
489
491```hoon
490```hoon
492− ++ dul |= [a=@s b=@]
491+++ dul |= [a=@s b=@]
493− =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c)))
492+ =+(c=(old a) ?:(-.c (mod +.c b) (sub b +.c)))
494```
493```
495
494
496#### Examples
495#### Examples
497
496
498```
497```
499− > `@s`(dul:si -1 --5)
498+> `@s`(dul:si -1 --5)
500− -5
499+-5
501
500
502− > `@`--5
501+> `@`--5
503− 10
502+10
504− > `@s`(dul:si -1 10)
503+> `@s`(dul:si -1 10)
505− -5
504+-5
506
505
507− > `@s`(dul:si -11 -61)
506+> `@s`(dul:si -11 -61)
508− --55
507+--55
509```
508```
510
509
511---
510---
@@ -529,28 +528,28 @@ A signed atom.
529#### Source
528#### Source
530
529
531```hoon
530```hoon
532− ++ fra |= [a=@s b=@s]
531+++ fra |= [a=@s b=@s]
533− (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
532+ (new =(0 (mix (syn a) (syn b))) (div (abs a) (abs b)))
534```
533```
535
534
536#### Examples
535#### Examples
537
536
538```
537```
539− > (fra:si -1 -1)
538+> (fra:si -1 -1)
540− --1
539+--1
541
540
542− > (fra:si -11 --2)
541+> (fra:si -11 --2)
543− -5
542+-5
544
543
545− > (fra:si -0 -1)
544+> (fra:si -0 -1)
546− --0
545+--0
547```
546```
548
547
549---
548---
550
549
551### `++new:si`
550### `++new:si`
552
551
553−Atom to @s
552+Atom to `@s`
554
553
555Produces a signed integer from an atom `b`. The product's sign is determined
554Produces a signed integer from an atom `b`. The product's sign is determined
556by the value of flag `a`: `&` will result in a prepending `--`, and `|` will
555by the value of flag `a`: `&` will result in a prepending `--`, and `|` will
@@ -569,24 +568,24 @@ A signed integer.
569#### Source
568#### Source
570
569
571```hoon
570```hoon
572− ++ new |= [a=? b=@]
571+++ new |= [a=? b=@]
573− `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b)))))
572+ `@s`?:(a (mul 2 b) ?:(=(0 b) 0 +((mul 2 (dec b)))))
574```
573```
575
574
576#### Examples
575#### Examples
577
576
578```
577```
579− > (new:si | 2)
578+> (new:si | 2)
580− -2
579+-2
581
580
582− > (new:si & 2)
581+> (new:si & 2)
583− --2
582+--2
584
583
585− > (new:si & -2)
584+> (new:si & -2)
586− --3
585+--3
587
586
588− > (new:si & --2)
587+> (new:si & --2)
589− --4
588+--4
590```
589```
591
590
592---
591---
@@ -604,7 +603,7 @@ positive or negative, and the absolute value of `a`.
604
603
605#### Produces
604#### Produces
606
605
607−A cell composed of a `term` and an atom.
606+A cell composed of a `?` and an atom.
608
607
609#### Source
608#### Source
610
609
@@ -612,14 +611,18 @@ A cell composed of a `term` and an atom.
612 ++ old |=(a=@s [(syn a) (abs a)])
611 ++ old |=(a=@s [(syn a) (abs a)])
613```
612```
614
613
614+```hoon
615+++ old |=(a=@s [(syn a) (abs a)])
616+```
617+
615#### Examples
618#### Examples
616
619
617```
620```
618− > (old:si -2)
621+> (old:si -2)
619− [%.n 2]
622+[%.n 2]
620
623
621− > (old:si --2)
624+> (old:si --2)
622− [%.y 2]
625+[%.y 2]
623```
626```
624
627
625---
628---
@@ -639,18 +642,18 @@ Produces a signed integer by multiplying `a` and `b`.
639#### Source
642#### Source
640
643
641```hoon
644```hoon
642− ++ pro |= [a=@s b=@s]
645+++ pro |= [a=@s b=@s]
643− (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
646+ (new =(0 (mix (syn a) (syn b))) (mul (abs a) (abs b)))
644```
647```
645
648
646#### Examples
649#### Examples
647
650
648```
651```
649− > (pro:si -3 -3)
652+> (pro:si -3 -3)
650− --9
653+--9
651
654
652− > (pro:si -3 --3)
655+> (pro:si -3 --3)
653− -9
656+-9
654```
657```
655
658
656---
659---
@@ -674,23 +677,23 @@ A signed integer.
674#### Source
677#### Source
675
678
676```hoon
679```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))))
678```
681```
679
682
680#### Examples
683#### Examples
681
684
682```
685```
683− > (rem:si -17 -3)
686+> (rem:si -17 -3)
684− -2
687+-2
685
688
686− > (rem:si --17 -3)
689+> (rem:si --17 -3)
687− --2
690+--2
688
691
689− > (rem:si -17 --3)
692+> (rem:si -17 --3)
690− -2
693+-2
691
694
692− > (rem:si --17 --3)
695+> (rem:si --17 --3)
693− --2
696+--2
694```
697```
695
698
696---
699---
@@ -714,36 +717,36 @@ A signed integer.
714#### Source
717#### Source
715
718
716```hoon
719```hoon
717− ++ sum |= [a=@s b=@s]
720+++ sum |= [a=@s b=@s]
718− =+ [c=(old a) d=(old b)]
721+ =+ [c=(old a) d=(old b)]
719− ?: -.c
722+ ?: -.c
720− ?: -.d
723+ ?: -.d
721− (new & (add +.c +.d))
724+ (new & (add +.c +.d))
722− ?: (gte +.c +.d)
725+ ?: (gte +.c +.d)
723− (new & (sub +.c +.d))
726+ (new & (sub +.c +.d))
724− (new | (sub +.d +.c))
727+ (new | (sub +.d +.c))
725− ?: -.d
728+ ?: -.d
726− ?: (gte +.c +.d)
729+ ?: (gte +.c +.d)
727− (new | (sub +.c +.d))
730+ (new | (sub +.c +.d))
728− (new & (sub +.d +.c))
731+ (new & (sub +.d +.c))
729− (new | (add +.c +.d))
732+ (new | (add +.c +.d))
730```
733```
731
734
732#### Examples
735#### Examples
733
736
734```
737```
735− > (sum:si -11 --2)
738+> (sum:si -11 --2)
736− -9
739+-9
737
740
738− > (sum:si --2 --2)
741+> (sum:si --2 --2)
739− --4
742+--4
740```
743```
741
744
742---
745---
743
746
744### `++sun:si`
747### `++sun:si`
745
748
746−@u to @s
749+`@u` to `@s`
747
750
748Multiplies the unsigned integer `a` by two, producing an atom.
751Multiplies the unsigned integer `a` by two, producing an atom.
749
752
@@ -758,29 +761,29 @@ An atom.
758#### Source
761#### Source
759
762
760```hoon
763```hoon
761− ++ sun |=(a=@u (mul 2 a))
764+++ sun |=(a=@u (mul 2 a))
762```
765```
763
766
764#### Examples
767#### Examples
765
768
766```
769```
767− > (sun:si 90)
770+> (sun:si 90)
768− 180
771+180
769
772
770− > (sun:si --90)
773+> (sun:si --90)
771− 360
774+360
772− > `@u`--90
775+> `@u`--90
773− 180
776+180
774
777
775− > (sun:si --89)
778+> (sun:si --89)
776− 356
779+356
777− > `@u`--89
780+> `@u`--89
778− 178
781+178
779
782
780− > (sun:si -89)
783+> (sun:si -89)
781− 354
784+354
782− > `@u`-89
785+> `@u`-89
783− 177
786+177
784```
787```
785
788
786---
789---
@@ -798,22 +801,22 @@ is positive, and `%.n` is produced if `a` is negative.
798
801
799#### Produces
802#### Produces
800
803
801−An `term`.
804+A `?`.
802
805
803#### Source
806#### Source
804
807
805```hoon
808```hoon
806− ++ syn |=(a=@s =(0 (end 0 1 a)))
809+++ syn |=(a=@s =(0 (end 0 a)))
807```
810```
808
811
809#### Examples
812#### Examples
810
813
811```
814```
812− > (syn:si -2)
815+> (syn:si -2)
813− %.n
816+%.n
814
817
815− > (syn:si --2)
818+> (syn:si --2)
816− %.y
819+%.y
817```
820```
818
821
819---
822---
@@ -839,41 +842,40 @@ A signed integer.
839#### Source
842#### Source
840
843
841```hoon
844```hoon
842− ++ cmp |= [a=@s b=@s]
845+++ cmp |= [a=@s b=@s]
843− ^- @s
846+ ^- @s
844− ?: =(a b)
847+ ?: =(a b)
845− --0
848+ --0
846− ?: (syn a)
849+ ?: (syn a)
847− ?: (syn b)
850+ ?: (syn b)
848− ?: (gth a b)
849− --1
850− -1
851− --1
852− ?: (syn b)
853− -1
854− ?: (gth a b)
851+ ?: (gth a b)
855− -1
856 --1
852 --1
853+ -1
857− --
854+ --1
855+ ?: (syn b)
856+ -1
857+ ?: (gth a b)
858+ -1
859+ --1
858```
860```
859
861
860#### Examples
862#### Examples
861
863
862```
864```
863− > (cmp:si -2 --1)
865+> (cmp:si -2 --1)
864− -1
866+-1
865
867
866− > (cmp:si -2 --1)
868+> (cmp:si -2 --1)
867− -1
869+-1
868
870
869− > (cmp:si --2 --1)
871+> (cmp:si --2 --1)
870− --1
872+--1
871
873
872− > (cmp:si --2 --2)
874+> (cmp:si --2 --2)
873− --0
875+--0
874
876
875− > (cmp:si --2 --5)
877+> (cmp:si --2 --5)
876− -1
878+-1
877```
879```
878
880
879---
881---
content/docs/hoon/reference/stdlib/3b.md+1384−1390
@@ -11,37 +11,37 @@ Float
11A mold for the floating-point arithmetic using the base of two, the formula is
11A mold for the floating-point arithmetic using the base of two, the formula is
12`(-1)^s * a * 2^e`.
12`(-1)^s * a * 2^e`.
13
13
14−Produces either a float (`$f`), an infinity of other sign (`$i`),
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
15+or not-a-number (`%n`). `s` refers to sign, the `flag`s `&` or `|`; `e` to
16exponent, a signed decimal; and `a` to the significand, an unsigned integer.
16exponent, a signed decimal; and `a` to the significand, an unsigned integer.
17
17
18#### Source
18#### Source
19
19
20```hoon
20```hoon
21− ++ fn
21+++ fn
22− $% [$f s=? e=@s a=@u]
22+ $% [%f s=? e=@s a=@u]
23− [$i s=?]
23+ [%i s=?]
24− [$n ~]
24+ [%n ~]
25− ==
25+ ==
26```
26```
27
27
28#### Examples
28#### Examples
29
29
30```
30```
31− > *fn
31+> *fn
32− [%n ~]
32+[%n ~]
33
33
34− > (add:fl [%f & --33 2] [%f | --23 2])
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]
35+[%f s=%.y e=-79 a=10.374.452.512.267.829.421.849.019.032.797.184]
36
36
37− > (add:fl [%i &] [%i &])
37+> (add:fl [%i &] [%i &])
38− [%i s=%.y]
38+[%i s=%.y]
39
39
40− > (add:fl [%n ~] [%i |])
40+> (add:fl [%n ~] [%i |])
41− [%n ~]
41+[%n ~]
42
42
43− > (sun:fl 961.193.554.848.514.048.973.893.027.381.506.219.443)
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]
44+[%f s=%.y e=--17 a=7.333.324.850.834.000.007.430.214.137.126.970]
45```
45```
46
46
47---
47---
@@ -53,29 +53,29 @@ Decimal float
53A mold for the floating-point arithmetic using the base of 10; the formula is
53A mold for the floating-point arithmetic using the base of 10; the formula is
54`(-1)^s * a *10^e`.
54`(-1)^s * a *10^e`.
55
55
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`).
57`s` refers to sign, the `flag`s `&` or `|`; `e` to exponent, a signed decimal;
57`s` refers to sign, the `flag`s `&` or `|`; `e` to exponent, a signed decimal;
58and `a` to the significand, an unsigned integer.
58and `a` to the significand, an unsigned integer.
59
59
60```hoon
60```hoon
61− ++ dn
61+++ dn
62− $% [$d s=? e=@s a=@u]
62+ $% [%d s=? e=@s a=@u]
63− [$i s=?]
63+ [%i s=?]
64− [$n ~]
64+ [%n ~]
65− ==
65+ ==
66```
66```
67
67
68#### Examples
68#### Examples
69
69
70```
70```
71− > `dn`[%d & --0 17.163.091.968]
71+> `dn`[%d & --0 17.163.091.968]
72− [%d s=%.y e=--0 a=17.163.091.968]
72+[%d s=%.y e=--0 a=17.163.091.968]
73
73
74− > `dn`[%i s=%.y]
74+> `dn`[%i s=%.y]
75− [%i s=%.y]
75+[%i s=%.y]
76
76
77− > `dn`[%n ~]
77+> `dn`[%n ~]
78− [%n ~]
78+[%n ~]
79```
79```
80
80
81---
81---
@@ -87,23 +87,24 @@ Parsed decimal float
87A mold for the floating-point arithmetic using the base of 10; the formula is
87A mold for the floating-point arithmetic using the base of 10; the formula is
88`(-1)^s * a *10^e`.
88`(-1)^s * a *10^e`.
89
89
90−Produces either a parsed float (`$d`), infinity of either sign (`$i`), or
90+Produces either a parsed float (`%d`), infinity of either sign (`%i`), or
91−not-a-number (`$n`).
91+not-a-number (`%n`).
92
92
93#### Source
93#### Source
94
94
95```hoon
95```hoon
96+++ rn
96− $% [$d a=? b=[c=@ [d=@ e=@] f=? i=@]]
97+ $% [%d a=? b=[c=@ [d=@ e=@] f=? i=@]]
97− [$i a=?]
98+ [%i a=?]
98− [$n ~]
99+ [%n ~]
99− ==
100+ ==
100```
101```
101
102
102#### Examples
103#### Examples
103
104
104```
105```
105− > `rn`[%d | [2 [3 4] | 17.163]]
106+> `rn`[%d | [2 [3 4] | 17.163]]
106− [%d a=%.n b=[c=2 [d=3 e=4] f=%.n i=17.163]]
107+[%d a=%.n b=[c=2 [d=3 e=4] f=%.n i=17.163]]
107```
108```
108
109
109---
110---
@@ -119,25 +120,25 @@ Container arm for floating-point arithmetic functions.
119- Minimum exponent (`v`): minimum value of e. Default is -16.494.
120- Minimum exponent (`v`): minimum value of e. Default is -16.494.
120- Width (`w`): Max value of `e` minus min value of `e`. 0 is for fixed-point.
121- Width (`w`): Max value of `e` minus min value of `e`. 0 is for fixed-point.
121 Default is 32.765.
122 Default is 32.765.
122−- Rounding mode (`r`): Possible modes are nearest (`$n`), up (`$u`),
123+- 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+ 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+- Behavior (`d`): return denormals (`%d`), flush denormals to zero (`%z`),
125− infinite exponent range (`$i`). Default value is `%d`.
126+ infinite exponent range (`%i`). Default value is `%d`.
126
127
127#### Source
128#### Source
128
129
129```hoon
130```hoon
130− ++ fl
131+++ fl
131− =+ ^- [[p=@u v=@s w=@u] r=$?($n $u $d $z $a) d=$?($d $f $i)]
132+ =/ [[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+ [[113 -16.494 32.765] %n %d]
133− =>
134+ =>
134− ~% %cofl +> ~
135+ ~% %cofl +> ~
135− |%
136+ |%
136```
137```
137
138
138---
139---
139
140
140−### `++rou:fl`
141+### `^rou:fl`
141
142
142Round
143Round
143
144
@@ -156,25 +157,25 @@ An `fn`.
156#### Source
157#### Source
157
158
158```hoon
159```hoon
159− ++ rou
160+++ rou
160− |= [a=[e=@s a=@u]] ^- fn (rau a &)
161+ |= [a=[e=@s a=@u]] ^- fn (rau a &)
161```
162```
162
163
163#### Examples
164#### Examples
164
165
165```
166```
166− > =a 10.161.487.211.429.486.882.397.572.894.294.017.777
167+> =a 10.161.487.211.429.486.882.397.572.894.294.017.777
167− > (^rou:fl [--12 a])
168+> (^rou:fl [--12 a])
168− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
169+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
169
170
170− > (^rou:fl [--12 (add a 1)])
171+> (^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]
172+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
172
173
173− > (^rou:fl [--12 (add a 300)])
174+> (^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]
175+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
175
176
176− > (^rou:fl [--12 (add a 1.000)])
177+> (^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]
178+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
178```
179```
179
180
180---
181---
@@ -200,29 +201,29 @@ An `fn`.
200#### Source
201#### Source
201
202
202```hoon
203```hoon
203− ++ rau
204+++ rau
204− |= [a=[e=@s a=@u] t=?] ^- fn
205+ |= [a=[e=@s a=@u] t=?] ^- fn
205− ?- r
206+ ?- r
206− $z (lug %fl a t) $d (lug %fl a t)
207+ %z (lug %fl a t) %d (lug %fl a t)
207− $a (lug %ce a t) $u (lug %ce a t)
208+ %a (lug %ce a t) %u (lug %ce a t)
208− $n (lug %ne a t)
209+ %n (lug %ne a t)
209− ==
210+ ==
210```
211```
211
212
212#### Examples
213#### Examples
213
214
214```
215```
215− > (rau:fl [-18 342.602.577] &)
216+> (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]
217+[%f s=%.y e=-102 a=6.626.897.619.228.945.634.459.505.846.648.832]
217```
218```
218
219
219#### Discussion
220#### Discussion
220
221
221−See `lug:fl` for possible rounding operations.
222+See [`lug:fl`](#lugfl) for possible rounding operations.
222
223
223---
224---
224
225
225−### `++add:fl`
226+### `^add:fl`
226
227
227Add
228Add
228
229
@@ -247,38 +248,38 @@ An `fn`.
247#### Source
248#### Source
248
249
249```hoon
250```hoon
250− ++ add
251+++ add
251− |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
252+ |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
252− =+ q=(dif:si e.a e.b)
253+ =+ q=(dif:si e.a e.b)
253− |- ?. (syn:si q) $(b a, a b, q +(q)) :: a has larger exp
254+ |- ?. (syn:si q) $(b a, a b, q +(q))
254− ?: e
255+ ?: e
255− [%f & e.b (^add (lsh 0 (abs:si q) a.a) a.b)]
256+ [%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+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
257− =+ ^= w %+ dif:si e.a %- sun:si :: expanded exp of a
258+ =+ ^= w %+ dif:si e.a %- sun:si
258− ?: (gth prc ma) (^sub prc ma) 0
259+ ?: (gth prc ma) (^sub prc ma) 0
259− =+ ^= x %+ sum:si e.b (sun:si mb) :: highest exp for b
260+ =+ ^= x %+ sum:si e.b (sun:si mb)
260− ?: =((cmp:si w x) --1) :: don't need to add
261+ ?: =((cmp:si w x) --1)
261− ?- r
262+ ?- r
262− $z (lug %fl a &) $d (lug %fl a &)
263+ %z (lug %fl a &) %d (lug %fl a &)
263− $a (lug %lg a &) $u (lug %lg a &)
264+ %a (lug %lg a &) %u (lug %lg a &)
264− $n (lug %na a &)
265+ %n (lug %na a &)
265− ==
266+ ==
266− (rou [e.b (^add (lsh 0 (abs:si q) a.a) a.b)])
267+ (rou [e.b (^add (lsh [0 (abs:si q)] a.a) a.b)])
267```
268```
268
269
269#### Examples
270#### Examples
270
271
271```
272```
272− > (^add:fl [--33 2.718] [--23 11] %.y)
273+> (^add:fl [--33 2.718] [--23 11] %.y)
273− [%f s=%.y e=--23 a=2.783.243]
274+[%f s=%.y e=--23 a=2.783.243]
274
275
275− > (^add:fl [--33 2.718] [--23 11] %.n)
276+> (^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]
277+[%f s=%.y e=-68 a=6.890.975.897.521.519.304.902.126.405.156.864]
277```
278```
278
279
279---
280---
280
281
281−### `++sub:fl`
282+### `^sub:fl`
282
283
283Subtract
284Subtract
284
285
@@ -300,42 +301,42 @@ An `fn`.
300#### Source
301#### Source
301
302
302```hoon
303```hoon
303− ++ sub
304+++ sub
304− |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
305+ |= [a=[e=@s a=@u] b=[e=@s a=@u] e=?] ^- fn
305− =+ q=(dif:si e.a e.b)
306+ =+ q=(dif:si e.a e.b)
306− |- ?. (syn:si q)
307+ |- ?. (syn:si q)
307− (fli $(b a, a b, q +(q), r swr))
308+ (fli $(b a, a b, q +(q), r swr))
308− =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
309+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
309− =+ ^= w %+ dif:si e.a %- sun:si
310+ =+ ^= w %+ dif:si e.a %- sun:si
310− ?: (gth prc ma) (^sub prc ma) 0
311+ ?: (gth prc ma) (^sub prc ma) 0
311− =+ ^= x %+ sum:si e.b (sun:si +(mb))
312+ =+ ^= x %+ sum:si e.b (sun:si +(mb))
312− ?: &(!e =((cmp:si w x) --1))
313+ ?: &(!e =((cmp:si w x) --1))
313− ?- r
314+ ?- r
314− $z (lug %sm a &) $d (lug %sm a &)
315+ %z (lug %sm a &) %d (lug %sm a &)
315− $a (lug %ce a &) $u (lug %ce a &)
316+ %a (lug %ce a &) %u (lug %ce a &)
316− $n (lug %nt a &)
317+ %n (lug %nt a &)
317− ==
318+ ==
318− =+ j=(lsh 0 (abs:si q) a.a)
319+ =+ j=(lsh [0 (abs:si q)] a.a)
319− |- ?. (gte j a.b)
320+ |- ?. (gte j a.b)
320− (fli $(a.b j, j a.b, r swr))
321+ (fli $(a.b j, j a.b, r swr))
321− =+ i=(^sub j a.b)
322+ =+ i=(^sub j a.b)
322− ?~ i [%f & zer]
323+ ?~ i [%f & zer]
323− ?: e [%f & e.b i] (rou [e.b i])
324+ ?: e [%f & e.b i] (rou [e.b i])
324```
325```
325
326
326#### Examples
327#### Examples
327
328
328```
329```
329− > (^sub:fl [--33 2.718] [--23 11] %.y)
330+> (^sub:fl [--33 2.718] [--23 11] %.y)
330− [%f s=%.y e=--23 a=2.783.221]
331+[%f s=%.y e=--23 a=2.783.221]
331
332
332− > (^sub:fl [--33 2.718] [--63 11] %.y)
333+> (^sub:fl [--33 2.718] [--63 11] %.y)
333− [%f s=%.n e=--33 a=11.811.157.346]
334+[%f s=%.n e=--33 a=11.811.157.346]
334```
335```
335
336
336---
337---
337
338
338−### `++mul:fl`
339+### `^mul:fl`
339
340
340Multiply
341Multiply
341
342
@@ -355,21 +356,21 @@ An `fn`.
355#### Source
356#### Source
356
357
357```hoon
358```hoon
358− ++ mul
359+++ mul
359− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
360+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
360− (rou (sum:si e.a e.b) (^mul a.a a.b))
361+ (rou (sum:si e.a e.b) (^mul a.a a.b))
361```
362```
362
363
363#### Examples
364#### Examples
364
365
365```
366```
366− > (^mul:fl [--3 2.718] [--23 11])
367+> (^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]
368+[%f s=%.y e=-72 a=9.475.054.411.405.900.661.487.108.108.582.912]
368```
369```
369
370
370---
371---
371
372
372−### `++div:fl`
373+### `^div:fl`
373
374
374Divide
375Divide
375
376
@@ -389,26 +390,26 @@ An `fn`.
389#### Source
390#### Source
390
391
391```hoon
392```hoon
392− ++ div
393+++ div
393− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
394+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- fn
394− =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
395+ =+ [ma=(met 0 a.a) mb=(met 0 a.b)]
395− =+ v=(dif:si (sun:si ma) (sun:si +((^add mb prc))))
396+ =+ v=(dif:si (sun:si ma) (sun:si +((^add mb prc))))
396− =. a ?: (syn:si v) a
397+ =. a ?: (syn:si v) a
397− a(e (sum:si v e.a), a (lsh 0 (abs:si v) a.a))
398+ 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+ =+ [j=(dif:si e.a e.b) q=(dvr a.a a.b)]
399− (rau [j p.q] =(q.q 0))
400+ (rau [j p.q] =(q.q 0))
400```
401```
401
402
402#### Examples
403#### Examples
403
404
404```
405```
405− > (^div:fl [--13 2.718] [--23 11])
406+> (^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]
407+[%f s=%.y e=-115 a=10.023.198.055.040.952.765.870.659.817.343.907]
407```
408```
408
409
409---
410---
410
411
411−### `++sqt:fl`
412+### `^sqt:fl`
412
413
413Square root
414Square root
414
415
@@ -425,28 +426,28 @@ An `fn`.
425#### Source
426#### Source
426
427
427```hoon
428```hoon
428− ++ sqt
429+++ sqt
429− |= [a=[e=@s a=@u]] ^- fn
430+ |= [a=[e=@s a=@u]] ^- fn
430− =. a
431+ =. a
431− =+ [w=(met 0 a.a) x=(^mul +(prc) 2)]
432+ =+ [w=(met 0 a.a) x=(^mul +(prc) 2)]
432− =+ ?:((^lth w x) (^sub x w) 0)
433+ =+ ?:((^lth w x) (^sub x w) 0)
433− =+ ?: =((dis - 1) (dis (abs:si e.a) 1)) -
434+ =+ ?: =((dis - 1) (dis (abs:si e.a) 1)) -
434− (^add - 1)
435+ (^add - 1)
435− a(e (dif:si e.a (sun:si -)), a (lsh 0 - a.a))
436+ 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+ =+ [y=(^sqt a.a) z=(fra:si e.a --2)]
437− (rau [z p.y] =(q.y 0))
438+ (rau [z p.y] =(q.y 0))
438```
439```
439
440
440#### Examples
441#### Examples
441
442
442```
443```
443− > (^sqt:fl [-18 342.602.577])
444+> (^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]
445+[%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
445```
446```
446
447
447---
448---
448
449
449−### `++lth:fl`
450+### `^lth:fl`
450
451
451Less than
452Less than
452
453
@@ -465,29 +466,29 @@ An `flag`.
465#### Source
466#### Source
466
467
467```hoon
468```hoon
468− ++ lth
469+++ lth
469− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
470+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
470− ?: =(e.a e.b) (^lth a.a a.b)
471+ ?: =(e.a e.b) (^lth a.a a.b)
471− =+ c=(cmp:si (ibl a) (ibl b))
472+ =+ c=(cmp:si (ibl a) (ibl b))
472− ?: =(c -1) & ?: =(c --1) |
473+ ?: =(c -1) & ?: =(c --1) |
473− ?: =((cmp:si e.a e.b) -1)
474+ ?: =((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 (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)
476+ (^lth (lsh [0 (abs:si (dif:si e.a e.b))] a.a) a.b)
476```
477```
477
478
478#### Examples
479#### Examples
479
480
480```
481```
481− > (^lth:fl [-4 684] [--0 35])
482+> (^lth:fl [-4 684] [--0 35])
482− %.n
483+%.n
483
484
484− > (^lth:fl [-4 684] [--0 90])
485+> (^lth:fl [-4 684] [--0 90])
485− %.y
486+%.y
486```
487```
487
488
488---
489---
489
490
490−### `++equ:fl`
491+### `^equ:fl`
491
492
492Equals
493Equals
493
494
@@ -506,22 +507,22 @@ A `flag`.
506#### Source
507#### Source
507
508
508```hoon
509```hoon
509− ++ equ
510+++ equ
510− |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
511+ |= [a=[e=@s a=@u] b=[e=@s a=@u]] ^- ?
511− ?. =((ibl a) (ibl b)) |
512+ ?. =((ibl a) (ibl b)) |
512− ?: =((cmp:si e.a e.b) -1)
513+ ?: =((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.b) a.a)
514− =((lsh 0 (abs:si (dif:si e.a e.b)) a.a) a.b)
515+ =((lsh [0 (abs:si (dif:si e.a e.b))] a.a) a.b)
515```
516```
516
517
517#### Examples
518#### Examples
518
519
519```
520```
520− > (^equ:fl [-4 480] [-0 50])
521+> (^equ:fl [-4 480] [-0 50])
521− %.n
522+%.n
522
523
523− > (^equ:fl [-4 480] [-0 30])
524+> (^equ:fl [-4 480] [-0 30])
524− %.y
525+%.y
525```
526```
526
527
527---
528---
@@ -544,16 +545,16 @@ A signed integer.
544#### Source
545#### Source
545
546
546```hoon
547```hoon
547− ++ ibl
548+++ ibl
548− |= [a=[e=@s a=@u]] ^- @s
549+ |= [a=[e=@s a=@u]] ^- @s
549− (sum:si (sun:si (dec (met 0 a.a))) e.a)
550+ (sum:si (sun:si (dec (met 0 a.a))) e.a)
550```
551```
551
552
552#### Examples
553#### Examples
553
554
554```
555```
555− > (ibl:fl [-18 342.602.577])
556+> (ibl:fl [-18 342.602.577])
556− --10
557+--10
557```
558```
558
559
559---
560---
@@ -577,20 +578,20 @@ A cell of a signed integer and an unsigned integer.
577#### Source
578#### Source
578
579
579```hoon
580```hoon
580− ++ uni
581+++ uni
581− |= [a=[e=@s a=@u]]
582+ |= [a=[e=@s a=@u]]
582− |- ?: =((end 0 1 a.a) 1) a
583+ |- ?: =((end 0 a.a) 1) a
583− $(a.a (rsh 0 1 a.a), e.a (sum:si e.a --1))
584+ $(a.a (rsh 0 a.a), e.a (sum:si e.a --1))
584```
585```
585
586
586#### Examples
587#### Examples
587
588
588```
589```
589− > (uni:fl [-8 342.602.578])
590+> (uni:fl [-8 342.602.578])
590− [e=-7 a=171.301.289]
591+[e=-7 a=171.301.289]
591
592
592− > (uni:fl [-8 342.602.577])
593+> (uni:fl [-8 342.602.577])
593− [e=-8 a=342.602.577]
594+[e=-8 a=342.602.577]
594```
595```
595
596
596---
597---
@@ -612,29 +613,29 @@ A cell of a signed integer and an unsigned integer.
612#### Sources
613#### Sources
613
614
614```hoon
615```hoon
615− ++ xpd
616+++ xpd
616− |= [a=[e=@s a=@u]]
617+ |= [a=[e=@s a=@u]]
617− =+ ma=(met 0 a.a)
618+ =+ ma=(met 0 a.a)
618− ?: (gte ma prc) a
619+ ?: (gte ma prc) a
619− =+ ?: =(den %i) (^sub prc ma)
620+ =+ ?: =(den %i) (^sub prc ma)
620− =+ ^= q
621+ =+ ^= q
621− =+ w=(dif:si e.a emn)
622+ =+ w=(dif:si e.a emn)
622− ?: (syn:si w) (abs:si w) 0
623+ ?: (syn:si w) (abs:si w) 0
623− (min q (^sub prc ma))
624+ (min q (^sub prc ma))
624− a(e (dif:si e.a (sun:si -)), a (lsh 0 - a.a))
625+ a(e (dif:si e.a (sun:si -)), a (lsh [0 -] a.a))
625```
626```
626
627
627#### Examples
628#### Examples
628
629
629```
630```
630− > (xpd:fl [--3 12])
631+> (xpd:fl [--3 12])
631− [e=-106 a=7.788.445.287.802.241.442.795.744.493.830.144]
632+[e=-106 a=7.788.445.287.802.241.442.795.744.493.830.144]
632
633
633− > (xpd:fl [-8 342.602.577])
634+> (xpd:fl [-8 342.602.577])
634− [e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
635+[e=-92 a=6.626.897.619.228.945.634.459.505.846.648.832]
635
636
636− > (xpd:fl [-92 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])
637− [e=-92 a=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]
638```
639```
639
640
640---
641---
@@ -649,16 +650,16 @@ ULP(a) = 2^(e.a)
649
650
650Possible rounding operations:
651Possible rounding operations:
651
652
652−- Floor (`$fl`)
653+- Floor (`%fl`)
653−- Ceiling (`$ce`)
654+- Ceiling (`%ce`)
654−- Smaller (`$sm`)
655+- Smaller (`%sm`)
655−- Larger (`$lg`)
656+- Larger (`%lg`)
656−- Nearest (`$ne`) -- Rounds ties away from 0 if the number is even, rounds
657+- Nearest (`%ne`) -- Rounds ties away from 0 if the number is even, rounds
657 toward 0 if the number is odd.
658 toward 0 if the number is odd.
658
659
659#### Accepts
660#### Accepts
660
661
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`.
662
663
663`a` is a cell of a signed integer and an unsigned integer.
664`a` is a cell of a signed integer and an unsigned integer.
664
665
@@ -671,82 +672,75 @@ An `fn`.
671#### Source
672#### Source
672
673
673```hoon
674```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
675+++ lug
681− ~/ %lug
676+ ~/ %lug
682− |= [t=$?($fl $ce $sm $lg $ne $na $nt) a=[e=@s a=@u] s=?] ^- fn
677+ |= [t=$?(%fl %ce %sm %lg %ne %na %nt) a=[e=@s a=@u] s=?] ^- fn
683− ?< =(a.a 0)
678+ ?< =(a.a 0)
684− =-
679+ =-
685− ?. =(den %f) - :: flush denormals
680+ ?. =(den %f) - :: flush denormals
686− ?. ?=([$f *] -) -
681+ ?. ?=([%f *] -) -
687− ?: =((met 0 ->+>) prc) - [%f & zer]
682+ ?: =((met 0 ->+>) prc) - [%f & zer]
688− ::
683+ ::
689− =+ m=(met 0 a.a)
684+ =+ m=(met 0 a.a)
690− ?> |(s (gth m prc)) :: require precision
685+ ?> |(s (gth m prc)) :: require precision
691− =+ ^= q %+ max
686+ =+ ^= q %+ max
692− ?: (gth m prc) (^sub m prc) 0 :: reduce precision
687+ ?: (gth m prc) (^sub m prc) 0 :: reduce precision
693− %- abs:si ?: =(den %i) --0 :: enforce min. exp
688+ %- abs:si ?: =(den %i) --0 :: enforce min. exp
694− ?: =((cmp:si e.a emn) -1) (dif:si emn e.a) --0
689+ ?: =((cmp:si e.a emn) -1) (dif:si emn e.a) --0
695− =^ b a :- (end 0 q a.a)
690+ =^ b a :- (end [0 q] a.a)
696− a(e (sum:si e.a (sun:si q)), a (rsh 0 q a.a))
691+ a(e (sum:si e.a (sun:si q)), a (rsh [0 q] a.a))
697− ::
692+ ::
698− ?~ a.a
693+ ?~ a.a
699− ?< =(den %i)
694+ ?< =(den %i)
700− ?- t
695+ ?- t
701− $fl [%f & zer]
696+ %fl [%f & zer]
702− $sm [%f & zer]
697+ %sm [%f & zer]
703− $ce [%f & spd]
698+ %ce [%f & spd]
704− $lg [%f & spd]
699+ %lg [%f & spd]
705− $ne ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
700+ %ne ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
706− [%f & ?:((^lth b (bex (dec q))) zer spd)]
701+ [%f & ?:((^lth b (bex (dec q))) zer spd)]
707− $nt ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
702+ %nt ?: s [%f & ?:((lte b (bex (dec q))) zer spd)]
708− [%f & ?:((^lth b (bex (dec q))) zer spd)]
703+ [%f & ?:((^lth b (bex (dec q))) zer spd)]
709− $na [%f & ?:((^lth b (bex (dec q))) zer spd)]
704+ %na [%f & ?:((^lth b (bex (dec q))) zer spd)]
710− ==
705+ ==
711− ::
706+ ::
712− =. a (xpd a)
707+ =. a (xpd a)
713− ::
708+ ::
714− =. a
709+ =. a
715− ?- t
710+ ?- t
716− $fl a
711+ %fl a
717− $lg a(a +(a.a))
712+ %lg a(a +(a.a))
718− $sm ?. &(=(b 0) s) a
713+ %sm ?. &(=(b 0) s) a
719− ?: &(=(e.a emn) !=(den %i)) a(a (dec a.a))
714+ ?: &(=(e.a emn) !=(den %i)) a(a (dec a.a))
720− =+ y=(dec (^mul a.a 2))
715+ =+ y=(dec (^mul a.a 2))
721− ?. (lte (met 0 y) prc) a(a (dec a.a))
716+ ?. (lte (met 0 y) prc) a(a (dec a.a))
722− [(dif:si e.a --1) y]
717+ [(dif:si e.a --1) y]
723− $ce ?: &(=(b 0) s) a a(a +(a.a))
718+ %ce ?: &(=(b 0) s) a a(a +(a.a))
724− $ne ?~ b a
719+ %ne ?~ b a
725− =+ y=(bex (dec q))
720+ =+ y=(bex (dec q))
726− ?: &(=(b y) s) :: round halfs to even
721+ ?: &(=(b y) s) :: round halfs to even
727− ?~ (dis a.a 1) a a(a +(a.a))
722+ ?~ (dis a.a 1) a a(a +(a.a))
728− ?: (^lth b y) a a(a +(a.a))
723+ ?: (^lth b y) a a(a +(a.a))
729− $na ?~ b a
724+ %na ?~ b a
730− =+ y=(bex (dec q))
725+ =+ y=(bex (dec q))
731− ?: (^lth b y) a a(a +(a.a))
726+ ?: (^lth b y) a a(a +(a.a))
732− $nt ?~ b a
727+ %nt ?~ b a
733− =+ y=(bex (dec q))
728+ =+ y=(bex (dec q))
734− ?: =(b y) ?: s a a(a +(a.a))
729+ ?: =(b y) ?: s a a(a +(a.a))
735− ?: (^lth b y) a a(a +(a.a))
730+ ?: (^lth b y) a a(a +(a.a))
736− ==
731+ ==
737− ::
732+ ::
738− =. a ?. =((met 0 a.a) +(prc)) a
733+ =. a ?. =((met 0 a.a) +(prc)) a
739− a(a (rsh 0 1 a.a), e (sum:si e.a --1))
734+ a(a (rsh 0 a.a), e (sum:si e.a --1))
740− ?~ a.a [%f & zer]
735+ ?~ a.a [%f & zer]
741− ::
736+ ::
742− ?: =(den %i) [%f & a]
737+ ?: =(den %i) [%f & a]
743− ?: =((cmp:si emx e.a) -1) [%i &] [%f & a] :: enforce max. exp
738+ ?: =((cmp:si emx e.a) -1) [%i &] [%f & a] :: enforce max. exp
744− ::
745```
739```
746
740
747---
741---
748
742
749−### `++drg:fl`
743+### `^drg:fl`
750
744
751Get printable decimal
745Get printable decimal
752
746
@@ -764,74 +758,74 @@ A cell of a signed integer and an unsigned integer.
764#### Source
758#### Source
765
759
766```hoon
760```hoon
767− ++ drg
761+++ drg :: dragon4; get
768− ~/ %drg
762+ ~/ %drg :: printable decimal;
769− |= [a=[e=@s a=@u]] ^- [@s @u]
763+ |= [a=[e=@s a=@u]] ^- [@s @u] :: guaranteed accurate
770− ?< =(a.a 0)
764+ ?< =(a.a 0) :: for rounded floats
771− =. a (xpd a)
765+ =. a (xpd a)
772− =+ r=(lsh 0 ?:((syn:si e.a) (abs:si e.a) 0) a.a)
766+ =+ 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)
767+ =+ 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)
768+ =+ mn=(lsh [0 ?:((syn:si e.a) (abs:si e.a) 0)] 1)
775− =+ mp=mn
769+ =+ mp=mn
776− => ?.
770+ => ?.
777− ?& =(a.a (bex (dec prc))) :: if next smallest
771+ ?& =(a.a (bex (dec prc))) :: if next smallest
778− |(!=(e.a emn) =(den %i)) :: float is half ULP,
772+ |(!=(e.a emn) =(den %i)) :: float is half ULP,
779− == :: tighten lower bound
773+ == :: tighten lower bound
780− .
774+ .
781− %= .
775+ %= .
782− mp (lsh 0 1 mp)
776+ mp (lsh 0 mp)
783− r (lsh 0 1 r)
777+ r (lsh 0 r)
784− s (lsh 0 1 s)
778+ s (lsh 0 s)
785− ==
779+ ==
786− =+ [k=--0 q=(^div (^add s 9) 10)]
780+ =+ [k=--0 q=(^div (^add s 9) 10)]
787− |- ?: (^lth r q)
781+ |- ?: (^lth r q)
788− %= $
782+ %= $
789− k (dif:si k --1)
783+ k (dif:si k --1)
790− r (^mul r 10)
784+ r (^mul r 10)
791− mn (^mul mn 10)
785+ mn (^mul mn 10)
792− mp (^mul mp 10)
786+ mp (^mul mp 10)
793− ==
787+ ==
794− |- ?: (gte (^add (^mul r 2) mp) (^mul s 2))
788+ |- ?: (gte (^add (^mul r 2) mp) (^mul s 2))
795− $(s (^mul s 10), k (sum:si k --1))
789+ $(s (^mul s 10), k (sum:si k --1))
796− =+ [u=0 o=0]
790+ =+ [u=0 o=0]
797− |- :: r/s+o = a*10^-k
791+ |- :: r/s+o = a*10^-k
798− =+ v=(dvr (^mul r 10) s)
792+ =+ v=(dvr (^mul r 10) s)
799− => %= .
793+ => %= .
800− k (dif:si k --1)
794+ k (dif:si k --1)
801− u p.v
795+ u p.v
802− r q.v
796+ r q.v
803− mn (^mul mn 10)
797+ mn (^mul mn 10)
804− mp (^mul mp 10)
798+ mp (^mul mp 10)
805− ==
799+ ==
806− =+ l=(^lth (^mul r 2) mn) :: in lower bound
800+ =+ l=(^lth (^mul r 2) mn) :: in lower bound
807− =+ ^= h :: in upper bound
801+ =+ ^= h :: in upper bound
808− ?| (^lth (^mul s 2) mp)
802+ ?| (^lth (^mul s 2) mp)
809− (gth (^mul r 2) (^sub (^mul s 2) mp))
803+ (gth (^mul r 2) (^sub (^mul s 2) mp))
810− ==
804+ ==
811− ?: &(!l !h)
805+ ?: &(!l !h)
812− $(o (^add (^mul o 10) u))
806+ $(o (^add (^mul o 10) u))
813− =+ q=&(h |(!l (gth (^mul r 2) s)))
807+ =+ q=&(h |(!l (gth (^mul r 2) s)))
814− =. o (^add (^mul o 10) ?:(q +(u) u))
808+ =. o (^add (^mul o 10) ?:(q +(u) u))
815− [k o]
809+ [k o]
816−```
810+```
817−
811+
818−#### Examples
812+#### Examples
819−
813+
820−```
814+```
821− > (sun:fl 218.116)
815+> (sun:fl 218.116)
822− [%f s=%.y e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488]
816+[%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])
817+> (^drg:fl [e=-95 a=8.640.464.947.480.640.129.276.716.135.743.488])
824− [--0 218.116]
818+[--0 218.116]
825−
819+
826− > (sun:fl 102.057.673.128.349)
820+> (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]
821+[%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])
822+> (^drg:fl [e=-66 a=7.530.527.107.827.833.883.675.587.233.447.936])
829− [--0 102.057.673.128.349]
823+[--0 102.057.673.128.349]
830−```
824+```
831−
825+
832−---
826+---
833−
827+
834−### `++toj:fl`
828+### `^toj:fl`
835
829
836Round to integer
830Round to integer
837
831
@@ -848,27 +842,27 @@ An `fn`.
848#### Source
842#### Source
849
843
850```hoon
844```hoon
851− ++ toj
845+++ toj
852− |= [a=[e=@s a=@u]] ^- fn
846+ |= [a=[e=@s a=@u]] ^- fn
853− ?. =((cmp:si e.a --0) -1) [%f & a]
847+ ?. =((cmp:si e.a --0) -1) [%f & a]
854− =+ x=(abs:si e.a)
848+ =+ x=(abs:si e.a)
855− =+ y=(rsh 0 x a.a)
849+ =+ y=(rsh [0 x] a.a)
856− ?: |(=(r %d) =(r %z)) [%f & --0 y]
850+ ?: |(=(r %d) =(r %z)) [%f & --0 y]
857− =+ z=(end 0 x a.a)
851+ =+ z=(end [0 x] a.a)
858− ?: |(=(r %u) =(r %a)) [%f & --0 ?~(z y +(y))]
852+ ?: |(=(r %u) =(r %a)) [%f & --0 ?~(z y +(y))]
859− =+ i=(bex (dec x))
853+ =+ i=(bex (dec x))
860− ?: &(=(z i) =((dis y 1) 0)) [%f & --0 y]
854+ ?: &(=(z i) =((dis y 1) 0)) [%f & --0 y]
861− ?: (^lth z i) [%f & --0 y] [%f & --0 +(y)]
855+ ?: (^lth z i) [%f & --0 y] [%f & --0 +(y)]
862```
856```
863
857
864#### Examples
858#### Examples
865
859
866```
860```
867− > (^toj:fl [-11 7.530.107.827.833.587])
861+> (^toj:fl [-11 7.530.107.827.833.587])
868− [%f s=%.y e=--0 a=3.676.810.462.809]
862+[%f s=%.y e=--0 a=3.676.810.462.809]
869
863
870− > (^toj:fl [-11 7.530.107.827.833.589])
864+> (^toj:fl [-11 7.530.107.827.833.589])
871− [%f s=%.y e=--0 a=3.676.810.462.809]
865+[%f s=%.y e=--0 a=3.676.810.462.809]
872```
866```
873
867
874---
868---
@@ -891,26 +885,26 @@ A cell of a signed integer and an unsigned integer.
891#### Source
885#### Source
892
886
893```hoon
887```hoon
894− ++ ned
888+++ ned
895− |= [a=fn] ^- [$f s=? e=@s a=@u]
889+ |= [a=fn] ^- [%f s=? e=@s a=@u]
896− ?: ?=([$f *] a) a
890+ ?: ?=([%f *] a) a
897− ~_ leaf+"need-float"
891+ ~_ leaf+"need-float"
898− !!
892+ !!
899```
893```
900
894
901#### Examples
895#### Examples
902
896
903```
897```
904− > (ned:fl [%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])
905− [%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]
906
900
907− > (ned:fl [%n ~])
901+> (ned:fl [%n ~])
908− ! need-float
902+! need-float
909− ! exit
903+! exit
910
904
911− > (ned:fl [%i |])
905+> (ned:fl [%i |])
912− ! need-float
906+! need-float
913− ! exit
907+! exit
914```
908```
915
909
916---
910---
@@ -935,23 +929,23 @@ An `fn`.
935#### Source
929#### Source
936
930
937```hoon
931```hoon
938− ++ shf
932+++ shf
939− |= [a=fn b=@s]
933+ |= [a=fn b=@s]
940− ?: |(?=([$n *] a) ?=([$i *] a)) a
934+ ?: |(?=([%n *] a) ?=([%i *] a)) a
941− a(e (sum:si e.a b))
935+ a(e (sum:si e.a b))
942```
936```
943
937
944#### Examples
938#### Examples
945
939
946```
940```
947− > (shf:fl [[%f & -2 7] --2])
941+> (shf:fl [[%f & -2 7] --2])
948− [%f s=%.y e=--0 a=7]
942+[%f s=%.y e=--0 a=7]
949
943
950− > (shf:fl [[%f & -2 7] -2])
944+> (shf:fl [[%f & -2 7] -2])
951− [%f s=%.y e=-4 a=7]
945+[%f s=%.y e=-4 a=7]
952
946
953− > (shf:fl [%f & -11 7.530.107.827.833.587] --5)
947+> (shf:fl [%f & -11 7.530.107.827.833.587] --5)
954− [%f s=%.y e=-6 a=7.530.107.827.833.587]
948+[%f s=%.y e=-6 a=7.530.107.827.833.587]
955```
949```
956
950
957---
951---
@@ -973,22 +967,22 @@ An `fn`.
973#### Source
967#### Source
974
968
975```hoon
969```hoon
976− ++ fli
970+++ fli
977− |= [a=fn] ^- fn
971+ |= [a=fn] ^- fn
978− ?-(-.a $f a(s !s.a), $i a(s !s.a), $n a)
972+ ?-(-.a %f a(s !s.a), %i a(s !s.a), %n a)
979```
973```
980
974
981#### Examples
975#### Examples
982
976
983```
977```
984− > (fli:fl [%f %.y -2 7])
978+> (fli:fl [%f %.y -2 7])
985− [%f s=%.n e=-2 a=7]
979+[%f s=%.n e=-2 a=7]
986
980
987− > (fli:fl [%f %.n --2 30.617])
981+> (fli:fl [%f %.n --2 30.617])
988− [%f s=%.y e=--2 a=30.617]
982+[%f s=%.y e=--2 a=30.617]
989
983
990− > (fli:fl [%f | --2 30.617])
984+> (fli:fl [%f | --2 30.617])
991− [%f s=%.y e=--2 a=30.617]
985+[%f s=%.y e=--2 a=30.617]
992```
986```
993
987
994---
988---
@@ -1002,21 +996,21 @@ Switches the rounding mode of `r:fl`.
1002#### Source
996#### Source
1003
997
1004```hoon
998```hoon
1005− ++ swr ?+(r r $d %u, $u %d)
999+++ swr ?+(r r %d %u, %u %d)
1006```
1000```
1007
1001
1008#### Examples
1002#### Examples
1009
1003
1010```
1004```
1011− > r:fl
1005+> r:fl
1012− %n
1006+%n
1013− > swr:fl
1007+> swr:fl
1014− %n
1008+%n
1015
1009
1016− > =new-fl fl :: new fl core with changed state
1010+> =new-fl fl :: new fl core with changed state
1017− > =new-fl new-fl(r %u)
1011+> =new-fl new-fl(r %u)
1018− > swr:new-fl
1012+> swr:new-fl
1019− %d
1013+%d
1020```
1014```
1021
1015
1022---
1016---
@@ -1031,23 +1025,23 @@ Otherwise, a crash is produced.
1031#### Source
1025#### Source
1032
1026
1033```hoon
1027```hoon
1034− ++ prc ?>((gth p 1) p)
1028+++ prc ?>((gth p 1) p)
1035```
1029```
1036
1030
1037#### Examples
1031#### Examples
1038
1032
1039```
1033```
1040− > prc:fl
1034+> prc:fl
1041− 113
1035+113
1042
1036
1043− > =new-fl fl
1037+> =new-fl fl
1044− > =new-fl new-fl(p 1)
1038+> =new-fl new-fl(p 1)
1045− > prc:new-fl
1039+> prc:new-fl
1046− ! exit
1040+! exit
1047
1041
1048− > =new-fl new-fl(p 2)
1042+> =new-fl new-fl(p 2)
1049− > prc:new-fl
1043+> prc:new-fl
1050− 2
1044+2
1051```
1045```
1052
1046
1053---
1047---
@@ -1061,26 +1055,26 @@ Produces `d:fl`. Denormalizes if `d:fl` is `%d`. Flushes denormals to zero if
1061
1055
1062- Denormalizes if `d:fl` is `%d`.
1056- Denormalizes if `d:fl` is `%d`.
1063- Flushes denormals to zero if `d:fl` is `%f`.
1057- 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`.
1065
1059
1066The default value of `d` is `%d`.
1060The default value of `d` is `%d`.
1067
1061
1068#### Source
1062#### Source
1069
1063
1070```hoon
1064```hoon
1071− ++ den d
1065+++ den d
1072```
1066```
1073
1067
1074#### Examples
1068#### Examples
1075
1069
1076```
1070```
1077− > den:fl
1071+> den:fl
1078− %d
1072+%d
1079
1073
1080− > =new-fl fl
1074+> =new-fl fl
1081− > =new-fl new-fl(d %f)
1075+> =new-fl new-fl(d %f)
1082− > den:new-fl
1076+> den:new-fl
1083− %f
1077+%f
1084```
1078```
1085
1079
1086---
1080---
@@ -1094,14 +1088,14 @@ Produces `v:fl`, the minimum exponent. The default minimum exponent is -16.494.
1094#### Source
1088#### Source
1095
1089
1096```hoon
1090```hoon
1097− ++ emn v
1091+++ emn v
1098```
1092```
1099
1093
1100#### Examples
1094#### Examples
1101
1095
1102```
1096```
1103− > emn:fl
1097+> emn:fl
1104− -16.494
1098+-16.494
1105```
1099```
1106
1100
1107---
1101---
@@ -1115,17 +1109,17 @@ Returns the maximum exponent of `fl`. The default maximum exponent is --16.271.
1115#### Source
1109#### Source
1116
1110
1117```hoon
1111```hoon
1118− ++ emx (sum:si emn (sun:si w))
1112+++ emx (sum:si emn (sun:si w))
1119```
1113```
1120
1114
1121#### Examples
1115#### Examples
1122
1116
1123```
1117```
1124− > emx:fl
1118+> emx:fl
1125− --16.271
1119+--16.271
1126
1120
1127− > `@u`emx:fl
1121+> `@u`emx:fl
1128− 32.542
1122+32.542
1129```
1123```
1130
1124
1131---
1125---
@@ -1139,14 +1133,14 @@ Produces the smallest possible denormalized float.
1139#### Source
1133#### Source
1140
1134
1141```hoon
1135```hoon
1142− ++ spd [e=emn a=1]
1136+++ spd [e=emn a=1]
1143```
1137```
1144
1138
1145#### Examples
1139#### Examples
1146
1140
1147```
1141```
1148− > spd:fl
1142+> spd:fl
1149− [e=-16.494 a=1]
1143+[e=-16.494 a=1]
1150```
1144```
1151
1145
1152---
1146---
@@ -1160,14 +1154,14 @@ Produces the smallest representable normal float.
1160#### Source
1154#### Source
1161
1155
1162```hoon
1156```hoon
1163− ++ spn [e=emn a=(bex (dec prc))]
1157+++ spn [e=emn a=(bex (dec prc))]
1164```
1158```
1165
1159
1166#### Examples
1160#### Examples
1167
1161
1168```
1162```
1169− > spn:fl
1163+> spn:fl
1170− [e=-16.494 a=5.192.296.858.534.827.628.530.496.329.220.096]
1164+[e=-16.494 a=5.192.296.858.534.827.628.530.496.329.220.096]
1171```
1165```
1172
1166
1173---
1167---
@@ -1181,14 +1175,14 @@ Produces the largest representable normal float.
1181#### Source
1175#### Source
1182
1176
1183```hoon
1177```hoon
1184− ++ lfn [e=emx a=(fil 0 prc 1)]
1178+++ lfn [e=emx a=(fil 0 prc 1)]
1185```
1179```
1186
1180
1187#### Examples
1181#### Examples
1188
1182
1189```
1183```
1190− > lfn:fl
1184+> lfn:fl
1191− [e=--16.271 a=10.384.593.717.069.655.257.060.992.658.440.191]
1185+[e=--16.271 a=10.384.593.717.069.655.257.060.992.658.440.191]
1192```
1186```
1193
1187
1194---
1188---
@@ -1202,14 +1196,14 @@ Produces the sum of `emx:fl` plus `prc:fl`.
1202#### Source
1196#### Source
1203
1197
1204```hoon
1198```hoon
1205− ++ lfe (sum:si emx (sun:si prc)) :: 2^lfe is > than all
1199+++ lfe (sum:si emx (sun:si prc))
1206```
1200```
1207
1201
1208#### Examples
1202#### Examples
1209
1203
1210```
1204```
1211− > lfe:fl
1205+> lfe:fl
1212− --16.384
1206+--16.384
1213```
1207```
1214
1208
1215---
1209---
@@ -1223,16 +1217,14 @@ Produces zero represented as a float.
1223#### Source
1217#### Source
1224
1218
1225```hoon
1219```hoon
1226− ++ zer [e=--0 a=0]
1220+++ zer [e=--0 a=0]
1227− --
1228− |%
1229```
1221```
1230
1222
1231#### Examples
1223#### Examples
1232
1224
1233```
1225```
1234− > zer:fl
1226+> zer:fl
1235− [e=--0 a=0]
1227+[e=--0 a=0]
1236```
1228```
1237
1229
1238---
1230---
@@ -1254,29 +1246,29 @@ An `fn`.
1254#### Source
1246#### Source
1255
1247
1256```hoon
1248```hoon
1257− ++ rou
1249+++ rou
1258− |= [a=fn] ^- fn
1250+ |= [a=fn] ^- fn
1259− ?. ?=([$f *] a) a
1251+ ?. ?=([%f *] a) a
1260− ?~ a.a [%f s.a zer]
1252+ ?~ a.a [%f s.a zer]
1261− ?: s.a (^rou +>.a)
1253+ ?: s.a (^rou +>.a)
1262− =.(r swr (fli (^rou +>.a)))
1254+ =.(r swr (fli (^rou +>.a)))
1263```
1255```
1264
1256
1265#### Examples
1257#### Examples
1266
1258
1267```
1259```
1268− > =a 10.161.487.211.429.486.882.397.572.894.294.017.777
1260+> =a 10.161.487.211.429.486.882.397.572.894.294.017.777
1269− > (rou:fl [%f & --12 a])
1261+> (rou:fl [%f & --12 a])
1270− [%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1262+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1271
1263
1272− > (rou:fl [%f & --12 (add a 1)])
1264+> (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]
1265+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1274
1266
1275− > (rou:fl [%f & --12 (add a 300)])
1267+> (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]
1268+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.002]
1277
1269
1278− > (rou:fl [%f & --12 (add a 1.000)])
1270+> (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]
1271+[%f s=%.y e=--22 a=9.923.327.354.911.608.283.591.379.779.584.003]
1280```
1272```
1281
1273
1282---
1274---
@@ -1298,19 +1290,19 @@ An `fn`.
1298#### Source
1290#### Source
1299
1291
1300```hoon
1292```hoon
1301− ++ syn
1293+++ syn
1302− |= [a=fn] ^- ?
1294+ |= [a=fn] ^- ?
1303− ?-(-.a $f s.a, $i s.a, $n &)
1295+ ?-(-.a %f s.a, %i s.a, %n &)
1304```
1296```
1305
1297
1306#### Examples
1298#### Examples
1307
1299
1308```
1300```
1309− > (syn:fl (sun:fl 106))
1301+> (syn:fl (sun:fl 106))
1310− %.y
1302+%.y
1311
1303
1312− > (syn:fl [%f | --0 106])
1304+> (syn:fl [%f | --0 106])
1313− %.n
1305+%.n
1314```
1306```
1315
1307
1316---
1308---
@@ -1332,20 +1324,20 @@ An `fn`.
1332#### Sources
1324#### Sources
1333
1325
1334```hoon
1326```hoon
1335− ++ abs
1327+++ abs
1336− |= [a=fn] ^- fn
1328+ |= [a=fn] ^- fn
1337− ?: ?=([$f *] a) [%f & e.a a.a]
1329+ ?: ?=([%f *] a) [%f & e.a a.a]
1338− ?: ?=([$i *] a) [%i &] [%n ~]
1330+ ?: ?=([%i *] a) [%i &] [%n ~]
1339```
1331```
1340
1332
1341#### Examples
1333#### Examples
1342
1334
1343```
1335```
1344− > (abs:fl [%f | --0 106])
1336+> (abs:fl [%f | --0 106])
1345− [%f s=%.y e=--0 a=106]
1337+[%f s=%.y e=--0 a=106]
1346
1338
1347− > (abs:fl [%f & --0 106])
1339+> (abs:fl [%f & --0 106])
1348− [%f s=%.y e=--0 a=106]
1340+[%f s=%.y e=--0 a=106]
1349```
1341```
1350
1342
1351---
1343---
@@ -1369,32 +1361,32 @@ An `fn`.
1369#### Source
1361#### Source
1370
1362
1371```hoon
1363```hoon
1372− ++ add
1364+++ add
1373− |= [a=fn b=fn] ^- fn
1365+ |= [a=fn b=fn] ^- fn
1374− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1366+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1375− ?: |(?=([$i *] a) ?=([$i *] b))
1367+ ?: |(?=([%i *] a) ?=([%i *] b))
1376− ?: &(?=([$i *] a) ?=([$i *] b))
1368+ ?: &(?=([%i *] a) ?=([%i *] b))
1377− ?: =(a b) a [%n ~]
1369+ ?: =(a b) a [%n ~]
1378− ?: ?=([$i *] a) a b
1370+ ?: ?=([%i *] a) a b
1379− ?: |(=(a.a 0) =(a.b 0))
1371+ ?: |(=(a.a 0) =(a.b 0))
1380− ?. &(=(a.a 0) =(a.b 0)) %- rou ?~(a.a b a)
1372+ ?. &(=(a.a 0) =(a.b 0)) %- rou ?~(a.a b a)
1381− [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1373+ [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1382− %- |= [a=fn]
1374+ %- |= [a=fn]
1383− ?. ?=([$f *] a) a
1375+ ?. ?=([%f *] a) a
1384− ?. =(a.a 0) a
1376+ ?. =(a.a 0) a
1385− [%f !=(r %d) zer]
1377+ [%f !=(r %d) zer]
1386− ?: =(s.a s.b)
1378+ ?: =(s.a s.b)
1387− ?: s.a (^add +>.a +>.b |)
1379+ ?: s.a (^add +>.a +>.b |)
1388− =.(r swr (fli (^add +>.a +>.b |)))
1380+ =.(r swr (fli (^add +>.a +>.b |)))
1389− ?: s.a (^sub +>.a +>.b |)
1381+ ?: s.a (^sub +>.a +>.b |)
1390− (^sub +>.b +>.a |)
1382+ (^sub +>.b +>.a |)
1391```
1383```
1392
1384
1393#### Examples
1385#### Examples
1394
1386
1395```
1387```
1396− > (add:fl [%f & --0 106] [%f | --3 55])
1388+> (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]
1389+[%f s=%.n e=-104 a=6.774.324.807.619.657.921.598.381.929.529.344]
1398```
1390```
1399
1391
1400---
1392---
@@ -1418,33 +1410,32 @@ An `fn`.
1418#### Source
1410#### Source
1419
1411
1420```hoon
1412```hoon
1421− ++ ead
1413+++ ead
1422− |= [a=fn b=fn] ^- fn
1414+ |= [a=fn b=fn] ^- fn
1423− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1415+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1424− ?: |(?=([$i *] a) ?=([$i *] b))
1416+ ?: |(?=([%i *] a) ?=([%i *] b))
1425− ?: &(?=([$i *] a) ?=([$i *] b))
1417+ ?: &(?=([%i *] a) ?=([%i *] b))
1426− ?: =(a b) a [%n ~]
1418+ ?: =(a b) a [%n ~]
1427− ?: ?=([$i *] a) a b
1419+ ?: ?=([%i *] a) a b
1428− ?: |(=(a.a 0) =(a.b 0))
1420+ ?: |(=(a.a 0) =(a.b 0))
1429− ?. &(=(a.a 0) =(a.b 0)) ?~(a.a b a)
1421+ ?. &(=(a.a 0) =(a.b 0)) ?~(a.a b a)
1430− [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1422+ [%f ?:(=(r %d) &(s.a s.b) |(s.a s.b)) zer]
1431− %- |= [a=fn]
1423+ %- |= [a=fn]
1432− ?. ?=([$f *] a) a
1424+ ?. ?=([%f *] a) a
1433− ?. =(a.a 0) a
1425+ ?. =(a.a 0) a
1434− [%f !=(r %d) zer]
1426+ [%f !=(r %d) zer]
1435− ?: =(s.a s.b)
1427+ ?: =(s.a s.b)
1436− ?: s.a (^add +>.a +>.b &)
1428+ ?: s.a (^add +>.a +>.b &)
1437− (fli (^add +>.a +>.b &))
1429+ (fli (^add +>.a +>.b &))
1438− ?: s.a (^sub +>.a +>.b &)
1430+ ?: s.a (^sub +>.a +>.b &)
1439− (^sub +>.b +>.a &)
1431+ (^sub +>.b +>.a &)
1440− ::
1441```
1432```
1442
1433
1443#### Examples
1434#### Examples
1444
1435
1445```
1436```
1446− > (ead:fl [%f & --0 106] [%f | --3 55])
1437+> (ead:fl [%f & --0 106] [%f | --3 55])
1447− [%f s=%.n e=--0 a=334]
1438+[%f s=%.n e=--0 a=334]
1448```
1439```
1449
1440
1450---
1441---
@@ -1468,15 +1459,15 @@ An `fn`.
1468#### Source
1459#### Source
1469
1460
1470```hoon
1461```hoon
1471− ++ sub
1462+++ sub
1472− |= [a=fn b=fn] ^- fn (add a (fli b))
1463+ |= [a=fn b=fn] ^- fn (add a (fli b))
1473```
1464```
1474
1465
1475#### Examples
1466#### Examples
1476
1467
1477```
1468```
1478− > (sub:fl [%f & --13 2.718] [%f & --23 11])
1469+> (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]
1470+[%f s=%.n e=-86 a=5.416.671.014.775.224.232.595.412.796.571.648]
1480```
1471```
1481
1472
1482---
1473---
@@ -1500,18 +1491,18 @@ An `fn`.
1500#### Source
1491#### Source
1501
1492
1502```hoon
1493```hoon
1503− ++ mul
1494+++ mul
1504− |= [a=fn b=fn] ^- fn
1495+ |= [a=fn b=fn] ^- fn
1505− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1496+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1506− ?: ?=([$i *] a)
1497+ ?: ?=([%i *] a)
1507− ?: ?=([$i *] b)
1498+ ?: ?=([%i *] b)
1508− [%i =(s.a s.b)]
1499+ [%i =(s.a s.b)]
1509− ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1500+ ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1510− ?: ?=([$i *] b)
1501+ ?: ?=([%i *] b)
1511− ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1502+ ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1512− ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1503+ ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1513− ?: =(s.a s.b) (^mul +>.a +>.b)
1504+ ?: =(s.a s.b) (^mul +>.a +>.b)
1514− =.(r swr (fli (^mul +>.a +>.b)))
1505+ =.(r swr (fli (^mul +>.a +>.b)))
1515```
1506```
1516
1507
1517---
1508---
@@ -1534,18 +1525,18 @@ An `fn`.
1534
1525
1535#### Examples
1526#### Examples
1536
1527
1537−```
1528+```hoon
1538− ++ emu
1529+++ emu
1539− |= [a=fn b=fn] ^- fn
1530+ |= [a=fn b=fn] ^- fn
1540− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1531+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1541− ?: ?=([$i *] a)
1532+ ?: ?=([%i *] a)
1542− ?: ?=([$i *] b)
1533+ ?: ?=([%i *] b)
1543− [%i =(s.a s.b)]
1534+ [%i =(s.a s.b)]
1544− ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1535+ ?: =(a.b 0) [%n ~] [%i =(s.a s.b)]
1545− ?: ?=([$i *] b)
1536+ ?: ?=([%i *] b)
1546− ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1537+ ?: =(a.a 0) [%n ~] [%i =(s.a s.b)]
1547− ?: |(=(a.a 0) =(a.b 0)) [%f =(s.a s.b) zer]
1538+ ?: |(=(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)]
1539+ [%f =(s.a s.b) (sum:si e.a e.b) (^^mul a.a a.b)]
1549```
1540```
1550
1541
1551---
1542---
@@ -1566,19 +1557,19 @@ Produces the quotient of `a` divided by `b`.
1566
1557
1567An `fn`.
1558An `fn`.
1568
1559
1569−#### Divide
1560+#### Source
1570
1561
1571```hoon
1562```hoon
1572− ++ div
1563+++ div
1573− |= [a=fn b=fn] ^- fn
1564+ |= [a=fn b=fn] ^- fn
1574− ?: |(?=([$n *] a) ?=([$n *] b)) [%n ~]
1565+ ?: |(?=([%n *] a) ?=([%n *] b)) [%n ~]
1575− ?: ?=([$i *] a)
1566+ ?: ?=([%i *] a)
1576− ?: ?=([$i *] b) [%n ~] [%i =(s.a s.b)]
1567+ ?: ?=([%i *] b) [%n ~] [%i =(s.a s.b)]
1577− ?: ?=([$i *] b) [%f =(s.a s.b) zer]
1568+ ?: ?=([%i *] b) [%f =(s.a s.b) zer]
1578− ?: =(a.a 0) ?: =(a.b 0) [%n ~] [%f =(s.a s.b) zer]
1569+ ?: =(a.a 0) ?: =(a.b 0) [%n ~] [%f =(s.a s.b) zer]
1579− ?: =(a.b 0) [%i =(s.a s.b)]
1570+ ?: =(a.b 0) [%i =(s.a s.b)]
1580− ?: =(s.a s.b) (^div +>.a +>.b)
1571+ ?: =(s.a s.b) (^div +>.a +>.b)
1581− =.(r swr (fli (^div +>.a +>.b)))
1572+ =.(r swr (fli (^div +>.a +>.b)))
1582```
1573```
1583
1574
1584---
1575---
@@ -1605,16 +1596,16 @@ An `fn`.
1605#### Source
1596#### Source
1606
1597
1607```hoon
1598```hoon
1608− ++ fma
1599+++ fma
1609− |= [a=fn b=fn c=fn] ^- fn
1600+ |= [a=fn b=fn c=fn] ^- fn
1610− (add (emu a b) c)
1601+ (add (emu a b) c)
1611```
1602```
1612
1603
1613#### Examples
1604#### Examples
1614
1605
1615```
1606```
1616− > (fma:fl [%f & --13 2.718] [%f & --23 11] [%f & --13 2.718])
1607+> (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]=
1608+[%f s=%.y e=-62 a=9.475.054.514.089.037.465.004.673.635.188.736]=
1618```
1609```
1619
1610
1620---
1611---
@@ -1636,19 +1627,19 @@ An `fn`.
1636#### Source
1627#### Source
1637
1628
1638```hoon
1629```hoon
1639− ++ sqt
1630+++ sqt
1640− |= [a=fn] ^- fn
1631+ |= [a=fn] ^- fn
1641− ?: ?=([$n *] a) [%n ~]
1632+ ?: ?=([%n *] a) [%n ~]
1642− ?: ?=([$i *] a) ?:(s.a a [%n ~])
1633+ ?: ?=([%i *] a) ?:(s.a a [%n ~])
1643− ?~ a.a [%f s.a zer]
1634+ ?~ a.a [%f s.a zer]
1644− ?: s.a (^sqt +>.a) [%n ~]
1635+ ?: s.a (^sqt +>.a) [%n ~]
1645```
1636```
1646
1637
1647#### Examples
1638#### Examples
1648
1639
1649```
1640```
1650− > (sqt:fl [%f s=%.y e=-18 a=342.602.577])
1641+> (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]
1642+[%f s=%.y e=-107 a=5.865.903.143.604.945.574.132.671.852.050.553]
1652```
1643```
1653
1644
1654---
1645---
@@ -1670,28 +1661,28 @@ An `fn`.
1670#### Source
1661#### Source
1671
1662
1672```hoon
1663```hoon
1673− ++ inv
1664+++ inv
1674− |= [a=fn] ^- fn
1665+ |= [a=fn] ^- fn
1675− (div [%f & --0 1] a)
1666+ (div [%f & --0 1] a)
1676```
1667```
1677
1668
1678#### Examples
1669#### Examples
1679
1670
1680```
1671```
1681− > (inv:fl [%f s=%.y e=--0 a=10])
1672+> (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]
1673+[%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])
1674+> (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]
1675+[%d s=%.y e=-1 a=1]
1685
1676
1686− > (inv:fl [%f s=%.y e=--1 a=10])
1677+> (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]
1678+[%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])
1679+> (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]
1680+[%d s=%.y e=-2 a=5]
1690
1681
1691− > (inv:fl [%f s=%.y e=--2 a=10])
1682+> (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]
1683+[%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])
1684+> (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]
1685+[%d s=%.y e=-3 a=25]
1695```
1686```
1696
1687
1697---
1688---
@@ -1713,22 +1704,22 @@ An `fn`.
1713#### Source
1704#### Source
1714
1705
1715```hoon
1706```hoon
1716− ++ sun
1707+++ sun
1717− |= [a=@u] ^- fn
1708+ |= [a=@u] ^- fn
1718− (rou [%f & --0 a])
1709+ (rou [%f & --0 a])
1719```
1710```
1720
1711
1721#### Examples
1712#### Examples
1722
1713
1723```
1714```
1724− > (sun:fl 0)
1715+> (sun:fl 0)
1725− [%f s=%.y e=--0 a=0]
1716+[%f s=%.y e=--0 a=0]
1726
1717
1727− > (sun:fl 5.048.729)
1718+> (sun:fl 5.048.729)
1728− [%f s=%.y e=-90 a=6.250.023.776.601.238.669.911.180.544.311.296]
1719+[%f s=%.y e=-90 a=6.250.023.776.601.238.669.911.180.544.311.296]
1729
1720
1730− > (sun:fl -100)
1721+> (sun:fl -100)
1731− ! exit
1722+! exit
1732```
1723```
1733
1724
1734---
1725---
@@ -1750,20 +1741,20 @@ An `fn`.
1750#### Source
1741#### Source
1751
1742
1752```hoon
1743```hoon
1753− ++ san
1744+++ san
1754− |= [a=@s] ^- fn
1745+ |= [a=@s] ^- fn
1755− =+ b=(old:si a)
1746+ =+ b=(old:si a)
1756− (rou [%f -.b --0 +.b])
1747+ (rou [%f -.b --0 +.b])
1757```
1748```
1758
1749
1759#### Examples
1750#### Examples
1760
1751
1761```
1752```
1762− > (san:fl --100)
1753+> (san:fl --100)
1763− [%f s=%.y e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1754+[%f s=%.y e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1764
1755
1765− > (san:fl -100)
1756+> (san:fl -100)
1766− [%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1757+[%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
1767```
1758```
1768
1759
1769---
1760---
@@ -1788,29 +1779,29 @@ A `unit` of `flag`.
1788#### Source
1779#### Source
1789
1780
1790```hoon
1781```hoon
1791− ++ lth
1782+++ lth
1792− |= [a=fn b=fn] ^- (unit ?)
1783+ |= [a=fn b=fn] ^- (unit ?)
1793− ?: |(?=([$n *] a) ?=([$n *] b)) ~ :- ~
1784+ ?: |(?=([%n *] a) ?=([%n *] b)) ~ :- ~
1794− ?: =(a b) |
1785+ ?: =(a b) |
1795− ?: ?=([$i *] a) !s.a ?: ?=([$i *] b) s.b
1786+ ?: ?=([%i *] a) !s.a ?: ?=([%i *] b) s.b
1796− ?: |(=(a.a 0) =(a.b 0))
1787+ ?: |(=(a.a 0) =(a.b 0))
1797− ?: &(=(a.a 0) =(a.b 0)) |
1788+ ?: &(=(a.a 0) =(a.b 0)) |
1798− ?: =(a.a 0) s.b !s.a
1789+ ?: =(a.a 0) s.b !s.a
1799− ?: !=(s.a s.b) s.b
1790+ ?: !=(s.a s.b) s.b
1800− ?: s.a (^lth +>.a +>.b) (^lth +>.b +>.a)
1791+ ?: s.a (^lth +>.a +>.b) (^lth +>.b +>.a)
1801```
1792```
1802
1793
1803#### Examples
1794#### Examples
1804
1795
1805```
1796```
1806− > (lth:fl (sun:fl 116) (sun:fl 4.820))
1797+> (lth:fl (sun:fl 116) (sun:fl 4.820))
1807− [~ u=%.y]
1798+[~ u=%.y]
1808
1799
1809− > (lth:fl (sun:fl 218.116) (sun:fl 4.820))
1800+> (lth:fl (sun:fl 218.116) (sun:fl 4.820))
1810− [~ u=%.n]
1801+[~ u=%.n]
1811
1802
1812− > (lth:fl (sun:fl 218.116) [%n ~])
1803+> (lth:fl (sun:fl 218.116) [%n ~])
1813− ~
1804+~
1814```
1805```
1815
1806
1816---
1807---
@@ -1835,28 +1826,28 @@ A `unit` of `flag`.
1835#### Source
1826#### Source
1836
1827
1837```hoon
1828```hoon
1838− ++ lte
1829+++ lte
1839− |= [a=fn b=fn] ^- (unit ?)
1830+ |= [a=fn b=fn] ^- (unit ?)
1840− %+ bind (lth b a) |= a=? !a
1831+ %+ bind (lth b a) |= a=? !a
1841```
1832```
1842
1833
1843#### Examples
1834#### Examples
1844
1835
1845```
1836```
1846− > (lte:fl (sun:fl 102) [%f %.y -5 973.655.724])
1837+> (lte:fl (sun:fl 102) [%f %.y -5 973.655.724])
1847− [~ u=%.y]
1838+[~ u=%.y]
1848
1839
1849− > (lte:fl (sun:fl 102) [%f %.y -24 973.655.724])
1840+> (lte:fl (sun:fl 102) [%f %.y -24 973.655.724])
1850− [~ u=%.n]
1841+[~ u=%.n]
1851
1842
1852− > (lte:fl [%f %.y --2 25] (sun:fl 100))
1843+> (lte:fl [%f %.y --2 25] (sun:fl 100))
1853− [~ u=%.y]
1844+[~ u=%.y]
1854
1845
1855− > (lte:fl [%f %.y --2 25] [%f %.y --3 2])
1846+> (lte:fl [%f %.y --2 25] [%f %.y --3 2])
1856− [~ u=%.n]
1847+[~ u=%.n]
1857
1848
1858− > (lte:fl [%f %.y --2 25] [%n ~])
1849+> (lte:fl [%f %.y --2 25] [%n ~])
1859− ~
1850+~
1860```
1851```
1861
1852
1862---
1853---
@@ -1881,25 +1872,25 @@ An `unit` of `flag`.
1881#### Source
1872#### Source
1882
1873
1883```hoon
1874```hoon
1884− ++ equ
1875+++ equ
1885− |= [a=fn b=fn] ^- (unit ?)
1876+ |= [a=fn b=fn] ^- (unit ?)
1886− ?: |(?=([$n *] a) ?=([$n *] b)) ~ :- ~
1877+ ?: |(?=([%n *] a) ?=([%n *] b)) ~ :- ~
1887− ?: =(a b) &
1878+ ?: =(a b) &
1888− ?: |(?=([$i *] a) ?=([$i *] b)) |
1879+ ?: |(?=([%i *] a) ?=([%i *] b)) |
1889− ?: |(=(a.a 0) =(a.b 0))
1880+ ?: |(=(a.a 0) =(a.b 0))
1890− ?: &(=(a.a 0) =(a.b 0)) & |
1881+ ?: &(=(a.a 0) =(a.b 0)) & |
1891− ?: |(=(e.a e.b) !=(s.a s.b)) |
1882+ ?: |(=(e.a e.b) !=(s.a s.b)) |
1892− (^equ +>.a +>.b)
1883+ (^equ +>.a +>.b)
1893```
1884```
1894
1885
1895#### Examples
1886#### Examples
1896
1887
1897```
1888```
1898− > (equ:fl [%f %.y --2 25] (sun:fl 100))
1889+> (equ:fl [%f %.y --2 25] (sun:fl 100))
1899− [~ u=%.y]
1890+[~ u=%.y]
1900
1891
1901− > (equ:fl [%f %.y --2 25] (sun:fl 101))
1892+> (equ:fl [%f %.y --2 25] (sun:fl 101))
1902− [~ u=%.n]
1893+[~ u=%.n]
1903```
1894```
1904
1895
1905---
1896---
@@ -1924,21 +1915,21 @@ An `unit` of `flag`.
1924#### Source
1915#### Source
1925
1916
1926```hoon
1917```hoon
1927− ++ gte
1918+++ gte
1928− |= [a=fn b=fn] ^- (unit ?) (lte b a)
1919+ |= [a=fn b=fn] ^- (unit ?) (lte b a)
1929```
1920```
1930
1921
1931#### Examples
1922#### Examples
1932
1923
1933```
1924```
1934− > (gte:fl [%f %.y --2 25] (sun:fl 100))
1925+> (gte:fl [%f %.y --2 25] (sun:fl 100))
1935− [~ u=%.y]
1926+[~ u=%.y]
1936
1927
1937− > (gth:fl [%f %.y --6 73.989] [%f %.y --5 919.599])
1928+> (gth:fl [%f %.y --6 73.989] [%f %.y --5 919.599])
1938− [~ u=%.n]
1929+[~ u=%.n]
1939
1930
1940− > (gth:fl [%f %.y --6 73.989] [%n ~])
1931+> (gth:fl [%f %.y --6 73.989] [%n ~])
1941− ~
1932+~
1942```
1933```
1943
1934
1944---
1935---
@@ -1963,18 +1954,18 @@ An `unit` of `flag`.
1963#### Source
1954#### Source
1964
1955
1965```hoon
1956```hoon
1966− ++ gth
1957+++ gth
1967− |= [a=fn b=fn] ^- (unit ?) (lth b a)
1958+ |= [a=fn b=fn] ^- (unit ?) (lth b a)
1968```
1959```
1969
1960
1970#### Examples
1961#### Examples
1971
1962
1972```
1963```
1973− > (gth:fl [%f %.y --2 25] (sun:fl 100))
1964+> (gth:fl [%f %.y --2 25] (sun:fl 100))
1974− [~ u=%.n]
1965+[~ u=%.n]
1975
1966
1976− > (gth:fl [%f %.y --6 73.989] [%f %.y --5 119.599])
1967+> (gth:fl [%f %.y --6 73.989] [%f %.y --5 119.599])
1977− [~ u=%.y]
1968+[~ u=%.y]
1978```
1969```
1979
1970
1980---
1971---
@@ -1997,19 +1988,19 @@ A `dn`.
1997#### Source
1988#### Source
1998
1989
1999```hoon
1990```hoon
2000− ++ drg
1991+++ drg
2001− |= [a=fn] ^- dn
1992+ |= [a=fn] ^- dn
2002− ?: ?=([$n *] a) [%n ~]
1993+ ?: ?=([%n *] a) [%n ~]
2003− ?: ?=([$i *] a) [%i s.a]
1994+ ?: ?=([%i *] a) [%i s.a]
2004− ?~ a.a [%d s.a --0 0]
1995+ ?~ a.a [%d s.a --0 0]
2005− [%d s.a (^drg +>.a)]
1996+ [%d s.a (^drg +>.a)]
2006```
1997```
2007
1998
2008#### Examples
1999#### Examples
2009
2000
2010```
2001```
2011− > (drg:fl [%f | --6 73.989])
2002+> (drg:fl [%f | --6 73.989])
2012− [%d s=%.n e=--0 a=4.735.296]
2003+[%d s=%.n e=--0 a=4.735.296]
2013```
2004```
2014
2005
2015---
2006---
@@ -2031,25 +2022,25 @@ An `fn`.
2031#### Source
2022#### Source
2032
2023
2033```hoon
2024```hoon
2034− ++ grd
2025+++ grd
2035− |= [a=dn] ^- fn
2026+ |= [a=dn] ^- fn
2036− ?: ?=([$n *] a) [%n ~]
2027+ ?: ?=([%n *] a) [%n ~]
2037− ?: ?=([$i *] a) [%i s.a]
2028+ ?: ?=([%i *] a) [%i s.a]
2038− => .(r %n)
2029+ => .(r %n)
2039− =+ q=(abs:si e.a)
2030+ =+ q=(abs:si e.a)
2040− ?: (syn:si e.a)
2031+ ?: (syn:si e.a)
2041− (mul [%f s.a --0 a.a] [%f & e.a (pow 5 q)])
2032+ (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)])
2033+ (div [%f s.a --0 a.a] [%f & (sun:si q) (pow 5 q)])
2043```
2034```
2044
2035
2045#### Examples
2036#### Examples
2046
2037
2047```
2038```
2048− > (grd:fl [%d s=%.n e=--0 a=73.989])
2039+> (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]
2040+[%f s=%.n e=-96 a=5.862.012.516.267.904.074.208.723.341.410.304]
2050
2041
2051− > (grd:fl [%d s=%.n e=--0 a=100])
2042+> (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]
2043+[%f s=%.n e=-106 a=8.112.963.841.460.668.169.578.900.514.406.400]
2053```
2044```
2054
2045
2055---
2046---
@@ -2066,24 +2057,24 @@ Rounds `a` to the nearest signed integer.
2066
2057
2067#### Produces
2058#### Produces
2068
2059
2069−A `unit` of @s.
2060+A `unit` of `@s`.
2070
2061
2071#### Source
2062#### Source
2072
2063
2073```hoon
2064```hoon
2074− ++ toi
2065+++ toi
2075− |= [a=fn] ^- (unit @s)
2066+ |= [a=fn] ^- (unit @s)
2076− =+ b=(toj a)
2067+ =+ b=(toj a)
2077− ?. ?=([$f *] b) ~ :- ~
2068+ ?. ?=([%f *] b) ~ :- ~
2078− =+ c=(^^mul (bex (abs:si e.b)) a.b)
2069+ =+ c=(^^mul (bex (abs:si e.b)) a.b)
2079− (new:si s.b c)
2070+ (new:si s.b c)
2080```
2071```
2081
2072
2082#### Examples
2073#### Examples
2083
2074
2084```
2075```
2085− > (toi:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2076+> (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]
2077+[~ u=--26.843.545.600]
2087```
2078```
2088
2079
2089---
2080---
@@ -2100,34 +2091,33 @@ Rounds `a` to the nearest decimal integer.
2100
2091
2101#### Produces
2092#### Produces
2102
2093
2103−A `unit` of @s.
2094+A `unit` of `@s`.
2104
2095
2105#### Source
2096#### Source
2106
2097
2107```hoon
2098```hoon
2108− ++ toj
2099+++ toj
2109− |= [a=fn] ^- fn
2100+ |= [a=fn] ^- fn
2110− ?. ?=([$f *] a) a
2101+ ?. ?=([%f *] a) a
2111− ?~ a.a [%f s.a zer]
2102+ ?~ a.a [%f s.a zer]
2112− ?: s.a (^toj +>.a)
2103+ ?: s.a (^toj +>.a)
2113− =.(r swr (fli (^toj +>.a)))
2104+ =.(r swr (fli (^toj +>.a)))
2114− --
2115```
2105```
2116
2106
2117#### Examples
2107#### Examples
2118
2108
2119```
2109```
2120− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514.406.400])
2110+> (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]
2111+[%f s=%.y e=--0 a=26.843.545.600]
2122
2112
2123− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460.668.169.578.900.514])
2113+> (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]
2114+[%f s=%.y e=--0 a=26.844]
2125
2115
2126− > (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460])
2116+> (toj:fl [%f s=%.y e=-78 a=8.112.963.841.460])
2127− [%f s=%.y e=--0 a=0]
2117+[%f s=%.y e=--0 a=0]
2128
2118
2129− > (toj:fl [%f s=%.y e=-9 a=9.002])
2119+> (toj:fl [%f s=%.y e=-9 a=9.002])
2130− [%f s=%.y e=--0 a=16]
2120+[%f s=%.y e=--0 a=16]
2131```
2121```
2132
2122
2133---
2123---
@@ -2141,23 +2131,22 @@ Container core for IEEE-754 formatting operations.
2141- `w` is width: The number of bits in the exponent field.
2131- `w` is width: The number of bits in the exponent field.
2142- `p` is precision: The number of bits in the significand field.
2132- `p` is precision: The number of bits in the significand field.
2143- `w` is bias: Added to exponent when storing.
2133- `w` is bias: Added to exponent when storing.
2144−- `r` is rounding mode: Possible modes are nearest (`$n`), up (`$u`),
2134+- `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`.
2135+ down (`%d`), to zero (`%z`), and away from zero (`%a`). Default value is `%a`.
2146
2136
2147#### Source
2137#### Source
2148
2138
2149```hoon
2139```hoon
2150− ++ ff
2140+++ ff
2151− |_ [[w=@u p=@u b=@s] r=$?($n $u $d $z $a)]
2141+ |_ [[w=@u p=@u b=@s] r=$?(%n %u %d %z %a)]
2152```
2142```
2153
2143
2154#### Examples
2144#### Examples
2155
2145
2156```
2146```
2157− > =ffcore ~(. ff [8 8 0] %n)
2147+> =ffcore ~(. ff [8 8 0] %n)
2158− > ffcore
2148+> ffcore
2159− <24.ltg {{{@ud @ud @ud} r/$n} <54.tyv 119.wim 31.ohr 1.jmk $143>}>
2149+<24.ltg {{{@ud @ud @ud} r/$n} <54.tyv 119.wim 31.ohr 1.jmk $143>}>
2160− >
2161```
2150```
2162
2151
2163---
2152---
@@ -2179,14 +2168,14 @@ Produces the sign bit of `++ff`.
2179#### Source
2168#### Source
2180
2169
2181```hoon
2170```hoon
2182− ++ sb (bex (^add w p))
2171+++ sb (bex (^add w p))
2183```
2172```
2184
2173
2185#### Examples
2174#### Examples
2186
2175
2187```
2176```
2188− > sb:ff
2177+> sb:ff
2189− 1
2178+1
2190```
2179```
2191
2180
2192---
2181---
@@ -2200,14 +2189,14 @@ Produces the minimum possible exponent of `ff`.
2200#### Source
2189#### Source
2201
2190
2202```hoon
2191```hoon
2203− ++ me (dif:si (dif:si --1 b) (sun:si p))
2192+++ me (dif:si (dif:si --1 b) (sun:si p))
2204```
2193```
2205
2194
2206#### Examples
2195#### Examples
2207
2196
2208```
2197```
2209− > me:ff
2198+> me:ff
2210− --1
2199+--1
2211```
2200```
2212
2201
2213---
2202---
@@ -2222,20 +2211,20 @@ configuration of the `ff` core.
2222#### Source
2211#### Source
2223
2212
2224```hoon
2213```hoon
2225− ++ pa
2214+++ pa
2226− %*(. fl p +(p), v me, w (^sub (bex w) 3), d %d, r r)
2215+ %*(. fl p +(p), v me, w (^sub (bex w) 3), d %d, r r)
2227```
2216```
2228
2217
2229#### Examples
2218#### Examples
2230
2219
2231```
2220```
2232− > ~(pa ff [11 52 --1.023] %n)
2221+> ~(pa ff [11 52 --1.023] %n)
2233− < 23.qzd
2222+< 23.qzd
2234− 28.btz
2223+ 28.btz
2235− { {{p/@ v/@s w/@} r/?($n $u $a $d $z) d/$d}
2224+ { {{p/@ v/@s w/@} r/?($n $u $a $d $z) d/$d}
2236− <54.tyv 119.wim 31.ohr 1.jmk $143>
2225+ <54.tyv 119.wim 31.ohr 1.jmk $143>
2237− }
2226+ }
2238− >
2227+>
2239```
2228```
2240
2229
2241#### Discussion
2230#### Discussion
@@ -2257,29 +2246,29 @@ Converts `a` from `@r` to `fn`.
2257
2246
2258#### Produces
2247#### Produces
2259
2248
2260−A `unit` of @s.
2249+A `unit` of `@s`.
2261
2250
2262#### Source
2251#### Source
2263
2252
2264```hoon
2253```hoon
2265− ++ sea
2254+++ sea
2266− |= [a=@r] ^- fn
2255+ |= [a=@r] ^- fn
2267− =+ [f=(cut 0 [0 p] a) e=(cut 0 [p w] a)]
2256+ =+ [f=(cut 0 [0 p] a) e=(cut 0 [p w] a)]
2268− =+ s=(sig a)
2257+ =+ s=(sig a)
2269− ?: =(e 0)
2258+ ?: =(e 0)
2270− ?: =(f 0) [%f s --0 0] [%f s me f]
2259+ ?: =(f 0) [%f s --0 0] [%f s me f]
2271− ?: =(e (fil 0 w 1))
2260+ ?: =(e (fil 0 w 1))
2272− ?: =(f 0) [%i s] [%n ~]
2261+ ?: =(f 0) [%i s] [%n ~]
2273− =+ q=:(sum:si (sun:si e) me -1)
2262+ =+ q=:(sum:si (sun:si e) me -1)
2274− =+ r=(^add f (bex p))
2263+ =+ r=(^add f (bex p))
2275− [%f s q r]
2264+ [%f s q r]
2276```
2265```
2277
2266
2278#### Examples
2267#### Examples
2279
2268
2280```
2269```
2281− > (sea:ff `@r`0x8)
2270+> (sea:ff `@r`0x8)
2282− [%f s=%.y e=--0 a=0]
2271+[%f s=%.y e=--0 a=0]
2283```
2272```
2284
2273
2285---
2274---
@@ -2301,14 +2290,14 @@ A `@r`.
2301#### Source
2290#### Source
2302
2291
2303```hoon
2292```hoon
2304− ++ bit |= [a=fn] (bif (rou:pa a))
2293+++ bit |= [a=fn] (bif (rou:pa a))
2305```
2294```
2306
2295
2307#### Examples
2296#### Examples
2308
2297
2309```
2298```
2310− > (bit:ma:rd [%f | -6 202])
2299+> (bit:ma:rd [%f | -6 202])
2311− 0xc009400000000000
2300+0xc009400000000000
2312```
2301```
2313
2302
2314---
2303---
@@ -2330,28 +2319,28 @@ A `flag`.
2330#### Source
2319#### Source
2331
2320
2332```hoon
2321```hoon
2333− ++ bif
2322+++ bif
2334− |= [a=fn] ^- @r
2323+ |= [a=fn] ^- @r
2335− ?: ?=([$i *] a)
2324+ ?: ?=([%i *] a)
2336− =+ q=(lsh 0 p (fil 0 w 1))
2325+ =+ q=(lsh [0 p] (fil 0 w 1))
2337− ?: s.a q (^add q sb)
2326+ ?: s.a q (^add q sb)
2338− ?: ?=([$n *] a) (lsh 0 (dec p) (fil 0 +(w) 1))
2327+ ?: ?=([%n *] a) (lsh [0 (dec p)] (fil 0 +(w) 1))
2339− ?~ a.a ?: s.a `@r`0 sb
2328+ ?~ a.a ?: s.a `@r`0 sb
2340− =+ ma=(met 0 a.a)
2329+ =+ ma=(met 0 a.a)
2341− ?. =(ma +(p))
2330+ ?. =(ma +(p))
2342− ?> =(e.a me)
2331+ ?> =(e.a me)
2343− ?> (^lth ma +(p))
2332+ ?> (^lth ma +(p))
2344− ?: s.a `@r`a.a (^add a.a sb)
2333+ ?: s.a `@r`a.a (^add a.a sb)
2345− =+ q=(sum:si (dif:si e.a me) --1)
2334+ =+ q=(sum:si (dif:si e.a me) --1)
2346− =+ r=(^add (lsh 0 p (abs:si q)) (end 0 p a.a))
2335+ =+ r=(^add (lsh [0 p] (abs:si q)) (end [0 p] a.a))
2347− ?: s.a r (^add r sb)
2336+ ?: s.a r (^add r sb)
2348```
2337```
2349
2338
2350#### Examples
2339#### Examples
2351
2340
2352```
2341```
2353− > (bif:ma:rd *fn)
2342+> (bif:ma:rd *fn)
2354− 0x7ff8000000000000
2343+0x7ff8000000000000
2355```
2344```
2356
2345
2357---
2346---
@@ -2373,16 +2362,16 @@ A `flag`.
2373#### Source
2362#### Source
2374
2363
2375```hoon
2364```hoon
2376− ++ sig
2365+++ sig
2377− |= [a=@r] ^- ?
2366+ |= [a=@r] ^- ?
2378− =(0 (cut 0 [(^add p w) 1] a))
2367+ =(0 (cut 0 [(^add p w) 1] a))
2379```
2368```
2380
2369
2381#### Examples
2370#### Examples
2382
2371
2383```
2372```
2384− > (sig:ff `@r`5)
2373+> (sig:ff `@r`5)
2385− %.n
2374+%.n
2386```
2375```
2387
2376
2388---
2377---
@@ -2404,16 +2393,16 @@ A signed integer.
2404#### Source
2393#### Source
2405
2394
2406```hoon
2395```hoon
2407− ++ exp
2396+++ exp
2408− |= [a=@r] ^- @s
2397+ |= [a=@r] ^- @s
2409− (dif:si (sun:si (cut 0 [p w] a)) b)
2398+ (dif:si (sun:si (cut 0 [p w] a)) b)
2410```
2399```
2411
2400
2412#### Examples
2401#### Examples
2413
2402
2414```
2403```
2415− > (exp:ff `@r`5)
2404+> (exp:ff `@r`5)
2416− --0
2405+--0
2417```
2406```
2418
2407
2419---
2408---
@@ -2437,16 +2426,16 @@ A `@r`, an IEEE float.
2437#### Source
2426#### Source
2438
2427
2439```hoon
2428```hoon
2440− ++ add
2429+++ add
2441− |= [a=@r b=@r]
2430+ |= [a=@r b=@r]
2442− (bif (add:pa (sea a) (sea b)))
2431+ (bif (add:pa (sea a) (sea b)))
2443```
2432```
2444
2433
2445#### Examples
2434#### Examples
2446
2435
2447```
2436```
2448− > (add:ma:rd `@r`5 `@r`11)
2437+> (add:ma:rd `@r`5 `@r`11)
2449− 0x10
2438+0x10
2450```
2439```
2451
2440
2452---
2441---
@@ -2470,16 +2459,16 @@ A `@r`, an IEEE float.
2470#### Source
2459#### Source
2471
2460
2472```hoon
2461```hoon
2473− ++ sub
2462+++ sub
2474− |= [a=@r b=@r]
2463+ |= [a=@r b=@r]
2475− (bif (sub:pa (sea a) (sea b)))
2464+ (bif (sub:pa (sea a) (sea b)))
2476```
2465```
2477
2466
2478#### Examples
2467#### Examples
2479
2468
2480```
2469```
2481− > (sub:ma:rd `@r`5 `@r`11)
2470+> (sub:ma:rd `@r`5 `@r`11)
2482− 0x8000000000000006
2471+0x8000000000000006
2483```
2472```
2484
2473
2485---
2474---
@@ -2503,16 +2492,16 @@ A `@r`, an IEEE float.
2503#### Multiply
2492#### Multiply
2504
2493
2505```hoon
2494```hoon
2506− ++ mul
2495+++ mul
2507− |= [a=@r b=@r]
2496+ |= [a=@r b=@r]
2508− (bif (mul:pa (sea a) (sea b)))
2497+ (bif (mul:pa (sea a) (sea b)))
2509```
2498```
2510
2499
2511#### Examples
2500#### Examples
2512
2501
2513```
2502```
2514− > (mul:ma:rd `@r`11 `@r`2)
2503+> (mul:ma:rd `@r`11 `@r`2)
2515− 0x0
2504+0x0
2516```
2505```
2517
2506
2518---
2507---
@@ -2536,16 +2525,16 @@ A `@r`, an IEEE float.
2536#### Source
2525#### Source
2537
2526
2538```hoon
2527```hoon
2539− ++ div
2528+++ div
2540− |= [a=@r b=@r]
2529+ |= [a=@r b=@r]
2541− (bif (div:pa (sea a) (sea b)))
2530+ (bif (div:pa (sea a) (sea b)))
2542```
2531```
2543
2532
2544#### Examples
2533#### Examples
2545
2534
2546```
2535```
2547− > (div:ma:rd `@r`175 `@r`26)
2536+> (div:ma:rd `@r`175 `@r`26)
2548− 0x401aec4ec4ec4ec4
2537+0x401aec4ec4ec4ec4
2549```
2538```
2550
2539
2551---
2540---
@@ -2572,16 +2561,16 @@ A `@r`, an IEEE float.
2572#### Source
2561#### Source
2573
2562
2574```hoon
2563```hoon
2575− ++ fma
2564+++ fma
2576− |= [a=@r b=@r c=@r]
2565+ |= [a=@r b=@r c=@r]
2577− (bif (fma:pa (sea a) (sea b) (sea c)))
2566+ (bif (fma:pa (sea a) (sea b) (sea c)))
2578```
2567```
2579
2568
2580#### Examples
2569#### Examples
2581
2570
2582```
2571```
2583− > (fma:ma:rd `@r`175 `@r`26 `@r`100)
2572+> (fma:ma:rd `@r`175 `@r`26 `@r`100)
2584− 0x64
2573+0x64
2585```
2574```
2586
2575
2587---
2576---
@@ -2603,16 +2592,16 @@ A `@r`, an IEEE float.
2603#### Source
2592#### Source
2604
2593
2605```hoon
2594```hoon
2606− ++ sqt
2595+++ sqt
2607− |= [a=@r]
2596+ |= [a=@r]
2608− (bif (sqt:pa (sea a)))
2597+ (bif (sqt:pa (sea a)))
2609```
2598```
2610
2599
2611#### Examples
2600#### Examples
2612
2601
2613```
2602```
2614− > (sqt:ma:rd `@r`175)
2603+> (sqt:ma:rd `@r`175)
2615− 0x1e9a751f9447b724
2604+0x1e9a751f9447b724
2616```
2605```
2617
2606
2618---
2607---
@@ -2636,18 +2625,18 @@ A `flag`.
2636#### Source
2625#### Source
2637
2626
2638```hoon
2627```hoon
2639− ++ lth
2628+++ lth
2640− |= [a=@r b=@r] (fall (lth:pa (sea a) (sea b)) |)
2629+ |= [a=@r b=@r] (fall (lth:pa (sea a) (sea b)) |)
2641```
2630```
2642
2631
2643#### Examples
2632#### Examples
2644
2633
2645```
2634```
2646− > (lth:ma:rd `@rd`1 `@rd`2)
2635+> (lth:ma:rd `@rd`1 `@rd`2)
2647− %.y
2636+%.y
2648
2637
2649− > (lth:ma:rd `@rd`10 `@rd`2)
2638+> (lth:ma:rd `@rd`10 `@rd`2)
2650− %.n
2639+%.n
2651```
2640```
2652
2641
2653---
2642---
@@ -2671,18 +2660,18 @@ A `flag`.
2671#### Source
2660#### Source
2672
2661
2673```hoon
2662```hoon
2674− ++ lte
2663+++ lte
2675− |= [a=@r b=@r] (fall (lte:pa (sea a) (sea b)) |)
2664+ |= [a=@r b=@r] (fall (lte:pa (sea a) (sea b)) |)
2676```
2665```
2677
2666
2678#### Examples
2667#### Examples
2679
2668
2680```
2669```
2681− > (lte:ma:rd `@rd`10 `@rd`2)
2670+> (lte:ma:rd `@rd`10 `@rd`2)
2682− %.n
2671+%.n
2683
2672
2684− > (lte:ma:rd `@rd`10 `@rd`10)
2673+> (lte:ma:rd `@rd`10 `@rd`10)
2685− %.y
2674+%.y
2686```
2675```
2687
2676
2688---
2677---
@@ -2706,18 +2695,18 @@ A `flag`.
2706#### Source
2695#### Source
2707
2696
2708```hoon
2697```hoon
2709− ++ equ
2698+++ equ
2710− |= [a=@r b=@r] (fall (equ:pa (sea a) (sea b)) |)
2699+ |= [a=@r b=@r] (fall (equ:pa (sea a) (sea b)) |)
2711```
2700```
2712
2701
2713#### Examples
2702#### Examples
2714
2703
2715```
2704```
2716− > (equ:ma:rd `@rd`10 `@rd`2)
2705+> (equ:ma:rd `@rd`10 `@rd`2)
2717− %.n
2706+%.n
2718
2707
2719− > (equ:ma:rd `@rd`10 `@rd`10)
2708+> (equ:ma:rd `@rd`10 `@rd`10)
2720− %.y
2709+%.y
2721```
2710```
2722
2711
2723---
2712---
@@ -2741,18 +2730,18 @@ A `flag`.
2741#### Source
2730#### Source
2742
2731
2743```hoon
2732```hoon
2744− ++ gte
2733+++ gte
2745− |= [a=@r b=@r] (fall (gte:pa (sea a) (sea b)) |)
2734+ |= [a=@r b=@r] (fall (gte:pa (sea a) (sea b)) |)
2746```
2735```
2747
2736
2748#### Examples
2737#### Examples
2749
2738
2750```
2739```
2751− > (gte:ma:rd `@rd`10 `@rd`10)
2740+> (gte:ma:rd `@rd`10 `@rd`10)
2752− %.y
2741+%.y
2753
2742
2754− > (gte:ma:rd `@rd`10 `@rd`11)
2743+> (gte:ma:rd `@rd`10 `@rd`11)
2755− %.n
2744+%.n
2756```
2745```
2757
2746
2758---
2747---
@@ -2776,18 +2765,18 @@ A `flag`.
2776#### Source
2765#### Source
2777
2766
2778```hoon
2767```hoon
2779− ++ gth
2768+++ gth
2780− |= [a=@r b=@r] (fall (gth:pa (sea a) (sea b)) |)
2769+ |= [a=@r b=@r] (fall (gth:pa (sea a) (sea b)) |)
2781```
2770```
2782
2771
2783#### Examples
2772#### Examples
2784
2773
2785```
2774```
2786− > (gth:ma:rd `@rd`10 `@rd`10)
2775+> (gth:ma:rd `@rd`10 `@rd`10)
2787− %.n
2776+%.n
2788
2777
2789− > (gth:ma:rd `@rd`10 `@rd`9)
2778+> (gth:ma:rd `@rd`10 `@rd`9)
2790− %.y
2779+%.y
2791```
2780```
2792
2781
2793---
2782---
@@ -2809,15 +2798,15 @@ A `@r`, an IEEE float.
2809#### Source
2798#### Source
2810
2799
2811```hoon
2800```hoon
2812− ++ sun
2801+++ sun
2813− |= [a=@u] (bit [%f & --0 a])
2802+ |= [a=@u] (bit [%f & --0 a])
2814```
2803```
2815
2804
2816#### Examples
2805#### Examples
2817
2806
2818```
2807```
2819− > (sun:ma:rd 658.149.282)
2808+> (sun:ma:rd 658.149.282)
2820− 0x41c39d47d1000000
2809+0x41c39d47d1000000
2821```
2810```
2822
2811
2823---
2812---
@@ -2839,15 +2828,15 @@ A `@r`, an IEEE float.
2839#### Source
2828#### Source
2840
2829
2841```hoon
2830```hoon
2842− ++ san
2831+++ san
2843− |= [a=@s] (bit [%f (syn:si a) --0 (abs:si a)])
2832+ |= [a=@s] (bit [%f (syn:si a) --0 (abs:si a)])
2844```
2833```
2845
2834
2846#### Examples
2835#### Examples
2847
2836
2848```
2837```
2849− > (san:ma:rd --10)
2838+> (san:ma:rd --10)
2850− 0x4024000000000000
2839+0x4024000000000000
2851```
2840```
2852
2841
2853---
2842---
@@ -2869,15 +2858,15 @@ A `flag` of `@s`.
2869#### Source
2858#### Source
2870
2859
2871```hoon
2860```hoon
2872− ++ toi
2861+++ toi
2873− |= [a=@r] (toi:pa (sea a))
2862+ |= [a=@r] (toi:pa (sea a))
2874```
2863```
2875
2864
2876#### Examples
2865#### Examples
2877
2866
2878```
2867```
2879− > (toi:ma:rd `@r`0x4af)
2868+> (toi:ma:rd `@r`0x4af)
2880− [~ u=--0]
2869+[~ u=--0]
2881```
2870```
2882
2871
2883---
2872---
@@ -2899,18 +2888,18 @@ A `dn`.
2899#### Source
2888#### Source
2900
2889
2901```hoon
2890```hoon
2902− ++ drg
2891+++ drg
2903− |= [a=@r] (drg:pa (sea a))
2892+ |= [a=@r] (drg:pa (sea a))
2904```
2893```
2905
2894
2906#### Examples
2895#### Examples
2907
2896
2908```
2897```
2909− > (drg:ma:rd `@r`0x41c0)
2898+> (drg:ma:rd `@r`0x41c0)
2910− [%d s=%.y e=-323 a=8.316]
2899+[%d s=%.y e=-323 a=8.316]
2911
2900
2912− > (drg:ma:rd (sun:ma:rd 658.149.282))
2901+> (drg:ma:rd (sun:ma:rd 658.149.282))
2913− [%d s=%.y e=--0 a=658.149.282]
2902+[%d s=%.y e=--0 a=658.149.282]
2914```
2903```
2915
2904
2916---
2905---
@@ -2932,16 +2921,15 @@ A `@r`, an IEEE float.
2932#### Source
2921#### Source
2933
2922
2934```hoon
2923```hoon
2935− ++ grd
2924+++ grd
2936− |= [a=dn] (bif (grd:pa a))
2925+ |= [a=dn] (bif (grd:pa a))
2937− --
2938```
2926```
2939
2927
2940#### Examples
2928#### Examples
2941
2929
2942```
2930```
2943− > (grd:ma:rd [%d s=%.y e=--0 a=658.149.282])
2931+> (grd:ma:rd [%d s=%.y e=--0 a=658.149.282])
2944− 0x41c39d47d1000000
2932+0x41c39d47d1000000
2945```
2933```
2946
2934
2947---
2935---
@@ -2963,14 +2951,14 @@ A `dn`.
2963#### Source
2951#### Source
2964
2952
2965```hoon
2953```hoon
2966− ++ rlyd |= a=@rd ^- dn (drg:rd a)
2954+++ rlyd |= a=@rd ^- dn (drg:rd a)
2967```
2955```
2968
2956
2969#### Examples
2957#### Examples
2970
2958
2971```
2959```
2972− > (rlyd .~2.4703e-320)
2960+> (rlyd .~2.4703e-320)
2973− [%d s=%.y e=-324 a=24.703]
2961+[%d s=%.y e=-324 a=24.703]
2974```
2962```
2975
2963
2976---
2964---
@@ -2992,14 +2980,14 @@ A `dn`.
2992#### Source
2980#### Source
2993
2981
2994```hoon
2982```hoon
2995− ++ rlys |= a=@rs ^- dn (drg:rs a)
2983+++ rlys |= a=@rs ^- dn (drg:rs a)
2996```
2984```
2997
2985
2998#### Examples
2986#### Examples
2999
2987
3000```
2988```
3001− > (rlys .1.681557e-39)
2989+> (rlys .1.681557e-39)
3002− [%d s=%.y e=-45 a=1.681.557]
2990+[%d s=%.y e=-45 a=1.681.557]
3003```
2991```
3004
2992
3005---
2993---
@@ -3021,14 +3009,14 @@ A `dn`.
3021#### Source
3009#### Source
3022
3010
3023```hoon
3011```hoon
3024− ++ rlyh |= a=@rh ^- dn (drg:rh a)
3012+++ rlyh |= a=@rh ^- dn (drg:rh a)
3025```
3013```
3026
3014
3027#### Examples
3015#### Examples
3028
3016
3029```
3017```
3030− > (rlyh .~~3e1)
3018+> (rlyh .~~3e1)
3031− [%d s=%.y e=--1 a=3]
3019+[%d s=%.y e=--1 a=3]
3032```
3020```
3033
3021
3034---
3022---
@@ -3050,14 +3038,14 @@ A `dn`.
3050#### Source
3038#### Source
3051
3039
3052```hoon
3040```hoon
3053− ++ rlyq |= a=@rq ^- dn (drg:rq a)
3041+++ rlyq |= a=@rq ^- dn (drg:rq a)
3054```
3042```
3055
3043
3056#### Examples
3044#### Examples
3057
3045
3058```
3046```
3059− > (rlyq .~~~2.2628017865927756787440310766086816e-4343)
3047+> (rlyq .~~~2.2628017865927756787440310766086816e-4343)
3060− [%d s=%.y e=-4.377 a=22.628.017.865.927.756.787.440.310.766.086.816]
3048+[%d s=%.y e=-4.377 a=22.628.017.865.927.756.787.440.310.766.086.816]
3061```
3049```
3062
3050
3063---
3051---
@@ -3079,14 +3067,14 @@ A a `@rd`, a double-precision float.
3079#### Source
3067#### Source
3080
3068
3081```hoon
3069```hoon
3082− ++ ryld |= a=dn ^- @rd (grd:rd a)
3070+++ ryld |= a=dn ^- @rd (grd:rd a)
3083```
3071```
3084
3072
3085#### Examples
3073#### Examples
3086
3074
3087```
3075```
3088− > (ryld [%d s=%.y e=-324 a=24.703])
3076+> (ryld [%d s=%.y e=-324 a=24.703])
3089− .~2.4703e-320
3077+.~2.4703e-320
3090```
3078```
3091
3079
3092---
3080---
@@ -3108,17 +3096,17 @@ A a `@rs`, a single-precision float.
3108#### Source
3096#### Source
3109
3097
3110```hoon
3098```hoon
3111− ++ ryls |= a=dn ^- @rs (grd:rs a)
3099+++ ryls |= a=dn ^- @rs (grd:rs a)
3112```
3100```
3113
3101
3114#### Examples
3102#### Examples
3115
3103
3116```
3104```
3117− > (ryls [%d s=%.y e=-324 a=24.703])
3105+> (ryls [%d s=%.y e=-324 a=24.703])
3118− .0
3106+.0
3119
3107
3120− > (ryls [%d s=%.y e=-32 a=24.703])
3108+> (ryls [%d s=%.y e=-32 a=24.703])
3121− .2.4703e-28
3109+.2.4703e-28
3122```
3110```
3123
3111
3124---
3112---
@@ -3140,20 +3128,20 @@ A a `@rh`, a half-precision float.
3140#### Source
3128#### Source
3141
3129
3142```hoon
3130```hoon
3143− ++ rylh |= a=dn ^- @rh (grd:rh a)
3131+++ rylh |= a=dn ^- @rh (grd:rh a)
3144```
3132```
3145
3133
3146#### Examples
3134#### Examples
3147
3135
3148```
3136```
3149− > (rylh [%d s=%.y e=--1 a=703])
3137+> (rylh [%d s=%.y e=--1 a=703])
3150− .~~7.032e3
3138+.~~7.032e3
3151
3139
3152− > (rylh [%d s=%.y e=--3 a=56])
3140+> (rylh [%d s=%.y e=--3 a=56])
3153− .~~5.6e4
3141+.~~5.6e4
3154
3142
3155− > (rylh [%d s=%.y e=--4 a=56])
3143+> (rylh [%d s=%.y e=--4 a=56])
3156− .~~inf
3144+.~~inf
3157```
3145```
3158
3146
3159---
3147---
@@ -3175,14 +3163,14 @@ A a `@rq`, a quad-precision float.
3175#### Source
3163#### Source
3176
3164
3177```hoon
3165```hoon
3178− ++ rylq |= a=dn ^- @rq (grd:rq a)
3166+++ rylq |= a=dn ^- @rq (grd:rq a)
3179```
3167```
3180
3168
3181#### Examples
3169#### Examples
3182
3170
3183```
3171```
3184− > (rylq [%d s=%.y e=-324 a=24.703])
3172+> (rylq [%d s=%.y e=-324 a=24.703])
3185− .~~~2.4703e-320
3173+.~~~2.4703e-320
3186```
3174```
3187
3175
3188---
3176---
@@ -3199,10 +3187,10 @@ down (`$d`), and round to zero (`$z`).
3199#### Source
3187#### Source
3200
3188
3201```hoon
3189```hoon
3202− ++ rd
3190+++ rd
3203− ^?
3191+ ^|
3204− ~% %rd +> ~
3192+ ~% %rd +> ~
3205− |_ r=$?($n $u $d $z)
3193+ |_ r=$?(%n %u %d %z)
3206```
3194```
3207
3195
3208---
3196---
@@ -3217,17 +3205,17 @@ configuration of the `rd` core.
3217#### Source
3205#### Source
3218
3206
3219```hoon
3207```hoon
3220− ++ ma
3208+++ ma
3221− %*(. ff w 11, p 52, b --1.023, r r)
3209+ %*(. ff w 11, p 52, b --1.023, r r)
3222```
3210```
3223
3211
3224#### Examples
3212#### Examples
3225
3213
3226```
3214```
3227− > ~(ma rd %n)
3215+> ~(ma rd %n)
3228− < 24.ltg
3216+< 24.ltg
3229− {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3217+ {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3230− >
3218+>
3231```
3219```
3232
3220
3233---
3221---
@@ -3238,16 +3226,18 @@ configuration of the `rd` core.
3238
3226
3239Converts `a` from a double-precision binary float to `fn`.
3227Converts `a` from a double-precision binary float to `fn`.
3240
3228
3229+#### Source
3230+
3241```hoon
3231```hoon
3242− ++ sea :: @rd to fn
3232+++ sea
3243− |= [a=@rd] (sea:ma a)
3233+ |= [a=@rd] (sea:ma a)
3244```
3234```
3245
3235
3246#### Examples
3236#### Examples
3247
3237
3248```
3238```
3249− > (sea:rd .~4.94066e-319)
3239+> (sea:rd .~4.94066e-319)
3250− [%f s=%.y e=-1.074 a=100.000]
3240+[%f s=%.y e=-1.074 a=100.000]
3251```
3241```
3252
3242
3253---
3243---
@@ -3269,15 +3259,15 @@ A `@rd`, a double-precision float.
3269#### Source
3259#### Source
3270
3260
3271```hoon
3261```hoon
3272− ++ bit
3262+++ bit
3273− |= [a=fn] ^- @rd (bit:ma a)
3263+ |= [a=fn] ^- @rd (bit:ma a)
3274```
3264```
3275
3265
3276#### Examples
3266#### Examples
3277
3267
3278```
3268```
3279− > (bit:rd [%f s=%.y e=-1.074 a=100.000])
3269+> (bit:rd [%f s=%.y e=-1.074 a=100.000])
3280− .~4.94066e-319
3270+.~4.94066e-319
3281```
3271```
3282
3272
3283---
3273---
@@ -3301,17 +3291,17 @@ A `@rd`.
3301#### Source
3291#### Source
3302
3292
3303```hoon
3293```hoon
3304− ++ add ~/ %add
3294+++ add ~/ %add
3305− |= [a=@rd b=@rd] ^- @rd
3295+ |= [a=@rd b=@rd] ^- @rd
3306− ~_ leaf+"rd-fail"
3296+ ~_ leaf+"rd-fail"
3307− (add:ma a b)
3297+ (add:ma a b)
3308```
3298```
3309
3299
3310#### Examples
3300#### Examples
3311
3301
3312```
3302```
3313− > (add:rd .~3.94066e12 .~9.2846e11)
3303+> (add:rd .~3.94066e12 .~9.2846e11)
3314− .~4.86912e12
3304+.~4.86912e12
3315```
3305```
3316
3306
3317---
3307---
@@ -3335,17 +3325,17 @@ A `@rd`.
3335#### Source
3325#### Source
3336
3326
3337```hoon
3327```hoon
3338− ++ sub ~/ %sub
3328+++ sub ~/ %sub
3339− |= [a=@rd b=@rd] ^- @rd
3329+ |= [a=@rd b=@rd] ^- @rd
3340− ~_ leaf+"rd-fail"
3330+ ~_ leaf+"rd-fail"
3341− (sub:ma a b)
3331+ (sub:ma a b)
3342```
3332```
3343
3333
3344#### Examples
3334#### Examples
3345
3335
3346```
3336```
3347− > (sub:rd .~7.94069e2 .~1.2846e3)
3337+> (sub:rd .~7.94069e2 .~1.2846e3)
3348− .~-4.9053099999999995e2
3338+.~-4.9053099999999995e2
3349```
3339```
3350
3340
3351---
3341---
@@ -3369,17 +3359,17 @@ A `@rd`.
3369#### Source
3359#### Source
3370
3360
3371```hoon
3361```hoon
3372− ++ mul ~/ %mul
3362+++ mul ~/ %mul
3373− |= [a=@rd b=@rd] ^- @rd
3363+ |= [a=@rd b=@rd] ^- @rd
3374− ~_ leaf+"rd-fail"
3364+ ~_ leaf+"rd-fail"
3375− (mul:ma a b)
3365+ (mul:ma a b)
3376```
3366```
3377
3367
3378#### Examples
3368#### Examples
3379
3369
3380```
3370```
3381− > (mul:rd .~7.94069e2 .~1.2246e3)
3371+> (mul:rd .~7.94069e2 .~1.2246e3)
3382− .~9.724168973999998e5
3372+.~9.724168973999998e5
3383```
3373```
3384
3374
3385---
3375---
@@ -3403,17 +3393,17 @@ A `@rd`.
3403#### Source
3393#### Source
3404
3394
3405```hoon
3395```hoon
3406− ++ div ~/ %div
3396+++ div ~/ %div
3407− |= [a=@rd b=@rd] ^- @rd
3397+ |= [a=@rd b=@rd] ^- @rd
3408− ~_ leaf+"rd-fail"
3398+ ~_ leaf+"rd-fail"
3409− (div:ma a b)
3399+ (div:ma a b)
3410```
3400```
3411
3401
3412#### Examples
3402#### Examples
3413
3403
3414```
3404```
3415− > (div:rd .~7.94099e2 .~1.2246e3)
3405+> (div:rd .~7.94099e2 .~1.2246e3)
3416− .~6.484558223093255e-1
3406+.~6.484558223093255e-1
3417```
3407```
3418
3408
3419---
3409---
@@ -3439,20 +3429,18 @@ A `@rd`.
3439
3429
3440#### Source
3430#### Source
3441
3431
3442−#### Source
3443−
3444```hoon
3432```hoon
3445− ++ fma ~/ %fma
3433+++ fma ~/ %fma
3446− |= [a=@rd b=@rd c=@rd] ^- @rd
3434+ |= [a=@rd b=@rd c=@rd] ^- @rd
3447− ~_ leaf+"rd-fail"
3435+ ~_ leaf+"rd-fail"
3448− (fma:ma a b c)
3436+ (fma:ma a b c)
3449```
3437```
3450
3438
3451#### Examples
3439#### Examples
3452
3440
3453```
3441```
3454− > (fma:rd .~7.94099e2 .~1.2246e3 .~3.94066e3)
3442+> (fma:rd .~7.94099e2 .~1.2246e3 .~3.94066e3)
3455− .~9.763942954e5
3443+.~9.763942954e5
3456```
3444```
3457
3445
3458---
3446---
@@ -3474,16 +3462,16 @@ A `@rd`.
3474#### Source
3462#### Source
3475
3463
3476```hoon
3464```hoon
3477− ++ sqt ~/ %sqt
3465+++ sqt ~/ %sqt
3478− |= [a=@rd] ^- @rd ~_ leaf+"rd-fail"
3466+ |= [a=@rd] ^- @rd ~_ leaf+"rd-fail"
3479− (sqt:ma a)
3467+ (sqt:ma a)
3480```
3468```
3481
3469
3482#### Examples
3470#### Examples
3483
3471
3484```
3472```
3485− > (sqt:rd .~3.94066e3)
3473+> (sqt:rd .~3.94066e3)
3486− .~6.2774676422901614e1
3474+.~6.2774676422901614e1
3487```
3475```
3488
3476
3489---
3477---
@@ -3507,23 +3495,23 @@ A `@rd`.
3507#### Source
3495#### Source
3508
3496
3509```hoon
3497```hoon
3510− ++ lth ~/ %lth
3498+++ lth ~/ %lth
3511− |= [a=@rd b=@rd]
3499+ |= [a=@rd b=@rd]
3512− ~_ leaf+"rd-fail"
3500+ ~_ leaf+"rd-fail"
3513− (lth:ma a b)
3501+ (lth:ma a b)
3514```
3502```
3515
3503
3516#### Examples
3504#### Examples
3517
3505
3518```
3506```
3519− > (lth:rd .~7.94099e2 .~1.2246e3)
3507+> (lth:rd .~7.94099e2 .~1.2246e3)
3520− %.y
3508+%.y
3521
3509
3522− > (lth:rd .~7.94099e2 .~1.2246e2)
3510+> (lth:rd .~7.94099e2 .~1.2246e2)
3523− %.n
3511+%.n
3524
3512
3525− > (lth:rd .~1.2246e2 .~1.2246e2)
3513+> (lth:rd .~1.2246e2 .~1.2246e2)
3526− %.n
3514+%.n
3527```
3515```
3528
3516
3529---
3517---
@@ -3547,23 +3535,23 @@ A `@rd`.
3547#### Source
3535#### Source
3548
3536
3549```hoon
3537```hoon
3550− ++ lte ~/ %lte :: less-equals
3538+++ lte ~/ %lte
3551− |= [a=@rd b=@rd]
3539+ |= [a=@rd b=@rd]
3552− ~_ leaf+"rd-fail"
3540+ ~_ leaf+"rd-fail"
3553− (lte:ma a b)
3541+ (lte:ma a b)
3554```
3542```
3555
3543
3556#### Examples
3544#### Examples
3557
3545
3558```
3546```
3559− > (lte:rd .~7.94099e2 .~1.2246e3)
3547+> (lte:rd .~7.94099e2 .~1.2246e3)
3560− %.y
3548+%.y
3561
3549
3562− > (lte:rd .~7.94099e2 .~1.2246e2)
3550+> (lte:rd .~7.94099e2 .~1.2246e2)
3563− %.n
3551+%.n
3564
3552
3565− > (lte:rd .~1.2246e2 .~1.2246e2)
3553+> (lte:rd .~1.2246e2 .~1.2246e2)
3566− %.y
3554+%.y
3567```
3555```
3568
3556
3569---
3557---
@@ -3587,23 +3575,23 @@ A `@rd`.
3587#### Source
3575#### Source
3588
3576
3589```hoon
3577```hoon
3590− ++ equ ~/ %equ
3578+++ equ ~/ %equ
3591− |= [a=@rd b=@rd]
3579+ |= [a=@rd b=@rd]
3592− ~_ leaf+"rd-fail"
3580+ ~_ leaf+"rd-fail"
3593− (equ:ma a b)
3581+ (equ:ma a b)
3594```
3582```
3595
3583
3596#### Examples
3584#### Examples
3597
3585
3598```
3586```
3599− > (equ:rd .~7.94099e2 .~1.2246e3)
3587+> (equ:rd .~7.94099e2 .~1.2246e3)
3600− %.n
3588+%.n
3601
3589
3602− > (equ:rd .~7.94099e2 .~1.2246e2)
3590+> (equ:rd .~7.94099e2 .~1.2246e2)
3603− %.n
3591+%.n
3604
3592
3605− > (equ:rd .~1.2246e2 .~1.2246e2)
3593+> (equ:rd .~1.2246e2 .~1.2246e2)
3606− %.y
3594+%.y
3607```
3595```
3608
3596
3609---
3597---
@@ -3627,23 +3615,23 @@ A `@rd`.
3627#### Source
3615#### Source
3628
3616
3629```hoon
3617```hoon
3630− ++ gte ~/ %gte
3618+++ gte ~/ %gte
3631− |= [a=@rd b=@rd]
3619+ |= [a=@rd b=@rd]
3632− ~_ leaf+"rd-fail"
3620+ ~_ leaf+"rd-fail"
3633− (gte:ma a b)
3621+ (gte:ma a b)
3634```
3622```
3635
3623
3636#### Examples
3624#### Examples
3637
3625
3638```
3626```
3639− > (gte:rd .~7.94099e2 .~1.2246e3)
3627+> (gte:rd .~7.94099e2 .~1.2246e3)
3640− %.n
3628+%.n
3641
3629
3642− > (gte:rd .~7.94099e2 .~1.2246e2)
3630+> (gte:rd .~7.94099e2 .~1.2246e2)
3643− %.y
3631+%.y
3644
3632
3645− > (gte:rd .~1.2246e2 .~1.2246e2)
3633+> (gte:rd .~1.2246e2 .~1.2246e2)
3646− %.y
3634+%.y
3647```
3635```
3648
3636
3649---
3637---
@@ -3667,23 +3655,23 @@ A `@rd`.
3667#### Source
3655#### Source
3668
3656
3669```hoon
3657```hoon
3670− ++ gth ~/ %gth
3658+++ gth ~/ %gth
3671− |= [a=@rd b=@rd]
3659+ |= [a=@rd b=@rd]
3672− ~_ leaf+"rd-fail"
3660+ ~_ leaf+"rd-fail"
3673− (gth:ma a b)
3661+ (gth:ma a b)
3674```
3662```
3675
3663
3676#### Examples
3664#### Examples
3677
3665
3678```
3666```
3679− > (gth:rd .~7.94099e2 .~1.2246e3)
3667+> (gth:rd .~7.94099e2 .~1.2246e3)
3680− %.n
3668+%.n
3681
3669
3682− > (gth:rd .~7.94099e2 .~1.2246e2)
3670+> (gth:rd .~7.94099e2 .~1.2246e2)
3683− %.y
3671+%.y
3684
3672
3685− > (gth:rd .~1.2246e2 .~1.2246e2)
3673+> (gth:rd .~1.2246e2 .~1.2246e2)
3686− %.n
3674+%.n
3687```
3675```
3688
3676
3689---
3677---
@@ -3705,14 +3693,14 @@ A `@rd`.
3705#### Source
3693#### Source
3706
3694
3707```hoon
3695```hoon
3708− ++ sun |= [a=@u] ^- @rd (sun:ma a)
3696+++ sun |= [a=@u] ^- @rd (sun:ma a)
3709```
3697```
3710
3698
3711#### Examples
3699#### Examples
3712
3700
3713```
3701```
3714− > (sun:rd 511)
3702+> (sun:rd 511)
3715− .~5.11e2
3703+.~5.11e2
3716```
3704```
3717
3705
3718---
3706---
@@ -3734,14 +3722,14 @@ A `@rd`.
3734#### Source
3722#### Source
3735
3723
3736```hoon
3724```hoon
3737− ++ san |= [a=@s] ^- @rd (san:ma a)
3725+++ san |= [a=@s] ^- @rd (san:ma a)
3738```
3726```
3739
3727
3740#### Examples
3728#### Examples
3741
3729
3742```
3730```
3743− > (san:rd -511)
3731+> (san:rd -511)
3744− .~-5.11e2
3732+.~-5.11e2
3745```
3733```
3746
3734
3747---
3735---
@@ -3763,14 +3751,14 @@ A `flag`.
3763#### Source
3751#### Source
3764
3752
3765```hoon
3753```hoon
3766− ++ sig |= [a=@rd] ^- ? (sig:ma a)
3754+++ sig |= [a=@rd] ^- ? (sig:ma a)
3767```
3755```
3768
3756
3769#### Examples
3757#### Examples
3770
3758
3771```
3759```
3772− > (sig:rd .~1.2246e3)
3760+> (sig:rd .~1.2246e3)
3773− %.y
3761+%.y
3774```
3762```
3775
3763
3776---
3764---
@@ -3792,14 +3780,14 @@ A `@s`.
3792#### Source
3780#### Source
3793
3781
3794```hoon
3782```hoon
3795− ++ exp |= [a=@rd] ^- @s (exp:ma a) :: get exponent
3783+++ exp |= [a=@rd] ^- @s (exp:ma a)
3796```
3784```
3797
3785
3798#### Examples
3786#### Examples
3799
3787
3800```
3788```
3801− > (exp:rd .~1.2246e3)
3789+> (exp:rd .~1.2246e3)
3802− --10
3790+--10
3803```
3791```
3804
3792
3805---
3793---
@@ -3821,14 +3809,14 @@ A `unit` of `@s`.
3821#### Source
3809#### Source
3822
3810
3823```hoon
3811```hoon
3824− ++ toi |= [a=@rd] ^- (unit @s) (toi:ma a)
3812+++ toi |= [a=@rd] ^- (unit @s) (toi:ma a)
3825```
3813```
3826
3814
3827#### Examples
3815#### Examples
3828
3816
3829```
3817```
3830− > (toi:rd .~1.2246e3)
3818+> (toi:rd .~1.2246e3)
3831− [~ u=--1.224]
3819+[~ u=--1.224]
3832```
3820```
3833
3821
3834---
3822---
@@ -3851,14 +3839,14 @@ A `dn`.
3851#### Source
3839#### Source
3852
3840
3853```hoon
3841```hoon
3854− ++ drg |= [a=@rd] ^- dn (drg:ma a)
3842+++ drg |= [a=@rd] ^- dn (drg:ma a)
3855```
3843```
3856
3844
3857#### Examples
3845#### Examples
3858
3846
3859```
3847```
3860− > (drg:rd .~1.2246e3)
3848+> (drg:rd .~1.2246e3)
3861− [%d s=%.y e=-1 a=12.246]
3849+[%d s=%.y e=-1 a=12.246]
3862```
3850```
3863
3851
3864---
3852---
@@ -3880,15 +3868,14 @@ A `@rd`.
3880#### Source
3868#### Source
3881
3869
3882```hoon
3870```hoon
3883− ++ grd |= [a=dn] ^- @rd (grd:ma a) :: decimal float to @rd
3871+++ grd |= [a=dn] ^- @rd (grd:ma a)
3884− --
3885```
3872```
3886
3873
3887#### Examples
3874#### Examples
3888
3875
3889```
3876```
3890− > (grd:rd [%d s=%.y e=-1 a=12.246])
3877+> (grd:rd [%d s=%.y e=-1 a=12.246])
3891− .~1.2246e3
3878+.~1.2246e3
3892```
3879```
3893
3880
3894---
3881---
@@ -3905,10 +3892,10 @@ down (`$d`), and round to zero (`$z`).
3905#### Source
3892#### Source
3906
3893
3907```hoon
3894```hoon
3908− ++ rs
3895+++ rs
3909− ~% %rs +> ~
3896+ ~% %rs +> ~
3910− ^?
3897+ ^|
3911− |_ r=$?($n $u $d $z)
3898+ |_ r=$?(%n %u %d %z)
3912```
3899```
3913
3900
3914---
3901---
@@ -3923,17 +3910,17 @@ configuration of the `rs` core.
3923#### Source
3910#### Source
3924
3911
3925```hoon
3912```hoon
3926− ++ ma
3913+++ ma
3927− %*(. ff w 8, p 23, b --127, r r)
3914+ %*(. ff w 8, p 23, b --127, r r)
3928```
3915```
3929
3916
3930#### Examples
3917#### Examples
3931
3918
3932```
3919```
3933− > ~(ma rs %n)
3920+> ~(ma rs %n)
3934− < 24.ltg
3921+< 24.ltg
3935− {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3922+ {{{w/@ud p/@ud b/@sd} r/?($n $u $d $z)} <54.tyv 119.wim 31.ohr 1.jmk $143>}
3936− >
3923+>
3937```
3924```
3938
3925
3939---
3926---
@@ -3955,15 +3942,15 @@ An `fn`.
3955#### Source
3942#### Source
3956
3943
3957```hoon
3944```hoon
3958− ++ sea
3945+++ sea
3959− |= [a=@rs] (sea:ma a)
3946+ |= [a=@rs] (sea:ma a)
3960```
3947```
3961
3948
3962#### Examples
3949#### Examples
3963
3950
3964```
3951```
3965− > (sea:rs .1.4e-43)
3952+> (sea:rs .1.4e-43)
3966− [%f s=%.y e=-149 a=100]
3953+[%f s=%.y e=-149 a=100]
3967```
3954```
3968
3955
3969---
3956---
@@ -3985,15 +3972,15 @@ A `@rs`, a single-precision float.
3985#### Source
3972#### Source
3986
3973
3987```hoon
3974```hoon
3988− ++ bit
3975+++ bit
3989− |= [a=fn] ^- @rs (bit:ma a)
3976+ |= [a=fn] ^- @rs (bit:ma a)
3990```
3977```
3991
3978
3992#### Examples
3979#### Examples
3993
3980
3994```
3981```
3995− > (bit:rs [%f & -2 1.000])
3982+> (bit:rs [%f & -2 1.000])
3996− .2.5e2
3983+.2.5e2
3997```
3984```
3998
3985
3999---
3986---
@@ -4017,17 +4004,17 @@ A `@rs`.
4017#### Source
4004#### Source
4018
4005
4019```hoon
4006```hoon
4020− ++ add ~/ %add
4007+++ add ~/ %add
4021− |= [a=@rs b=@rs] ^- @rs
4008+ |= [a=@rs b=@rs] ^- @rs
4022− ~_ leaf+"rs-fail"
4009+ ~_ leaf+"rs-fail"
4023− (add:ma a b)
4010+ (add:ma a b)
4024```
4011```
4025
4012
4026#### Examples
4013#### Examples
4027
4014
4028```
4015```
4029− > (add:rs .2.5e1 .2.5e2)
4016+> (add:rs .2.5e1 .2.5e2)
4030− .2.75e2
4017+.2.75e2
4031```
4018```
4032
4019
4033---
4020---
@@ -4038,20 +4025,26 @@ Subtract
4038
4025
4039Subtracts `a` from `b`.
4026Subtracts `a` from `b`.
4040
4027
4028+#### Accepts
4029+
4030+`a` is a `@rs`.
4031+
4032+`b` is a `@rs`.
4033+
4041#### Source
4034#### Source
4042
4035
4043```hoon
4036```hoon
4044− ++ sub ~/ %sub
4037+++ sub ~/ %sub
4045− |= [a=@rs b=@rs] ^- @rs
4038+ |= [a=@rs b=@rs] ^- @rs
4046− ~_ leaf+"rs-fail"
4039+ ~_ leaf+"rs-fail"
4047− (sub:ma a b)
4040+ (sub:ma a b)
4048```
4041```
4049
4042
4050#### Examples
4043#### Examples
4051
4044
4052```
4045```
4053− > (sub:rs .2.5e1 .2.5e2)
4046+> (sub:rs .2.5e1 .2.5e2)
4054− .-2.25e2
4047+.-2.25e2
4055```
4048```
4056
4049
4057---
4050---
@@ -4075,17 +4068,17 @@ A `@rs`.
4075#### Source
4068#### Source
4076
4069
4077```hoon
4070```hoon
4078− ++ mul ~/ %mul
4071+++ mul ~/ %mul
4079− |= [a=@rs b=@rs] ^- @rs
4072+ |= [a=@rs b=@rs] ^- @rs
4080− ~_ leaf+"rs-fail"
4073+ ~_ leaf+"rs-fail"
4081− (mul:ma a b)
4074+ (mul:ma a b)
4082```
4075```
4083
4076
4084#### Examples
4077#### Examples
4085
4078
4086```
4079```
4087− > (mul:rs .2.5e1 .2.5e2)
4080+> (mul:rs .2.5e1 .2.5e2)
4088− .6.25e3
4081+.6.25e3
4089```
4082```
4090
4083
4091---
4084---
@@ -4109,17 +4102,17 @@ A `@rs`.
4109#### Source
4102#### Source
4110
4103
4111```hoon
4104```hoon
4112− ++ div ~/ %div
4105+++ div ~/ %div
4113− |= [a=@rs b=@rs] ^- @rs
4106+ |= [a=@rs b=@rs] ^- @rs
4114− ~_ leaf+"rs-fail"
4107+ ~_ leaf+"rs-fail"
4115− (div:ma a b)
4108+ (div:ma a b)
4116```
4109```
4117
4110
4118#### Examples
4111#### Examples
4119
4112
4120```
4113```
4121− > (div:rs .4.5e1 .2.2e2)
4114+> (div:rs .4.5e1 .2.2e2)
4122− .2.0454545e-1
4115+.2.0454545e-1
4123```
4116```
4124
4117
4125---
4118---
@@ -4146,17 +4139,17 @@ A `@rs`.
4146#### Source
4139#### Source
4147
4140
4148```hoon
4141```hoon
4149− ++ fma ~/ %fma
4142+++ fma ~/ %fma
4150− |= [a=@rs b=@rs c=@rs] ^- @rs
4143+ |= [a=@rs b=@rs c=@rs] ^- @rs
4151− ~_ leaf+"rs-fail"
4144+ ~_ leaf+"rs-fail"
4152− (fma:ma a b c)
4145+ (fma:ma a b c)
4153```
4146```
4154
4147
4155#### Examples
4148#### Examples
4156
4149
4157```
4150```
4158− > (fma:rs .2.5e1 .2.5e2 .8.2e1)
4151+> (fma:rs .2.5e1 .2.5e2 .8.2e1)
4159− .6.332e3
4152+.6.332e3
4160```
4153```
4161
4154
4162---
4155---
@@ -4178,17 +4171,17 @@ A `@rs`.
4178#### Source
4171#### Source
4179
4172
4180```hoon
4173```hoon
4181− ++ sqt ~/ %sqt
4174+++ sqt ~/ %sqt
4182− |= [a=@rs] ^- @rs
4175+ |= [a=@rs] ^- @rs
4183− ~_ leaf+"rs-fail"
4176+ ~_ leaf+"rs-fail"
4184− (sqt:ma a)
4177+ (sqt:ma a)
4185```
4178```
4186
4179
4187#### Examples
4180#### Examples
4188
4181
4189```
4182```
4190− > (sqt:rs .2.5e2)
4183+> (sqt:rs .2.5e2)
4191− .1.5811388e1
4184+.1.5811388e1
4192```
4185```
4193
4186
4194---
4187---
@@ -4212,20 +4205,20 @@ A `@rs`.
4212#### Source
4205#### Source
4213
4206
4214```hoon
4207```hoon
4215− ++ lth ~/ %lth
4208+++ lth ~/ %lth
4216− |= [a=@rs b=@rs]
4209+ |= [a=@rs b=@rs]
4217− ~_ leaf+"rs-fail"
4210+ ~_ leaf+"rs-fail"
4218− (lth:ma a b)
4211+ (lth:ma a b)
4219```
4212```
4220
4213
4221#### Examples
4214#### Examples
4222
4215
4223```
4216```
4224− > (lth:rs .9.9e1 .1.1e2)
4217+> (lth:rs .9.9e1 .1.1e2)
4225− %.y
4218+%.y
4226
4219
4227− > (lth:rs .9.9e1 .9.9e1)
4220+> (lth:rs .9.9e1 .9.9e1)
4228− %.n
4221+%.n
4229```
4222```
4230
4223
4231---
4224---
@@ -4249,20 +4242,20 @@ A `@rs`.
4249#### Source
4242#### Source
4250
4243
4251```hoon
4244```hoon
4252− ++ lte ~/ %lte
4245+++ lte ~/ %lte
4253− |= [a=@rs b=@rs]
4246+ |= [a=@rs b=@rs]
4254− ~_ leaf+"rs-fail"
4247+ ~_ leaf+"rs-fail"
4255− (lte:ma a b)
4248+ (lte:ma a b)
4256```
4249```
4257
4250
4258#### Examples
4251#### Examples
4259
4252
4260```
4253```
4261− > (lte:rs .9.9e1 .1.1e2)
4254+> (lte:rs .9.9e1 .1.1e2)
4262− %.y
4255+%.y
4263
4256
4264− > (lte:rs .9.9e1 .9.9e1)
4257+> (lte:rs .9.9e1 .9.9e1)
4265− %.y
4258+%.y
4266```
4259```
4267
4260
4268---
4261---
@@ -4286,20 +4279,20 @@ A `@rs`.
4286#### Source
4279#### Source
4287
4280
4288```hoon
4281```hoon
4289− ++ equ ~/ %equ
4282+++ equ ~/ %equ
4290− |= [a=@rs b=@rs]
4283+ |= [a=@rs b=@rs]
4291− ~_ leaf+"rs-fail"
4284+ ~_ leaf+"rs-fail"
4292− (equ:ma a b)
4285+ (equ:ma a b)
4293```
4286```
4294
4287
4295#### Examples
4288#### Examples
4296
4289
4297```
4290```
4298− > (equ:rs .9.9e1 .1.1e2)
4291+> (equ:rs .9.9e1 .1.1e2)
4299− %.n
4292+%.n
4300
4293
4301− > (equ:rs .9.9e1 .9.9e1)
4294+> (equ:rs .9.9e1 .9.9e1)
4302− %.y
4295+%.y
4303```
4296```
4304
4297
4305---
4298---
@@ -4323,20 +4316,20 @@ A `@rs`.
4323#### Source
4316#### Source
4324
4317
4325```hoon
4318```hoon
4326− ++ gte ~/ %gte
4319+++ gte ~/ %gte
4327− |= [a=@rs b=@rs]
4320+ |= [a=@rs b=@rs]
4328− ~_ leaf+"rs-fail"
4321+ ~_ leaf+"rs-fail"
4329− (gte:ma a b)
4322+ (gte:ma a b)
4330```
4323```
4331
4324
4332#### Examples
4325#### Examples
4333
4326
4334```
4327```
4335− > (gte:rs .9.9e1 .9.9e1)
4328+> (gte:rs .9.9e1 .9.9e1)
4336− %.y
4329+%.y
4337
4330
4338− > (gte:rs .9.9e1 .9.2e2)
4331+> (gte:rs .9.9e1 .9.2e2)
4339− %.n
4332+%.n
4340```
4333```
4341
4334
4342---
4335---
@@ -4360,23 +4353,23 @@ A `@rs`.
4360#### Source
4353#### Source
4361
4354
4362```hoon
4355```hoon
4363− ++ gth ~/ %gth
4356+++ gth ~/ %gth
4364− |= [a=@rs b=@rs]
4357+ |= [a=@rs b=@rs]
4365− ~_ leaf+"rs-fail"
4358+ ~_ leaf+"rs-fail"
4366− (gth:ma a b)
4359+ (gth:ma a b)
4367```
4360```
4368
4361
4369#### Examples
4362#### Examples
4370
4363
4371```
4364```
4372− > (gth:rs .9.9e1 .9.2e2)
4365+> (gth:rs .9.9e1 .9.2e2)
4373− %.n
4366+%.n
4374
4367
4375− > (gth:rs .9.9e1 .9.9e1)
4368+> (gth:rs .9.9e1 .9.9e1)
4376− %.n
4369+%.n
4377
4370
4378− > (gth:rs .9.9e1 .1.9e1)
4371+> (gth:rs .9.9e1 .1.9e1)
4379− %.y
4372+%.y
4380```
4373```
4381
4374
4382---
4375---
@@ -4398,14 +4391,14 @@ A `@rs`.
4398#### Source
4391#### Source
4399
4392
4400```hoon
4393```hoon
4401− ++ sun |= [a=@u] ^- @rs (sun:ma a)
4394+++ sun |= [a=@u] ^- @rs (sun:ma a)
4402```
4395```
4403
4396
4404#### Examples
4397#### Examples
4405
4398
4406```
4399```
4407− > (sun:rs 343)
4400+> (sun:rs 343)
4408− .3.43e2
4401+.3.43e2
4409```
4402```
4410
4403
4411---
4404---
@@ -4427,16 +4420,18 @@ A `@rs`.
4427#### Source
4420#### Source
4428
4421
4429```hoon
4422```hoon
4430− ++ san |= [a=@s] ^- @rs (san:ma a)
4423+++ san |= [a=@s] ^- @rs (san:ma a)
4431```
4424```
4432
4425
4433#### Examples
4426#### Examples
4434
4427
4435```
4428```
4436− > (san:rs -343)
4429+> (san:rs -343)
4437− .-3.43e2'
4430+.-3.43e2'
4438```
4431```
4439
4432
4433+---
4434+
4440### `++sig:rs`
4435### `++sig:rs`
4441
4436
4442Get sign
4437Get sign
@@ -4454,17 +4449,17 @@ A `flag`.
4454#### Source
4449#### Source
4455
4450
4456```hoon
4451```hoon
4457− ++ sig |= [a=@rs] ^- ? (sig:ma a)
4452+++ sig |= [a=@rs] ^- ? (sig:ma a)
4458```
4453```
4459
4454
4460#### Examples
4455#### Examples
4461
4456
4462```
4457```
4463− > (sig:rs .3.43e2)
4458+> (sig:rs .3.43e2)
4464− %.y
4459+%.y
4465
4460
4466− > (sig:rs .-3.43e2)
4461+> (sig:rs .-3.43e2)
4467− %.n
4462+%.n
4468```
4463```
4469
4464
4470---
4465---
@@ -4486,14 +4481,14 @@ A signed integer.
4486#### Source
4481#### Source
4487
4482
4488```hoon
4483```hoon
4489− ++ exp |= [a=@rs] ^- @s (exp:ma a)
4484+++ exp |= [a=@rs] ^- @s (exp:ma a)
4490```
4485```
4491
4486
4492#### Examples
4487#### Examples
4493
4488
4494```
4489```
4495− > (exp:rs .-3.43e2)
4490+> (exp:rs .-3.43e2)
4496− --8
4491+--8
4497```
4492```
4498
4493
4499---
4494---
@@ -4515,14 +4510,14 @@ A `unit` of `@s`.
4515#### Source
4510#### Source
4516
4511
4517```hoon
4512```hoon
4518− ++ toi |= [a=@rs] ^- (unit @s) (toi:ma a)
4513+++ toi |= [a=@rs] ^- (unit @s) (toi:ma a)
4519```
4514```
4520
4515
4521#### Examples
4516#### Examples
4522
4517
4523```
4518```
4524− > (toi:rs .-3.43e2)
4519+> (toi:rs .-3.43e2)
4525− [~ u=-343]
4520+[~ u=-343]
4526```
4521```
4527
4522
4528---
4523---
@@ -4545,14 +4540,14 @@ A `dn`.
4545#### Source
4540#### Source
4546
4541
4547```hoon
4542```hoon
4548− ++ drg |= [a=@rs] ^- dn (drg:ma a)
4543+++ drg |= [a=@rs] ^- dn (drg:ma a)
4549```
4544```
4550
4545
4551#### Examples
4546#### Examples
4552
4547
4553```
4548```
4554− > (drg:rs .-3.43e2)
4549+> (drg:rs .-3.43e2)
4555− [%d s=%.n e=--0 a=343]
4550+[%d s=%.n e=--0 a=343]
4556```
4551```
4557
4552
4558---
4553---
@@ -4574,15 +4569,14 @@ A `@rs`.
4574#### Source
4569#### Source
4575
4570
4576```hoon
4571```hoon
4577− ++ grd |= [a=dn] ^- @rs (grd:ma a)
4572+++ grd |= [a=dn] ^- @rs (grd:ma a)
4578− --
4579```
4573```
4580
4574
4581#### Examples
4575#### Examples
4582
4576
4583```
4577```
4584− > (grd:rs [%d s=%.n e=--0 a=343])
4578+> (grd:rs [%d s=%.n e=--0 a=343])
4585− .-3.43e2
4579+.-3.43e2
4586```
4580```
4587
4581
4588---
4582---
@@ -4593,16 +4587,16 @@ Quadruple-precision fp
4593
4587
4594A container core for operations related to quadruple-precision binary floats.
4588A container core for operations related to quadruple-precision binary floats.
4595
4589
4596−`++rq` has four rounding modes: round to nearest (`$n`), round up (`$u`), round
4590+`++rq` has four rounding modes: round to nearest (`%n`), round up (`%u`), round
4597−down (`$d`), and round to zero (`$z`).
4591+down (`%d`), and round to zero (`%z`).
4598
4592
4599#### Source
4593#### Source
4600
4594
4601```hoon
4595```hoon
4602− ++ rq
4596+++ rq
4603− ~% %rq +> ~
4597+ ~% %rq +> ~
4604− ^?
4598+ ^|
4605− |_ r=$?($n $u $d $z)
4599+ |_ r=$?(%n %u %d %z)
4606```
4600```
4607
4601
4608### `++ma:rq`
4602### `++ma:rq`
@@ -4615,8 +4609,8 @@ configuration of the `rq` core.
4615#### Source
4609#### Source
4616
4610
4617```hoon
4611```hoon
4618− ++ ma
4612+++ ma
4619− %*(. ff w 15, p 112, b --16.383, r r)
4613+ %*(. ff w 15, p 112, b --16.383, r r)
4620```
4614```
4621
4615
4622---
4616---
@@ -4638,15 +4632,15 @@ An `fn`.
4638#### Source
4632#### Source
4639
4633
4640```hoon
4634```hoon
4641− ++ sea
4635+++ sea
4642− |= [a=@rq] (sea:ma a)
4636+ |= [a=@rq] (sea:ma a)
4643```
4637```
4644
4638
4645#### Examples
4639#### Examples
4646
4640
4647```
4641```
4648− > (sea:rq .~~~1.05102e5)
4642+> (sea:rq .~~~1.05102e5)
4649− [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272]
4643+[%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272]
4650```
4644```
4651
4645
4652---
4646---
@@ -4668,15 +4662,15 @@ A `@rq`, a quad-precision float.
4668#### Source
4662#### Source
4669
4663
4670```hoon
4664```hoon
4671− ++ bit
4665+++ bit
4672− |= [a=n] ^- @rq (bit:ma a)
4666+ |= [a=fn] ^- @rq (bit:ma a)
4673```
4667```
4674
4668
4675#### Examples
4669#### Examples
4676
4670
4677```
4671```
4678− > (bit:rq [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272])
4672+> (bit:rq [%f s=%.y e=-96 a=8.327.038.336.574.210.409.756.656.268.214.272])
4679− .~~~1.05102e5
4673+.~~~1.05102e5
4680```
4674```
4681
4675
4682---
4676---
@@ -4700,17 +4694,17 @@ A `@rq`.
4700#### Source
4694#### Source
4701
4695
4702```hoon
4696```hoon
4703− ++ add ~/ %add
4697+++ add ~/ %add
4704− |= [a=@rq b=@rq] ^- @rq
4698+ |= [a=@rq b=@rq] ^- @rq
4705− ~_ leaf+"rq-fail"
4699+ ~_ leaf+"rq-fail"
4706− (add:ma a b)
4700+ (add:ma a b)
4707```
4701```
4708
4702
4709#### Examples
4703#### Examples
4710
4704
4711```
4705```
4712− > (add:rq .~~~-1.821e5 .~~~1.05102e5)
4706+> (add:rq .~~~-1.821e5 .~~~1.05102e5)
4713− .~~~-7.6998e4
4707+.~~~-7.6998e4
4714```
4708```
4715
4709
4716---
4710---
@@ -4734,20 +4728,20 @@ A `@rq`.
4734#### Source
4728#### Source
4735
4729
4736```hoon
4730```hoon
4737− ++ sub ~/ %sub
4731+++ sub ~/ %sub
4738− |= [a=@rq b=@rq] ^- @rq
4732+ |= [a=@rq b=@rq] ^- @rq
4739− ~_ leaf+"rq-fail"
4733+ ~_ leaf+"rq-fail"
4740− (sub:ma a b)
4734+ (sub:ma a b)
4741```
4735```
4742
4736
4743#### Examples
4737#### Examples
4744
4738
4745```
4739```
4746− > (sub:rq .~~~1.821e5 .~~~1.05102e5)
4740+> (sub:rq .~~~1.821e5 .~~~1.05102e5)
4747− .~~~7.6998e4
4741+.~~~7.6998e4
4748
4742
4749− > (sub:rq .~~~1.821e5 .~~~-1.05102e5)
4743+> (sub:rq .~~~1.821e5 .~~~-1.05102e5)
4750− .~~~2.87202e5
4744+.~~~2.87202e5
4751```
4745```
4752
4746
4753---
4747---
@@ -4771,17 +4765,17 @@ A `@rq`.
4771#### Source
4765#### Source
4772
4766
4773```hoon
4767```hoon
4774− ++ mul ~/ %mul
4768+++ mul ~/ %mul
4775− |= [a=@rq b=@rq] ^- @rq
4769+ |= [a=@rq b=@rq] ^- @rq
4776− ~_ leaf+"rq-fail"
4770+ ~_ leaf+"rq-fail"
4777− (mul:ma a b)
4771+ (mul:ma a b)
4778```
4772```
4779
4773
4780#### Examples
4774#### Examples
4781
4775
4782```
4776```
4783− > (mul:rq .~~~1.821e5 .~~~-1.05102e5)
4777+> (mul:rq .~~~1.821e5 .~~~-1.05102e5)
4784− .~~~-1.91390742e10
4778+.~~~-1.91390742e10
4785```
4779```
4786
4780
4787---
4781---
@@ -4805,17 +4799,17 @@ A `@rq`.
4805#### Source
4799#### Source
4806
4800
4807```hoon
4801```hoon
4808− ++ div ~/ %div
4802+++ div ~/ %div
4809− |= [a=@rq b=@rq] ^- @rq
4803+ |= [a=@rq b=@rq] ^- @rq
4810− ~_ leaf+"rq-fail"
4804+ ~_ leaf+"rq-fail"
4811− (div:ma a b)
4805+ (div:ma a b)
4812```
4806```
4813
4807
4814#### Examples
4808#### Examples
4815
4809
4816```
4810```
4817− > (div:rq .~~~1.821e5 .~~~1.05102e3)
4811+> (div:rq .~~~1.821e5 .~~~1.05102e3)
4818− .~~~1.732602614602957127361991208540275e2
4812+.~~~1.732602614602957127361991208540275e2
4819```
4813```
4820
4814
4821---
4815---
@@ -4842,17 +4836,17 @@ A `@rq`.
4842#### Source
4836#### Source
4843
4837
4844```hoon
4838```hoon
4845− ++ fma ~/ %fma
4839+++ fma ~/ %fma
4846− |= [a=@rq b=@rq c=@rq] ^- @rq
4840+ |= [a=@rq b=@rq c=@rq] ^- @rq
4847− ~_ leaf+"rq-fail"
4841+ ~_ leaf+"rq-fail"
4848− (fma:ma a b c)
4842+ (fma:ma a b c)
4849```
4843```
4850
4844
4851#### Examples
4845#### Examples
4852
4846
4853```
4847```
4854− > (fma:rq .~~~1.821e5 .~~~-1.05102e2 .~~~6.2044e7)
4848+> (fma:rq .~~~1.821e5 .~~~-1.05102e2 .~~~6.2044e7)
4855− .~~~4.29049258e7
4849+.~~~4.29049258e7
4856```
4850```
4857
4851
4858---
4852---
@@ -4874,17 +4868,17 @@ A `@rq`.
4874#### Source
4868#### Source
4875
4869
4876```hoon
4870```hoon
4877− ++ sqt ~/ %sqt
4871+++ sqt ~/ %sqt
4878− |= [a=@rq] ^- @rq
4872+ |= [a=@rq] ^- @rq
4879− ~_ leaf+"rq-fail"
4873+ ~_ leaf+"rq-fail"
4880− (sqt:ma a)
4874+ (sqt:ma a)
4881```
4875```
4882
4876
4883#### Examples
4877#### Examples
4884
4878
4885```
4879```
4886− > (sqt:rq .~~~6.2044e7)
4880+> (sqt:rq .~~~6.2044e7)
4887− .~~~7.876801381271461258959876570289002e3
4881+.~~~7.876801381271461258959876570289002e3
4888```
4882```
4889
4883
4890---
4884---
@@ -4908,20 +4902,20 @@ A `@rq`.
4908#### Source
4902#### Source
4909
4903
4910```hoon
4904```hoon
4911− ++ lth ~/ %lth
4905+++ lth ~/ %lth
4912− |= [a=@rq b=@rq]
4906+ |= [a=@rq b=@rq]
4913− ~_ leaf+"rq-fail"
4907+ ~_ leaf+"rq-fail"
4914− (lth:ma a b)
4908+ (lth:ma a b)
4915```
4909```
4916
4910
4917#### Examples
4911#### Examples
4918
4912
4919```
4913```
4920− > (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4914+> (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4921− %.n
4915+%.n
4922
4916
4923− > (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4917+> (lth:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4924− %.y
4918+%.y
4925```
4919```
4926
4920
4927---
4921---
@@ -4945,23 +4939,23 @@ A `@rq`.
4945#### Source
4939#### Source
4946
4940
4947```hoon
4941```hoon
4948− ++ lte ~/ %lte
4942+++ lte ~/ %lte
4949− |= [a=@rq b=@rq]
4943+ |= [a=@rq b=@rq]
4950− ~_ leaf+"rq-fail"
4944+ ~_ leaf+"rq-fail"
4951− (lte:ma a b)
4945+ (lte:ma a b)
4952```
4946```
4953
4947
4954#### Examples
4948#### Examples
4955
4949
4956```
4950```
4957− > (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4951+> (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e2 .~~~7.114e3))
4958− %.n
4952+%.n
4959
4953
4960− > (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4954+> (lte:rq .~~~1.2044e7 (mul:rq .~~~9.02e3 .~~~7.114e3))
4961− %.y
4955+%.y
4962
4956
4963− > (lte:rq .~~~1.2044e7 .~~~1.2044e7)
4957+> (lte:rq .~~~1.2044e7 .~~~1.2044e7)
4964− %.y
4958+%.y
4965```
4959```
4966
4960
4967---
4961---
@@ -4985,20 +4979,20 @@ A `@rq`.
4985#### Source
4979#### Source
4986
4980
4987```hoon
4981```hoon
4988− ++ equ ~/ %equ
4982+++ equ ~/ %equ
4989− |= [a=@rq b=@rq]
4983+ |= [a=@rq b=@rq]
4990− ~_ leaf+"rq-fail"
4984+ ~_ leaf+"rq-fail"
4991− (equ:ma a b)
4985+ (equ:ma a b)
4992```
4986```
4993
4987
4994#### Examples
4988#### Examples
4995
4989
4996```
4990```
4997− > (equ:rq .~~~1.2044e7 .~~~1.2044e7)
4991+> (equ:rq .~~~1.2044e7 .~~~1.2044e7)
4998− %.y
4992+%.y
4999
4993
5000− > (equ:rq .~~~2.2044e7 .~~~1.2044e7)
4994+> (equ:rq .~~~2.2044e7 .~~~1.2044e7)
5001− %.n
4995+%.n
5002```
4996```
5003
4997
5004---
4998---
@@ -5022,23 +5016,23 @@ A `@rq`.
5022#### Source
5016#### Source
5023
5017
5024```hoon
5018```hoon
5025− ++ gte ~/ %gte
5019+++ gte ~/ %gte
5026− |= [a=@rq b=@rq]
5020+ |= [a=@rq b=@rq]
5027− ~_ leaf+"rq-fail"
5021+ ~_ leaf+"rq-fail"
5028− (gte:ma a b)
5022+ (gte:ma a b)
5029```
5023```
5030
5024
5031#### Examples
5025#### Examples
5032
5026
5033```
5027```
5034− > (gte:rq .~~~1.2044e7 .~~~1.2044e7)
5028+> (gte:rq .~~~1.2044e7 .~~~1.2044e7)
5035− %.y
5029+%.y
5036
5030
5037− > (gte:rq .~~~2.2044e7 .~~~1.2044e7)
5031+> (gte:rq .~~~2.2044e7 .~~~1.2044e7)
5038− %.y
5032+%.y
5039
5033
5040− > (gte:rq .~~~1.2044e7 .~~~2.2044e7)
5034+> (gte:rq .~~~1.2044e7 .~~~2.2044e7)
5041− %.n
5035+%.n
5042```
5036```
5043
5037
5044---
5038---
@@ -5060,23 +5054,23 @@ A `@rq`.
5060#### Source
5054#### Source
5061
5055
5062```hoon
5056```hoon
5063− ++ gth ~/ %gth
5057+++ gth ~/ %gth
5064− |= [a=@rq b=@rq]
5058+ |= [a=@rq b=@rq]
5065− ~_ leaf+"rq-fail"
5059+ ~_ leaf+"rq-fail"
5066− (gth:ma a b)
5060+ (gth:ma a b)
5067```
5061```
5068
5062
5069#### Examples
5063#### Examples
5070
5064
5071```
5065```
5072− > (gth:rq .~~~1.2044e7 .~~~1.2044e7)
5066+> (gth:rq .~~~1.2044e7 .~~~1.2044e7)
5073− %.n
5067+%.n
5074
5068
5075− > (gth:rq .~~~2.2044e7 .~~~1.2044e7)
5069+> (gth:rq .~~~2.2044e7 .~~~1.2044e7)
5076− %.y
5070+%.y
5077
5071
5078− > (gth:rq .~~~1.2044e7 .~~~2.2044e7)
5072+> (gth:rq .~~~1.2044e7 .~~~2.2044e7)
5079− %.n
5073+%.n
5080```
5074```
5081
5075
5082---
5076---
@@ -5098,14 +5092,14 @@ A `@rq`, a quad-precision float.
5098#### Source
5092#### Source
5099
5093
5100```hoon
5094```hoon
5101− ++ sun |= [a=@u] ^- @rq (sun:ma a)
5095+++ sun |= [a=@u] ^- @rq (sun:ma a)
5102```
5096```
5103
5097
5104#### Examples
5098#### Examples
5105
5099
5106```
5100```
5107− > (sun:rq 205)
5101+> (sun:rq 205)
5108− .~~~2.05e2
5102+.~~~2.05e2
5109```
5103```
5110
5104
5111---
5105---
@@ -5127,14 +5121,14 @@ A `@rq`, a quad-precision float.
5127#### Source
5121#### Source
5128
5122
5129```hoon
5123```hoon
5130− ++ san |= [a=@s] ^- @rq (san:ma a)
5124+++ san |= [a=@s] ^- @rq (san:ma a)
5131```
5125```
5132
5126
5133#### Examples
5127#### Examples
5134
5128
5135```
5129```
5136− > (san:rq -205)
5130+> (san:rq -205)
5137− .~~~-2.05e2
5131+.~~~-2.05e2
5138```
5132```
5139
5133
5140---
5134---
@@ -5156,14 +5150,14 @@ A `flag`.
5156#### Source
5150#### Source
5157
5151
5158```hoon
5152```hoon
5159− ++ sig |= [a=@rq] ^- ? (sig:ma a)
5153+++ sig |= [a=@rq] ^- ? (sig:ma a)
5160```
5154```
5161
5155
5162#### Examples
5156#### Examples
5163
5157
5164```
5158```
5165− > (sig:rq .~~~-2.05e2)
5159+> (sig:rq .~~~-2.05e2)
5166− %.n
5160+%.n
5167```
5161```
5168
5162
5169---
5163---
@@ -5185,14 +5179,14 @@ A `@s`, a signed integer.
5185#### Source
5179#### Source
5186
5180
5187```hoon
5181```hoon
5188− ++ exp |= [a=@rq] ^- @s (exp:ma a)
5182+++ exp |= [a=@rq] ^- @s (exp:ma a)
5189```
5183```
5190
5184
5191#### Examples
5185#### Examples
5192
5186
5193```
5187```
5194− > (exp:rq .~~~-2.05e2)
5188+> (exp:rq .~~~-2.05e2)
5195− --7
5189+--7
5196```
5190```
5197
5191
5198---
5192---
@@ -5214,17 +5208,17 @@ A `unit` of `@s`.
5214#### Source
5208#### Source
5215
5209
5216```hoon
5210```hoon
5217− ++ toi |= [a=@rq] ^- (unit @s) (toi:ma a)
5211+++ toi |= [a=@rq] ^- (unit @s) (toi:ma a)
5218```
5212```
5219
5213
5220#### Examples
5214#### Examples
5221
5215
5222```
5216```
5223− > (toi:rq .~~~-2.085e2)
5217+> (toi:rq .~~~-2.085e2)
5224− [~ u=-208]
5218+[~ u=-208]
5225
5219
5226− > (toi:rq .~~~-2.08e2)
5220+> (toi:rq .~~~-2.08e2)
5227− [~ u=-208]
5221+[~ u=-208]
5228```
5222```
5229
5223
5230---
5224---
@@ -5247,17 +5241,17 @@ A `dn`.
5247#### Source
5241#### Source
5248
5242
5249```hoon
5243```hoon
5250− ++ drg |= [a=@rq] ^- dn (drg:ma a) :: @rq to decimal float
5244+++ drg |= [a=@rq] ^- dn (drg:ma a)
5251```
5245```
5252
5246
5253#### Examples
5247#### Examples
5254
5248
5255```
5249```
5256− > (drg:rq .~~~-2.085e2)
5250+> (drg:rq .~~~-2.085e2)
5257− [%d s=%.n e=-1 a=2.085]
5251+[%d s=%.n e=-1 a=2.085]
5258
5252
5259− > (drg:rq .~~~-2.08e2)
5253+> (drg:rq .~~~-2.08e2)
5260− [%d s=%.n e=--0 a=208]
5254+[%d s=%.n e=--0 a=208]
5261```
5255```
5262
5256
5263---
5257---
@@ -5281,15 +5275,14 @@ A `@rq`, a quad-precision float.
5281#### Source
5275#### Source
5282
5276
5283```hoon
5277```hoon
5284− ++ grd |= [a=dn] ^- @rq (grd:ma a)
5278+++ grd |= [a=dn] ^- @rq (grd:ma a)
5285− --
5286```
5279```
5287
5280
5288#### Examples
5281#### Examples
5289
5282
5290```
5283```
5291− > (grd:rq [%d s=%.n e=--0 a=343])
5284+> (grd:rq [%d s=%.n e=--0 a=343])
5292− .~~~-3.43e2
5285+.~~~-3.43e2
5293```
5286```
5294
5287
5295---
5288---
@@ -5300,16 +5293,16 @@ Half-precision fp
5300
5293
5301A container core for operations related to half-precision binary floats.
5294A container core for operations related to half-precision binary floats.
5302
5295
5303−`++rh` has four rounding modes: round to nearest (`$n`), round up (`$u`), round
5296+`++rh` has four rounding modes: round to nearest (`%n`), round up (`%u`), round
5304−down (`$d`), and round to zero (`$z`).
5297+down (`%d`), and round to zero (`%z`).
5305
5298
5306#### Source
5299#### Source
5307
5300
5308```hoon
5301```hoon
5309− ++ rh
5302+++ rh
5310− ~% %rh +> ~
5303+ ~% %rh +> ~
5311− ^?
5304+ ^|
5312− |_ r=$?($n $u $d $z)
5305+ |_ r=$?(%n %u %d %z)
5313```
5306```
5314
5307
5315---
5308---
@@ -5324,8 +5317,8 @@ configuration of the `rh` core.
5324#### Source
5317#### Source
5325
5318
5326```hoon
5319```hoon
5327− ++ ma
5320+++ ma
5328− %*(. ff w 5, p 10, b --15, r r)
5321+ %*(. ff w 5, p 10, b --15, r r)
5329```
5322```
5330
5323
5331---
5324---
@@ -5347,15 +5340,15 @@ An `fn`.
5347#### Source
5340#### Source
5348
5341
5349```hoon
5342```hoon
5350− ++ sea
5343+++ sea
5351− |= [a=@rh] (sea:ma a)
5344+ |= [a=@rh] (sea:ma a)
5352```
5345```
5353
5346
5354#### Examples
5347#### Examples
5355
5348
5356```
5349```
5357− > (sea:rh .~~1.22e-5)
5350+> (sea:rh .~~1.22e-5)
5358− [%f s=%.y e=-24 a=205]
5351+[%f s=%.y e=-24 a=205]
5359```
5352```
5360
5353
5361---
5354---
@@ -5377,15 +5370,15 @@ A `@rh`, a half-precision float.
5377#### Source
5370#### Source
5378
5371
5379```hoon
5372```hoon
5380− ++ bit
5373+++ bit
5381− |= [a=fn] ^- @rh (bit:ma a)
5374+ |= [a=fn] ^- @rh (bit:ma a)
5382```
5375```
5383
5376
5384#### Examples
5377#### Examples
5385
5378
5386```
5379```
5387− > (bit:rh [%f s=%.y e=-24 a=205])
5380+> (bit:rh [%f s=%.y e=-24 a=205])
5388− .~~1.22e-5
5381+.~~1.22e-5
5389```
5382```
5390
5383
5391---
5384---
@@ -5407,17 +5400,17 @@ A `@rh`.
5407#### Source
5400#### Source
5408
5401
5409```hoon
5402```hoon
5410− ++ add ~/ %add
5403+++ add ~/ %add
5411− |= [a=@rh b=@rh] ^- @rh
5404+ |= [a=@rh b=@rh] ^- @rh
5412− ~_ leaf+"rh-fail"
5405+ ~_ leaf+"rh-fail"
5413− (add:ma a b)
5406+ (add:ma a b)
5414```
5407```
5415
5408
5416#### Examples
5409#### Examples
5417
5410
5418```
5411```
5419− > (add:rh .~~1.82e2 .~~1.02e2)
5412+> (add:rh .~~1.82e2 .~~1.02e2)
5420− .~~2.84e2
5413+.~~2.84e2
5421```
5414```
5422
5415
5423---
5416---
@@ -5441,20 +5434,20 @@ A `@rh`.
5441#### Source
5434#### Source
5442
5435
5443```hoon
5436```hoon
5444− ++ sub ~/ %sub
5437+++ sub ~/ %sub
5445− |= [a=@rh b=@rh] ^- @rh
5438+ |= [a=@rh b=@rh] ^- @rh
5446− ~_ leaf+"rh-fail"
5439+ ~_ leaf+"rh-fail"
5447− (sub:ma a b)
5440+ (sub:ma a b)
5448```
5441```
5449
5442
5450#### Examples
5443#### Examples
5451
5444
5452```
5445```
5453− > (sub:rh .~~1.821e2 .~~1.051e2)
5446+> (sub:rh .~~1.821e2 .~~1.051e2)
5454− .~~7.7e1
5447+.~~7.7e1
5455
5448
5456− > (sub:rh .~~1.821e2 .~~6.051e2)
5449+> (sub:rh .~~1.821e2 .~~6.051e2)
5457− .~~-4.228e2
5450+.~~-4.228e2
5458```
5451```
5459
5452
5460---
5453---
@@ -5478,17 +5471,17 @@ A `@rh`.
5478#### Source
5471#### Source
5479
5472
5480```hoon
5473```hoon
5481− ++ mul ~/ %mul
5474+++ mul ~/ %mul
5482− |= [a=@rh b=@rh] ^- @rh
5475+ |= [a=@rh b=@rh] ^- @rh
5483− ~_ leaf+"rh-fail"
5476+ ~_ leaf+"rh-fail"
5484− (mul:ma a b)
5477+ (mul:ma a b)
5485```
5478```
5486
5479
5487#### Examples
5480#### Examples
5488
5481
5489```
5482```
5490− > (mul:rh .~~1.821e1 .~~-1.05102e2)
5483+> (mul:rh .~~1.821e1 .~~-1.05102e2)
5491− .~~-1.913e3
5484+.~~-1.913e3
5492```
5485```
5493
5486
5494---
5487---
@@ -5512,17 +5505,17 @@ A `@rh`.
5512#### Source
5505#### Source
5513
5506
5514```hoon
5507```hoon
5515− ++ div ~/ %div
5508+++ div ~/ %div
5516− |= [a=@rh b=@rh] ^- @rh
5509+ |= [a=@rh b=@rh] ^- @rh
5517− ~_ leaf+"rh-fail"
5510+ ~_ leaf+"rh-fail"
5518− (div:ma a b)
5511+ (div:ma a b)
5519```
5512```
5520
5513
5521#### examples
5514#### examples
5522
5515
5523```
5516```
5524− > (div:rh .~~1.821e3 .~~1.05102e2)
5517+> (div:rh .~~1.821e3 .~~1.05102e2)
5525− .~~1.731e1
5518+.~~1.731e1
5526```
5519```
5527
5520
5528---
5521---
@@ -5549,17 +5542,17 @@ A `@rh`.
5549#### Source
5542#### Source
5550
5543
5551```hoon
5544```hoon
5552− ++ fma ~/ %fma
5545+++ fma ~/ %fma
5553− |= [a=@rh b=@rh c=@rh] ^- @rh
5546+ |= [a=@rh b=@rh c=@rh] ^- @rh
5554− ~_ leaf+"rh-fail"
5547+ ~_ leaf+"rh-fail"
5555− (fma:ma a b c)
5548+ (fma:ma a b c)
5556```
5549```
5557
5550
5558#### Examples
5551#### Examples
5559
5552
5560```
5553```
5561− > (fma:rh .~~1.821e4 .~~-1.05102e2 .~~6.2044e3)
5554+> (fma:rh .~~1.821e4 .~~-1.05102e2 .~~6.2044e3)
5562− .~~-6.55e4
5555+.~~-6.55e4
5563```
5556```
5564
5557
5565---
5558---
@@ -5581,17 +5574,17 @@ A `@rh`.
5581#### Source
5574#### Source
5582
5575
5583```hoon
5576```hoon
5584− ++ sqt ~/ %sqt
5577+++ sqt ~/ %sqt
5585− |= [a=@rh] ^- @rh
5578+ |= [a=@rh] ^- @rh
5586− ~_ leaf+"rh-fail"
5579+ ~_ leaf+"rh-fail"
5587− (sqt:ma a)
5580+ (sqt:ma a)
5588```
5581```
5589
5582
5590−#### Source
5583+#### Example
5591
5584
5592```hoon
5585```hoon
5593− > (sqt:rh .~~6.24e4)
5586+> (sqt:rh .~~6.24e4)
5594− .~~2.498e2
5587+.~~2.498e2
5595```
5588```
5596
5589
5597---
5590---
@@ -5615,20 +5608,20 @@ A `@rh`.
5615#### Source
5608#### Source
5616
5609
5617```hoon
5610```hoon
5618− ++ lth ~/ %lth
5611+++ lth ~/ %lth
5619− |= [a=@rh b=@rh]
5612+ |= [a=@rh b=@rh]
5620− ~_ leaf+"rh-fail"
5613+ ~_ leaf+"rh-fail"
5621− (lth:ma a b)
5614+ (lth:ma a b)
5622```
5615```
5623
5616
5624#### Examples
5617#### Examples
5625
5618
5626```
5619```
5627− > (lth:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5620+> (lth:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5628− %.n
5621+%.n
5629
5622
5630− > (lth:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5623+> (lth:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5631− %.y
5624+%.y
5632```
5625```
5633
5626
5634---
5627---
@@ -5652,23 +5645,23 @@ A `@rh`.
5652#### Source
5645#### Source
5653
5646
5654```hoon
5647```hoon
5655− ++ lte ~/ %lte
5648+++ lte ~/ %lte
5656− |= [a=@rh b=@rh]
5649+ |= [a=@rh b=@rh]
5657− ~_ leaf+"rh-fail"
5650+ ~_ leaf+"rh-fail"
5658− (lte:ma a b)
5651+ (lte:ma a b)
5659```
5652```
5660
5653
5661#### Examples
5654#### Examples
5662
5655
5663```
5656```
5664− > (lte:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5657+> (lte:rh .~~1.2e5 (mul:rh .~~9.02e2 .~~7.114e2))
5665− %.n
5658+%.n
5666
5659
5667− > (lte:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5660+> (lte:rh .~~1.2e3 (mul:rh .~~9.02e1 .~~7.114e2))
5668− %.y
5661+%.y
5669
5662
5670− > (lte:rh .~~1.2e3 .~~1.2e3)
5663+> (lte:rh .~~1.2e3 .~~1.2e3)
5671− %.y
5664+%.y
5672```
5665```
5673
5666
5674---
5667---
@@ -5692,20 +5685,20 @@ A `@rh`.
5692#### Source
5685#### Source
5693
5686
5694```hoon
5687```hoon
5695− ++ equ ~/ %equ
5688+++ equ ~/ %equ
5696− |= [a=@rh b=@rh]
5689+ |= [a=@rh b=@rh]
5697− ~_ leaf+"rh-fail"
5690+ ~_ leaf+"rh-fail"
5698− (equ:ma a b)
5691+ (equ:ma a b)
5699```
5692```
5700
5693
5701#### Examples
5694#### Examples
5702
5695
5703```
5696```
5704− > (equ:rh .~~1.24e4 .~~1.24e4)
5697+> (equ:rh .~~1.24e4 .~~1.24e4)
5705− %.y
5698+%.y
5706
5699
5707− > (equ:rh .~~2.24e4 .~~1.24e4)
5700+> (equ:rh .~~2.24e4 .~~1.24e4)
5708− %.n
5701+%.n
5709```
5702```
5710
5703
5711---
5704---
@@ -5729,23 +5722,23 @@ A `@rh`.
5729#### Source
5722#### Source
5730
5723
5731```hoon
5724```hoon
5732− ++ gte ~/ %gte
5725+++ gte ~/ %gte
5733− |= [a=@rh b=@rh]
5726+ |= [a=@rh b=@rh]
5734− ~_ leaf+"rh-fail"
5727+ ~_ leaf+"rh-fail"
5735− (gte:ma a b)
5728+ (gte:ma a b)
5736```
5729```
5737
5730
5738#### Examples
5731#### Examples
5739
5732
5740```
5733```
5741− > (gte:rh .~~1.24e4 .~~1.24e4)
5734+> (gte:rh .~~1.24e4 .~~1.24e4)
5742− %.y
5735+%.y
5743
5736
5744− > (gte:rh .~~2.24e4 .~~1.24e4)
5737+> (gte:rh .~~2.24e4 .~~1.24e4)
5745− %.y
5738+%.y
5746
5739
5747− > (gte:rh .~~1.24e4 .~~2.24e4)
5740+> (gte:rh .~~1.24e4 .~~2.24e4)
5748− %.n
5741+%.n
5749```
5742```
5750
5743
5751---
5744---
@@ -5767,23 +5760,23 @@ A `@rh`.
5767#### Source
5760#### Source
5768
5761
5769```hoon
5762```hoon
5770− ++ gth ~/ %gth
5763+++ gth ~/ %gth
5771− |= [a=@rh b=@rh]
5764+ |= [a=@rh b=@rh]
5772− ~_ leaf+"rh-fail"
5765+ ~_ leaf+"rh-fail"
5773− (gth:ma a b)
5766+ (gth:ma a b)
5774```
5767```
5775
5768
5776#### Examples
5769#### Examples
5777
5770
5778```
5771```
5779− > (gth:rh .~~1.24e4 .~~1.244e4)
5772+> (gth:rh .~~1.24e4 .~~1.244e4)
5780− %.n
5773+%.n
5781
5774
5782− > (gth:rh .~~2.24e4 .~~1.24e4)
5775+> (gth:rh .~~2.24e4 .~~1.24e4)
5783− %.y
5776+%.y
5784
5777
5785− > (gth:rh .~~1.24e4 .~~2.24e4)
5778+> (gth:rh .~~1.24e4 .~~2.24e4)
5786− %.n
5779+%.n
5787```
5780```
5788
5781
5789---
5782---
@@ -5805,14 +5798,15 @@ A `@rs`, a single-precision float.
5805#### Source
5798#### Source
5806
5799
5807```hoon
5800```hoon
5801+++ tos
5808− ++ tos |= {a/@rh} (bit:rs (sea a))
5802+ |= [a=@rh] (bit:rs (sea a))
5809```
5803```
5810
5804
5811#### Examples
5805#### Examples
5812
5806
5813```
5807```
5814− > (tos:rh .~~2.5e2)
5808+> (tos:rh .~~2.5e2)
5815− .2.5e2
5809+.2.5e2
5816```
5810```
5817
5811
5818---
5812---
@@ -5834,14 +5828,15 @@ A `@rh`, a half-precision float.
5834#### Source
5828#### Source
5835
5829
5836```hoon
5830```hoon
5831+++ fos
5837− ++ fos |= {a/@rs} (bit (sea:rs a))
5832+ |= [a=@rs] (bit (sea:rs a))
5838```
5833```
5839
5834
5840#### Examples
5835#### Examples
5841
5836
5842```
5837```
5843− > (fos:rh .2.5e2)
5838+> (fos:rh .2.5e2)
5844− .~~2.5e2
5839+.~~2.5e2
5845```
5840```
5846
5841
5847---
5842---
@@ -5863,14 +5858,14 @@ A `@rh`, a half-precision float.
5863#### Source
5858#### Source
5864
5859
5865```hoon
5860```hoon
5866− ++ sun |= [a=@u] ^- @rh (sun:ma a)
5861+++ sun |= [a=@u] ^- @rh (sun:ma a)
5867```
5862```
5868
5863
5869#### Examples
5864#### Examples
5870
5865
5871```
5866```
5872− > (sun:rh 205)
5867+> (sun:rh 205)
5873− .~~2.05e2
5868+.~~2.05e2
5874```
5869```
5875
5870
5876---
5871---
@@ -5892,14 +5887,14 @@ A `@rh`, a half-precision float.
5892#### Source
5887#### Source
5893
5888
5894```hoon
5889```hoon
5895− ++ san |= [a=@s] ^- @rh (san:ma a)
5890+++ san |= [a=@s] ^- @rh (san:ma a)
5896```
5891```
5897
5892
5898#### Examples
5893#### Examples
5899
5894
5900```
5895```
5901− > (san:rh -205)
5896+> (san:rh -205)
5902− .~~-2.05e2
5897+.~~-2.05e2
5903```
5898```
5904
5899
5905---
5900---
@@ -5921,14 +5916,14 @@ A `flag`.
5921#### Source
5916#### Source
5922
5917
5923```hoon
5918```hoon
5924− ++ sig |= [a=@rh] ^- ? (sig:ma a)
5919+++ sig |= [a=@rh] ^- ? (sig:ma a)
5925```
5920```
5926
5921
5927#### Examples
5922#### Examples
5928
5923
5929```
5924```
5930− > (sig:rh .~~-2.05e2)
5925+> (sig:rh .~~-2.05e2)
5931− %.n
5926+%.n
5932```
5927```
5933
5928
5934---
5929---
@@ -5950,14 +5945,14 @@ A `@s`, a signed integer.
5950#### Source
5945#### Source
5951
5946
5952```hoon
5947```hoon
5953− ++ exp |= [a=@rh] ^- @s (exp:ma a)
5948+++ exp |= [a=@rh] ^- @s (exp:ma a)
5954```
5949```
5955
5950
5956#### Examples
5951#### Examples
5957
5952
5958```
5953```
5959− > (exp:rh .~~-2.05e2)
5954+> (exp:rh .~~-2.05e2)
5960− --7
5955+--7
5961```
5956```
5962
5957
5963---
5958---
@@ -5979,17 +5974,17 @@ A `unit` of `@s`.
5979#### Source
5974#### Source
5980
5975
5981```hoon
5976```hoon
5982− ++ toi |= [a=@rh] ^- (unit @s) (toi:ma a)
5977+++ toi |= [a=@rh] ^- (unit @s) (toi:ma a)
5983```
5978```
5984
5979
5985#### Examples
5980#### Examples
5986
5981
5987```
5982```
5988− > (toi:rh .~~-2.085e2)
5983+> (toi:rh .~~-2.085e2)
5989− [~ u=-208]
5984+[~ u=-208]
5990
5985
5991− > (toi:rh .~~-2.08e2)
5986+> (toi:rh .~~-2.08e2)
5992− [~ u=-208]
5987+[~ u=-208]
5993```
5988```
5994
5989
5995---
5990---
@@ -6012,17 +6007,17 @@ A `dn`.
6012#### Source
6007#### Source
6013
6008
6014```hoon
6009```hoon
6015− ++ drg |= [a=@rh] ^- dn (drg:ma a)
6010+++ drg |= [a=@rh] ^- dn (drg:ma a)
6016```
6011```
6017
6012
6018#### Examples
6013#### Examples
6019
6014
6020```
6015```
6021− > (drg:rh .~~-2.085e2)
6016+> (drg:rh .~~-2.085e2)
6022− [%d s=%.n e=-1 a=2.085]
6017+[%d s=%.n e=-1 a=2.085]
6023
6018
6024− > (drg:rh .~~-2.08e2)
6019+> (drg:rh .~~-2.08e2)
6025− [%d s=%.n e=--0 a=208]
6020+[%d s=%.n e=--0 a=208]
6026```
6021```
6027
6022
6028---
6023---
@@ -6046,15 +6041,14 @@ A `@rh`, a a half-precision float.
6046#### Source
6041#### Source
6047
6042
6048```hoon
6043```hoon
6049− ++ grd |= [a=dn] ^- @rh (grd:ma a)
6044+++ grd |= [a=dn] ^- @rh (grd:ma a)
6050− --
6051```
6045```
6052
6046
6053#### Examples
6047#### Examples
6054
6048
6055```
6049```
6056− > (grd:rh [%d s=%.n e=--0 a=343])
6050+> (grd:rh [%d s=%.n e=--0 a=343])
6057− .~~-3.43e2
6051+.~~-3.43e2
6058```
6052```
6059
6053
6060---
6054---
content/docs/hoon/reference/stdlib/3c.md+241−242
@@ -4,353 +4,352 @@ weight = 23
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−## `++yall`
7+## `++year`
8
8
9−Time since beginning of time
9+Date to `@da`
10
10
11−Produce the date tuple of `[y=@ud m=@ud d=@ud]` of the year, month, and
11+Accept a parsed date of form `[[a=? y=@ud] m=@ud t=tarp]` and produce
12−day from a number of days from the beginning of the Gregorian calendar.
12+its `@da` representation.
13
13
14#### Accepts
14#### Accepts
15
15
16−`day` is a an unsigned decimal.
16+`det` is a `date`
17
17
18#### Produces
18#### Produces
19
19
20−A cell of unsigned decimals.
20+A `@da`.
21
21
22#### Source
22#### Source
23
23
24```hoon
24```hoon
25− ++ yall
25+++ year
26− |= day=@ud
26+ |= det=date
27− ^- [y=@ud m=@ud d=@ud]
27+ ^- @da
28− =+ [era=0 cet=0 lep=*?]
28+ =+ ^= yer
29− => .(era (div day era:yo), day (mod day era:yo))
29+ ?: a.det
30− => ^+ .
30+ (add 292.277.024.400 y.det)
31− ?: (lth day +(cet:yo))
31+ (sub 292.277.024.400 (dec y.det))
32− .(lep &, cet 0)
32+ =+ day=(yawn yer m.det d.t.det)
33− => .(lep |, cet 1, day (sub day +(cet:yo)))
33+ (yule day h.t.det m.t.det s.t.det f.t.det)
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))
48```
34```
49
35
50#### Examples
36#### Examples
51
37
52```
38```
53− > (yall 198)
39+> (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
54− [y=0 m=7 d=17]
40+~2014.8.4..20.04.57..d940
55−
56− > (yall 90.398)
57− [y=247 m=7 d=3]
58−
59− > (yall 0)
60− [y=0 m=1 d=1]
61```
41```
62
42
63---
43---
64
44
65−## `++yawn`
45+## `++yore`
66
46
67−Days since beginning of time
47+Date from atomic date
68
48
69−Inverse of `yall`, computes number of days A.D. from y/m/d date as the
49+Produces a `date` from a `@da`.
70−tuple `[yer=@ud mot=@ud day=@ud]`.
71
50
72#### Accepts
51#### Accepts
73
52
74−`yer` is an unsigned decimal.
53+`now` is a time atom, `@da`.
75−
76−`mon` is an unsigned decimal.
77−
78−`day` is an unsigned decimal.
79
54
80#### Produces
55#### Produces
81
56
82−An unsigned decimal.
57+A `date`.
83
58
84#### Source
59#### Source
85
60
86```hoon
61```hoon
87− ++ yawn
62+++ yore
88− |= [yer=@ud mot=@ud day=@ud]
63+ |= now=@da
89− ^- @ud
64+ ^- date
90− => .(mot (dec mot), day (dec day))
65+ =+ rip=(yell now)
91− => ^+ .
66+ =+ ger=(yall d.rip)
92− %= .
67+ :- ?: (gth y.ger 292.277.024.400)
93− day
68+ [a=& y=(sub y.ger 292.277.024.400)]
94− =+ cah=?:((yelp yer) moy:yo moh:yo)
69+ [a=| y=+((sub 292.277.024.400 y.ger))]
95− |- ^- @ud
70+ [m.ger d.ger h.rip m.rip s.rip f.rip]
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))))
111```
71```
112
72
113#### Examples
73#### Examples
114
74
115```
75```
116− > (yawn 2.018 7 4)
76+> (yore ~2014.6.6..21.09.15..0a16)
117− 737.244
77+[[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
118−
119− > (yawn 1.776 7 4)
120− 648.856
121−
122− > (yawn 1.990 10 11)
123− 727.116
124```
78```
125
79
126---
80---
127
81
128−## `++year`
82+## `++yell`
129
83
130−Date to @d
84+Tarp from atomic date
131
85
132−Accept a parsed date of form `[[a=? y=@ud] m=@ud t=tarp]` and produce
86+Produce a [`$tarp`](/docs/hoon/reference/stdlib/2q#tarp) time format from a`@da`.
133−its `@d` representation.
134
87
135#### Accepts
88#### Accepts
136
89
137−`det` is a `date`
90+`now` is a `@da`.
138
91
139#### Produces
92#### Produces
140
93
141−A `@d`.
94+A `tarp`.
142
95
143#### Source
96#### Source
144
97
145```hoon
98```hoon
146− ++ year
99+++ yell
147− |= det=date
100+ |= now=@d
148− ^- @da
101+ ^- tarp
149− =+ ^= yer
102+ =+ sec=(rsh 6 now)
150− ?: a.det
103+ =+ ^= fan
151− (add 292.277.024.400 y.det)
104+ =+ [muc=4 raw=(end 6 now)]
152− (sub 292.277.024.400 (dec y.det))
105+ |- ^- (list @ux)
153− =+ day=(yawn yer m.det d.t.det)
106+ ?: |(=(0 raw) =(0 muc))
154− (yule day h.t.det m.t.det s.t.det f.t.det)
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]
155```
117```
156
118
157#### Examples
119#### Examples
158
120
159```
121```
160− > (year [[a=%.y y=2.014] m=8 t=[d=4 h=20 m=4 s=57 f=~[0xd940]]])
122+> (yell ~2014.3.20..05.42.53..7456)
161− 0x8000000d227df4e9d940000000000000
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=~]
162```
130```
163
131
164---
132---
165
133
166−## `++yell`
134+## `++yule`
167
135
168−Tarp from atomic date
136+Daily time to time atom
169
137
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`.
171
140
172#### Accepts
141#### Accepts
173
142
174−`now` is a `@d`.
143+`rip` is a `tarp`.
175
144
176#### Produces
145#### Produces
177
146
178−A `tarp`.
147+A time atom, `@da`.
179
148
180#### Source
149#### Source
181
150
182```hoon
151```hoon
183− ++ yell
152+++ yule
184− |= now=@d
185− ^- tarp
153+ |= rip=tarp
186− =+ sec=(rsh 6 1 now)
154+ ^- @d
187− =+ ^= fan
155+ =+ ^= sec ;: add
188− =+ [muc=4 raw=(end 6 1 now)]
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
189− |- ^- (list @ux)
162+ |- ^- @
190− ?: |(=(0 raw) =(0 muc))
163+ ?~ f.rip
191− ~
164+ 0
192− => .(muc (dec muc))
165+ => .(muc (dec muc))
193− [(cut 4 [muc 1] raw) $(raw (end 4 muc raw))]
166+ (add (lsh [4 muc] i.f.rip) $(f.rip t.f.rip))
194− =+ day=(div sec day:yo)
167+ (con (lsh 6 sec) fac)
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]
201```
168```
202
169
203#### Examples
170#### Examples
204
171
205```
172```
206− > (yell ~2014.3.20..05.42.53..7456)
173+> =murica (yell ~1776.7.4)
174+
175+> murica
207− [d=106.751.991.820.094 h=5 m=42 s=53 f=~[0x7456]]
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
208
186
209− > (yell ~2014.6.9..19.09.40..8b66)
187+> `tarp`[31 12 30 0 ~]
210− [d=106.751.991.820.175 h=19 m=9 s=40 f=~[0x8b66]]
188+[d=31 h=12 m=30 s=0 f=~]
211
189
212− > (yell ~1776.7.4)
190+> `@dr`(yule `tarp`[31 12 30 0 ~])
213− [d=106.751.991.733.273 h=0 m=0 s=0 f=~]
191+~d31.h12.m30
214```
192```
215
193
216---
194---
217
195
218−## `++yelp`
196+## `++yall`
219
197
220−Leap-week?
198+Time since beginning of time
221
199
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.
223
202
224#### Accepts
203#### Accepts
225
204
226−`yer` is an unsigned decimal.
205+`day` is a `@ud`.
227
206
228#### Produces
207#### Produces
229
208
230−A flag.
209+A cell of unsigned decimals.
231
210
232#### Source
211#### Source
233
212
234```hoon
213```hoon
235− ++ yelp
214+++ yall
236− |= yer=@ud ^- ?
215+ |= day=@ud
237− &(=(0 (mod yer 4)) |(!=(0 (mod yer 100)) =(0 (mod yer 400))))
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))
238```
237```
239
238
240#### Examples
239#### Examples
241
240
242```
241```
243− > (yelp 2.014)
242+> (yall 198)
244− %.n
243+[y=0 m=7 d=17]
245
244
246− > (yelp 2.008)
245+> (yall 90.398)
247− %.y
246+[y=247 m=7 d=3]
248
247
249− > (yelp 0)
248+> (yall 0)
250− %.y
249+[y=0 m=1 d=1]
251−
252− > (yelp 14.011)
253− %.n
254```
250```
255
251
256---
252---
257
253
258−## `++yore`
254+## `++yawn`
259
255
260−Date from atomic date
256+Days since beginning of time
261
257
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]`.
263
260
264#### Accepts
261#### Accepts
265
262
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.
267
268
268#### Produces
269#### Produces
269
270
270−A `date`.
271+An unsigned decimal.
271
272
272#### Source
273#### Source
273
274
274```hoon
275```hoon
275− ++ yore
276+++ yawn
276− |= now=@da
277+ |= [yer=@ud mot=@ud day=@ud]
277− ^- date
278+ ^- @ud
278− =+ rip=(yell now)
279+ => .(mot (dec mot), day (dec day))
279− =+ ger=(yall d.rip)
280+ => ^+ .
280− :- ?: (gth y.ger 292.277.024.400)
281+ %= .
281− [a=& y=(sub y.ger 292.277.024.400)]
282+ day
282− [a=| y=+((sub 292.277.024.400 y.ger))]
283+ =+ cah=?:((yelp yer) moy:yo moh:yo)
283− [m.ger d.ger h.rip m.rip s.rip f.rip]
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))))
284```
300```
285
301
286#### Examples
302#### Examples
287
303
288```
304```
289− > (yore ~2014.6.6..21.09.15..0a16)
305+> (yawn 2.018 7 4)
290− [[a=%.y y=2.014] m=6 t=[d=6 h=21 m=9 s=15 f=~[0xa16]]]
306+737.244
307+
308+> (yawn 1.776 7 4)
309+648.856
310+
311+> (yawn 1.990 10 11)
312+727.116
291```
313```
292
314
293---
315---
294
316
295−## `++yule`
317+## `++yelp`
296
318
297−Daily time to time atom
319+Leap year?
298
320
299−Accepts a `tarp`, a parsed daily time, and produces a time atom,
321+Determines whether a year is a leap year. Produces a flag.
300−`@d`.
301
322
302#### Accepts
323#### Accepts
303
324
304−`rip` is a `tarp`.
325+`yer` is an unsigned decimal.
305
326
306#### Produces
327#### Produces
307
328
308−A time atom, `@d`.
329+A flag.
309
330
310#### Source
331#### Source
311
332
312```hoon
333```hoon
313− ++ yule :: time atom
334+++ yelp
314− |= rip=tarp
335+ |= yer=@ud ^- ?
315− ^- @d
336+ &(=(0 (mod yer 4)) |(!=(0 (mod yer 100)) =(0 (mod yer 400))))
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− ::
330```
337```
331
338
332#### Examples
339#### Examples
333
340
334```
341```
335− > =murica (yell ~1776.7.4)
342+> (yelp 2.014)
336−
343+%.n
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
345
344
346− > `@da`(yule (yell ~2014.3.20..05.42.53..7456))
345+> (yelp 2.008)
347− ~2014.3.20..05.42.53..7456
346+%.y
348
347
349− > `tarp`[31 12 30 0 ~]
348+> (yelp 0)
350− [d=31 h=12 m=30 s=0 f=~]
349+%.y
351
350
352− > `@dr`(yule `tarp`[31 12 30 0 ~])
351+> (yelp 14.011)
353− ~d31.h12.m30
352+%.n
354```
353```
355
354
356---
355---
@@ -364,7 +363,7 @@ Core whose arms contain constants for interacting with earth time.
364#### Source
363#### Source
365
364
366```hoon
365```hoon
367− ++ yo
366+++ yo
368```
367```
369
368
370---
369---
@@ -384,20 +383,20 @@ An atom.
384#### Source
383#### Source
385
384
386```hoon
385```hoon
387− |% ++ cet 36.524
386+++ cet 36.524
388```
387```
389
388
390#### Examples
389#### Examples
391
390
392```
391```
393− > cet:yo
392+> cet:yo
394− 36.524
393+36.524
395
394
396− > (add 365 cet:yo)
395+> (add 365 cet:yo)
397− 36.889
396+36.889
398
397
399− > (sub (add 24 (mul 100 365)) cet:yo)
398+> (sub (add 24 (mul 100 365)) cet:yo)
400− 0
399+0
401```
400```
402
401
403---
402---
@@ -415,17 +414,17 @@ An atom.
415#### Source
414#### Source
416
415
417```hoon
416```hoon
418− ++ day 86.400
417+++ day 86.400
419```
418```
420
419
421#### Examples
420#### Examples
422
421
423```
422```
424− > day:yo
423+> day:yo
425− 86.400
424+86.400
426
425
427− > (add 60 day:yo)
426+> (add 60 day:yo)
428− 86.460
427+86.460
429```
428```
430
429
431---
430---
@@ -445,17 +444,17 @@ An atom.
445#### Source
444#### Source
446
445
447```hoon
446```hoon
448− ++ era 146.097
447+++ era 146.097
449```
448```
450
449
451#### Examples
450#### Examples
452
451
453```
452```
454− > era:yo
453+> era:yo
455− 146.097
454+146.097
456
455
457− > (sub era:yo (mul 4 cet:yo))
456+> (sub era:yo (mul 4 cet:yo))
458− 1
457+1
459```
458```
460
459
461#### Discussion
460#### Discussion
@@ -482,17 +481,17 @@ An atom.
482#### Source
481#### Source
483
482
484```hoon
483```hoon
485− ++ hor 3.600
484+++ hor 3.600
486```
485```
487
486
488#### Examples
487#### Examples
489
488
490```
489```
491− > hor:yo
490+> hor:yo
492− 3.600
491+3.600
493
492
494− > (div hor:yo 60)
493+> (div hor:yo 60)
495− 60
494+60
496```
495```
497
496
498---
497---
@@ -511,14 +510,14 @@ An atom.
511#### Source
510#### Source
512
511
513```hoon
512```hoon
514− ++ jes 106.751.991.084.417
513+++ jes 106.751.991.084.417
515```
514```
516
515
517#### Examples
516#### Examples
518
517
519```
518```
520− > jes:yo
519+> jes:yo
521− 106.751.991.084.417
520+106.751.991.084.417
522```
521```
523
522
524#### Discussion
523#### Discussion
@@ -540,14 +539,14 @@ An atom.
540#### Source
539#### Source
541
540
542```hoon
541```hoon
543− ++ mit 60
542+++ mit 60
544```
543```
545
544
546#### Examples
545#### Examples
547
546
548```
547```
549− > mit:yo
548+> mit:yo
550− 60
549+60
551```
550```
552
551
553---
552---
@@ -567,17 +566,17 @@ A `list` of `@ud`
567#### Source
566#### Source
568
567
569```hoon
568```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 ~]
571```
570```
572
571
573#### Examples
572#### Examples
574
573
575```
574```
576− > moh:yo
575+> moh:yo
577− ~[31 28 31 30 31 30 31 31 30 31 30 31]
576+~[31 28 31 30 31 30 31 31 30 31 30 31]
578
577
579− > (snag 4 moh:yo)
578+> (snag 4 moh:yo)
580− 31
579+31
581```
580```
582
581
583---
582---
@@ -597,17 +596,17 @@ A `list` of `@ud`.
597#### Source
596#### Source
598
597
599```hoon
598```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 ~]
601```
600```
602
601
603#### Examples
602#### Examples
604
603
605```
604```
606− > moy:yo
605+> moy:yo
607− ~[31 29 31 30 31 30 31 31 30 31 30 31]
606+~[31 29 31 30 31 30 31 31 30 31 30 31]
608
607
609− > (snag 1 moy:yo)
608+> (snag 1 moy:yo)
610− 29
609+29
611```
610```
612
611
613---
612---
@@ -626,14 +625,14 @@ An atom.
626#### Source
625#### Source
627
626
628```hoon
627```hoon
629− ++ qad 126.144.001
628+++ qad 126.144.001
630```
629```
631
630
632#### Examples
631#### Examples
633
632
634```
633```
635− > qad:yo
634+> qad:yo
636− 126.144.001
635+126.144.001
637```
636```
638
637
639---
638---
@@ -652,14 +651,14 @@ An atom.
652#### Source
651#### Source
653
652
654```hoon
653```hoon
655− ++ yer 31.536.000
654+++ yer 31.536.000
656```
655```
657
656
658#### Examples
657#### Examples
659
658
660```
659```
661− > yer:yo
660+> yer:yo
662− 31.536.000
661+31.536.000
663```
662```
664
663
665---
664---
content/docs/hoon/reference/stdlib/3d.md+437−452
@@ -22,15 +22,14 @@ An atom.
22#### Source
22#### Source
23
23
24```hoon
24```hoon
25− ++ shad |=(ruz=@ (shax (shax ruz)))
25+++ shad |=(ruz=@ (shax (shax ruz)))
26```
26```
27
27
28#### Examples
28#### Examples
29
29
30```
30```
31− > (shad 11)
31+> `@uw`(shad 11)
32− \/20.519.637.820.582.103.109.435.907.615.585.653.479.776.629.591.855.451.248.\/
32+0w2Rt.J1gzO.JjsQc.0Komy.DYUUO.27koh.QxwE0.Qgwt7.EPGCi
33− 718.295.626.625.655.417.234
34```
33```
35
34
36---
35---
@@ -39,8 +38,9 @@ An atom.
39
38
40Half SHA-256
39Half SHA-256
41
40
42−Produces a 128-bit atom by performing the [bitwise XOR](/docs/hoon/reference/stdlib/2d) on the
41+Produces a 128-bit atom by performing the [bitwise
43−first and last halves of the 256-bit salted hash `shas`.
42+XOR](/docs/hoon/reference/stdlib/2d) on the first and last halves of the 256-bit
43+salted hash `shas`.
44
44
45#### Accepts
45#### Accepts
46
46
@@ -51,350 +51,238 @@ first and last halves of the 256-bit salted hash `shas`.
51#### Source
51#### Source
52
52
53```hoon
53```hoon
54− ++ shaf :: half sha-256
54+++ shaf
55− |= [sal=@ ruz=@]
55+ |= [sal=@ ruz=@]
56− =+ haz=(shas sal ruz)
56+ =+ haz=(shas sal ruz)
57− (mix (end 7 1 haz) (rsh 7 1 haz))
57+ (mix (end 7 haz) (rsh 7 haz))
58```
58```
59
59
60#### Examples
60#### Examples
61
61
62```
62```
63− > (shaf 17 8)
64− 52.667.672.807.485.289.251.324.336.639.183.409.041
65−
66− > `@ub`(shaf 17 8)
63+> `@uw`(shaf 17 8)
67− \/0b1011.1111.1101.0110.1110.1000.0100.1110.1100.1000.0010.0100.1111.0001.0010.0010\/
64+0wD.DSP0L.WUuQg.-A765.4RY-h
68− .0100.1110.1110.0011.1100.1111.0001.1101.1101.1100.1110.1111.0100.0101.0001.0100
69− \/
70```
65```
71
66
72---
67---
73
68
74−## `++shal`
69+## `++sham`
75
70
76−SHA-512 with length
71+128-bit noun hash
77
72
78−Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
73+Produces a 128-bit atom by hashing a noun `yux` with the [`+shaf`](#shaf)
79−the byte-length of the theoretical buffer represented by the atom.
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.
80
77
81#### Accepts
78#### Accepts
82
79
83−`len` is an atom.
80+`yux` is a noun.
84−
85−`ruz` is an atom.
86
81
87#### Produces
82#### Produces
88
83
89−An atom.
84+A `@uvH`.
90
85
91#### Source
86#### Source
92
87
93```hoon
88```hoon
94− ++ shal
89+++ sham
95− ~/ %shal
90+ |= yux=* ^- @uvH ^- @
96− |= [len=@ ruz=@] ^- @
91+ ?@ yux
97− => .(ruz (cut 3 [0 len] ruz))
92+ (shaf %mash yux)
98− =+ [few==>(fe .(a 6)) wac=|=([a=@ b/@] (cut 6 [a 1] b))]
93+ (shaf %sham (jam yux))
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)
205```
94```
206
95
207#### Examples
96#### Examples
208
97
209```
98```
210− > (shal 1 'hello')
99+> (sham [2 4])
211− \/7.956.615.373.791.575.273.027.009.123.631.914.645.972.441.264.528.176.292.399.908\/
100+0v3.71s52.4bqnp.ki2b8.9hhsp.2ufgg
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− \/
215
101
216− > (shal 1 'hello')
102+> (sham "hello")
217− \/7.956.615.373.791.575.273.027.009.123.631.914.645.972.441.264.528.176.292.399.908\/
103+0v1.hg8mv.t7s3f.u4f8a.q5noe.dvqvh
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− \/
221```
104```
222
105
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−
229---
106---
230
107
231−## `++sham`
108+## `++shas`
232
109
233−128-bit noun hash
110+Salted hash
234
111
235−Produces a 128-bit atom by hashing a noun `yux` with the `shah` function. If
112+Produces an atom by using SHA-256 plus a salt input. The [bitwise
236−that noun is a cell, then it is passed to the [`jam`](/docs/hoon/reference/stdlib/2p) function to produce
113+XOR](/docs/hoon/reference/stdlib/2d) is performed on salt `sal` and the product
237−an atom to be hashed.
114+of atom `ruz` hashed with SHA-256. The product of that logical operation is then
115+itself hashed with SHA-256.
238
116
239#### Accepts
117#### Accepts
240
118
241−`yux` is a noun.
119+`sal` is an atom.
242−
243−#### Produces
244
120
245−An atom.
121+`ruz` is an atom.
246
122
247#### Source
123#### Source
248
124
249```hoon
125```hoon
250− ++ sham
126+++ shas
251− |= yux=* ^- @uvH ^- @
127+ ~/ %shas
252− ?@ yux
128+ |= [sal=@ ruz=@]
253− (shaf %mash yux)
129+ (shax (mix sal (shax ruz)))
254− (shaf %sham (jam yux))
255− ::
256```
130```
257
131
258#### Examples
132#### Examples
259
133
260```
134```
261− > (sham [2 4])
135+> `@uw`(shas 1 1)
262− 0v3.71s52.4bqnp.ki2b8.9hhsp.2ufgg
136+0w5hZ.Gim4L.9xKlU.jJJQr.2Bgi~.RHd5s.IwXuV.p43at.ZdsTY
263−
264− > (sham "hello")
265− 0v1.hg8mv.t7s3f.u4f8a.q5noe.dvqvh
266```
137```
267
138
268---
139---
269
140
270−## `++shan`
141+## `++shax`
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.
279
142
280−#### Produces
143+SHA-256
281
144
282−An atom.
145+Produces an atom by hashing an atom `ruz` with SHA-256.
283
146
284−#### Source
147+#### Sources
285
148
286```hoon
149```hoon
287− ++ shan
150+++ shax
151+ ~/ %shax
288− |= ruz=@
152+ |= 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))
153+ (shay [(met 3 ruz) 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)
352```
154```
353
155
354#### Examples
156#### Examples
355
157
356```
158```
357− > (shan 'hello')
159+> `@uw`(shax 'foo')
358− 975.987.071.262.755.080.377.722.350.727.279.193.143.145.743.181
160+0waXD.pCa8n.EHVEb.-3p70.JgxcQ.gj0tf.4mr-o.~6~Sx.HJ2oI
359```
161```
360
162
361−#### Discussion
362−
363−SHA-1 is a deprecated function; it is not considered secure.
364−
365---
163---
366
164
367−## `++shas`
165+## `++shay`
368
166
369−Salted hash
167+SHA-256 with length
370
168
371−Produces an atom by using SHA-256 plus a salt input. The [bitwise XOR](/docs/hoon/reference/stdlib/2d)
169+Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
372−is performed on `sal` and the product of `ruz` hashed with SHA-256. The product
170+the byte-length of the theoretical buffer represented by the atom.
373−of that logical operation is then itself hashed with SHA-256.
374
171
375#### Accepts
172#### Accepts
376
173
377−`sal` is an atom.
174+`len` is an atom.
378
175
379`ruz` is an atom.
176`ruz` is an atom.
380
177
381#### Source
178#### Source
382
179
383```hoon
180```hoon
384− ++ shas
181+++ shay
182+ ~/ %shay
385− |= [sal=@ ruz=@]
183+ |= [len=@u ruz=@] ^- @
386− (shax (mix sal (shax 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)
387```
266```
388
267
389#### Examples
268#### Examples
390
269
391```
270```
392− > (shas 12.845 6)
271+> `@uw`(shay 1 'hello')
393− \/111.115.941.493.032.291.043.932.789.632.248.509.108.945.255.494.251.860.287\/
272+0w2eN.jupNe.OyGTU.-l0Co.SWSGS.fFD9k.HPHg1.-AYmg.CgaCG
394− .707.279.709.200.349.471.936
395− \/
396```
273```
397
274
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+
398---
286---
399
287
400## `++shaw`
288## `++shaw`
@@ -419,52 +307,57 @@ An atom.
419#### Source
307#### Source
420
308
421```hoon
309```hoon
422− ++ shaw
310+++ shaw
423− |= [sal=@ len=@ ruz=@]
311+ |= [sal=@ len=@ ruz=@]
424− (~(raw og (shas sal (mix len ruz))) len)
312+ (~(raw og (shas sal (mix len ruz))) len)
425```
313```
426
314
427#### Examples
315#### Examples
428
316
429```
317```
430− > `@ub`(shaw 3 6 98)
318+> `@ub`(shaw 3 6 98)
431− 0b11.0111
319+0b11.0111
432
320
433− > `@ub`(shaw 2 6 98)
321+> `@ub`(shaw 2 6 98)
434− 0b11
322+0b11
435```
323```
436
324
437---
325---
438
326
439−## `++shax`
327+## `++shaz`
440
328
441−SHA-256
329+SHA-512
442
330
443−Produces an atom by hashing an atom `ruz` with SHA-256.
331+Produces an atom by hashing an atom `ruz` with SHA-512.
444
332
445−#### Sources
333+#### Accepts
334+
335+`ruz` is an atom.
336+
337+#### Produces
338+
339+An atom.
340+
341+#### Source
446
342
447```hoon
343```hoon
448− ++ shax
344+++ shaz
449− ~/ %shax
450− |= ruz=@ ^- @
345+ |= ruz=@ ^- @
451− (shay [(met 3 ruz) ruz])
346+ (shal [(met 3 ruz) ruz])
452```
347```
453
348
454#### Examples
349#### Examples
455
350
456```
351```
457− > (shax 'hello')
352+`@uw`(shaz 'hello')
458− \/16.552.786.619.039.860.277.601.417.878.457.384.195.409.020.923.835.016.617.984.82\/
353+0w1.3MdWY.sS~QT.zFsbB.N7oQo.cSImU.56Xcu.DMtMq.mrSsc.z8WsY.pNABZ.Z~ySG.Ecysb.XCP5P.fuHjq.Jimnn.zPoHQ.AQD6r
459− 0.774.431.701.725.740
460− \/
461```
354```
462
355
463---
356---
464
357
465−## `++shay`
358+## `++shal`
466
359
467−SHA-256 with length
360+SHA-512 with length
468
361
469Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
362Produces an atom by hashing an atom `ruz` with SHA-512. Another atom, `len`, is
470the byte-length of the theoretical buffer represented by the atom.
363the 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.
475
368
476`ruz` is an atom.
369`ruz` is an atom.
477
370
371+#### Produces
372+
373+An atom.
374+
478#### Source
375#### Source
479
376
480```hoon
377```hoon
481− ++ shay
378+++ shal
482− ~/ %shay
379+ ~/ %shal
483− |= [len=@u ruz=@] ^- @
380+ |= [len=@ ruz=@] ^- @
484− => .(ruz (cut 3 [0 len] ruz))
381+ => .(ruz (cut 3 [0 len] ruz))
485− =+ [few==>(fe .(a 5)) wac=|=([a=@ b=@] (cut 5 [a 1] b))]
382+ =+ [few==>(fe .(a 6)) wac=|=([a=@ b=@] (cut 6 [a 1] b))]
486− =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
383+ =+ [sum=sum.few ror=ror.few net=net.few inv=inv.few]
487− =+ ral=(lsh 0 3 len)
384+ =+ ral=(lsh [0 3] len)
488− =+ ^= ful
385+ =+ ^= ful
489− %+ can 0
386+ %+ can 0
490− :~ [ral ruz]
387+ :~ [ral ruz]
491− [8 128]
388+ [8 128]
492− [(mod (sub 960 (mod (add 8 ral) 512)) 512) 0]
389+ [(mod (sub 1.920 (mod (add 8 ral) 1.024)) 1.024) 0]
493− [64 (~(net fe 6) ral)]
390+ [128 (~(net fe 7) ral)]
494− ==
391+ ==
495− =+ lex=(met 9 ful)
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.
496− =+ ^= kbx 0xc671.78f2.bef9.a3f7.a450.6ceb.90be.fffa.
402+ a450.6ceb.de82.bde9.90be.fffa.2363.1e28.
497− 8cc7.0208.84c8.7814.78a5.636f.748f.82ee.
403+ 8cc7.0208.1a64.39ec.84c8.7814.a1f0.ab72.
404+ 78a5.636f.4317.2f60.748f.82ee.5def.b2fc.
498− 682e.6ff3.5b9c.ca4f.4ed8.aa4a.391c.0cb3.
405+ 682e.6ff3.d6b2.b8a3.5b9c.ca4f.7763.e373.
406+ 4ed8.aa4a.e341.8acb.391c.0cb3.c5c9.5a63.
499− 34b0.bcb5.2748.774c.1e37.6c08.19a4.c116.
407+ 34b0.bcb5.e19b.48a8.2748.774c.df8e.eb99.
408+ 1e37.6c08.5141.ab53.19a4.c116.b8d2.d0c8.
500− 106a.a070.f40e.3585.d699.0624.d192.e819.
409+ 106a.a070.32bb.d1b8.f40e.3585.5771.202a.
410+ d699.0624.5565.a910.d192.e819.d6ef.5218.
501− c76c.51a3.c24b.8b70.a81a.664b.a2bf.e8a1.
411+ c76c.51a3.0654.be30.c24b.8b70.d0f8.9791.
412+ a81a.664b.bc42.3001.a2bf.e8a1.4cf1.0364.
502− 9272.2c85.81c2.c92e.766a.0abb.650a.7354.
413+ 9272.2c85.1482.353b.81c2.c92e.47ed.aee6.
414+ 766a.0abb.3c77.b2a8.650a.7354.8baf.63de.
503− 5338.0d13.4d2c.6dfc.2e1b.2138.27b7.0a85.
415+ 5338.0d13.9d95.b3df.4d2c.6dfc.5ac4.2aed.
416+ 2e1b.2138.5c26.c926.27b7.0a85.46d2.2ffc.
504− 1429.2967.06ca.6351.d5a7.9147.c6e0.0bf3.
417+ 1429.2967.0a0e.6e70.06ca.6351.e003.826f.
418+ d5a7.9147.930a.a725.c6e0.0bf3.3da8.8fc2.
505− bf59.7fc7.b003.27c8.a831.c66d.983e.5152.
419+ bf59.7fc7.beef.0ee4.b003.27c8.98fb.213f.
420+ a831.c66d.2db4.3210.983e.5152.ee66.dfab.
506− 76f9.88da.5cb0.a9dc.4a74.84aa.2de9.2c6f.
421+ 76f9.88da.8311.53b5.5cb0.a9dc.bd41.fbd4.
422+ 4a74.84aa.6ea6.e483.2de9.2c6f.592b.0275.
507− 240c.a1cc.0fc1.9dc6.efbe.4786.e49b.69c1.
423+ 240c.a1cc.77ac.9c65.0fc1.9dc6.8b8c.d5b5.
424+ efbe.4786.384f.25e3.e49b.69c1.9ef1.4ad2.
508− c19b.f174.9bdc.06a7.80de.b1fe.72be.5d74.
425+ c19b.f174.cf69.2694.9bdc.06a7.25c7.1235.
426+ 80de.b1fe.3b16.96b1.72be.5d74.f27b.896f.
509− 550c.7dc3.2431.85be.1283.5b01.d807.aa98.
427+ 550c.7dc3.d5ff.b4e2.2431.85be.4ee4.b28c.
428+ 1283.5b01.4570.6fbe.d807.aa98.a303.0242.
510− ab1c.5ed5.923f.82a4.59f1.11f1.3956.c25b.
429+ ab1c.5ed5.da6d.8118.923f.82a4.af19.4f9b.
430+ 59f1.11f1.b605.d019.3956.c25b.f348.b538.
511− e9b5.dba5.b5c0.fbcf.7137.4491.428a.2f98
431+ e9b5.dba5.8189.dbbc.b5c0.fbcf.ec4d.3b2f.
432+ 7137.4491.23ef.65cd.428a.2f98.d728.ae22
512− =+ ^= hax 0x5be0.cd19.1f83.d9ab.9b05.688c.510e.527f.
433+ =+ ^= hax 0x5be0.cd19.137e.2179.1f83.d9ab.fb41.bd6b.
434+ 9b05.688c.2b3e.6c1f.510e.527f.ade6.82d1.
513− a54f.f53a.3c6e.f372.bb67.ae85.6a09.e667
435+ a54f.f53a.5f1d.36f1.3c6e.f372.fe94.f82b.
514− =+ i=0
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
515 |- ^- @
445 |- ^- @
516− ?: =(i lex)
446+ ?: =(80 j)
517− (rep 5 (turn (rip 5 hax) net))
518− =+ ^= wox
447+ 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)
448+ =+ :* l=(wac (sub j 15) wox)
526− m=(wac (sub j 2) wox)
449+ m=(wac (sub j 2) wox)
527− n=(wac (sub j 16) wox)
450+ n=(wac (sub j 16) wox)
528− o=(wac (sub j 7) wox)
451+ 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)
543 ==
452 ==
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+ ==
544− |- ^- @
467+ |- ^- @
545− ?: =(64 j)
468+ ?: =(80 j)
546− %= ^$
469+ %= ^$
547− i +(i)
470+ i +(i)
548− hax %+ rep 5
471+ hax %+ rep 6
549− :~ (sum a (wac 0 hax))
472+ :~ (sum a (wac 0 hax))
550− (sum b (wac 1 hax))
473+ (sum b (wac 1 hax))
551− (sum c (wac 2 hax))
474+ (sum c (wac 2 hax))
552− (sum d (wac 3 hax))
475+ (sum d (wac 3 hax))
553− (sum e (wac 4 hax))
476+ (sum e (wac 4 hax))
554− (sum f (wac 5 hax))
477+ (sum f (wac 5 hax))
555− (sum g (wac 6 hax))
478+ (sum g (wac 6 hax))
556− (sum h (wac 7 hax))
479+ (sum h (wac 7 hax))
557− ==
480+ ==
558− ==
481+ ==
559− =+ l=:(mix (ror 0 2 a) (ror 0 13 a) (ror 0 22 a)) :: s0
482+ =+ l=:(mix (ror 0 28 a) (ror 0 34 a) (ror 0 39 a)) :: S0
560− =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
483+ =+ m=:(mix (dis a b) (dis a c) (dis b c)) :: maj
561− =+ n=(sum l m) :: t2
484+ =+ n=(sum l m) :: t2
562− =+ o=:(mix (ror 0 6 e) (ror 0 11 e) (ror 0 25 e)) :: s1
485+ =+ o=:(mix (ror 0 14 e) (ror 0 18 e) (ror 0 41 e)) :: S1
563− =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
486+ =+ p=(mix (dis e f) (dis (inv e) g)) :: ch
564− =+ q=:(sum h o p (wac j kbx) (wac j wox)) :: t1
487+ =+ 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)
488+ $(j +(j), a (sum q n), b a, c b, d c, e (sum d q), f e, g f, h g)
566```
489```
567
490
568#### Examples
491#### Examples
569
492
570```
493```
571− > (shay 1 'hello')
494+> `@uw`(shal 1 'hello')
572− \/16.144.219.278.061.159.438.339.586.294.967.166.038.336.988.797.862.808.055.174.98\/
495+0w2.nWO0R.zMAzH.OSWU1.apOje.19Mta.RE24o.4u~MB.wQuj4.NDdG6.0QZA0.w21Br.yQVhu.pFBII.Cdgvd.WT-bH.g51Yu.fL44y
573− 7.398.597.302.069.674
496+```
574− \/
575
497
498+```
576− > (shay 2 'hello')
499+> `@uw`(shal 2 'hello')
577− \/100.467.333.538.737.303.691.714.735.404.408.035.555.613.179.595.938.688.113.300.8\/
500+0w1.r3W4g.hae37.8YUFp.ntryr.DsQuY.rPsdm.p3Xjv.rayLz.DslEc.Lxvll.OJUc3.tZeLZ.TjUnu.XMyGr.82qPA.zl1y0.HbSpT
578− 01.974.878.934.544.183
579− \/
580```
501```
581
502
582#### Discussion
503#### Discussion
@@ -587,11 +508,11 @@ byte-string.
587
508
588---
509---
589
510
590−## `++shaz`
511+## `++shan`
591
512
592−SHA-512
513+SHA-1
593
514
594−Produces an atom by hashing an atom `ruz` with SHA-512.
515+Produces an atom by hashing an atom `ruz` with SHA-1.
595
516
596#### Accepts
517#### Accepts
597
518
@@ -604,21 +525,84 @@ An atom.
604#### Source
525#### Source
605
526
606```hoon
527```hoon
607− ++ shaz
528+++ shan
608− |= ruz=@ ^- @
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]
609− (shal [(met 3 ruz) ruz])
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)
610```
593```
611
594
612#### Examples
595#### Examples
613
596
614```
597```
615− > (shaz 'hello')
598+> `@uw`(shan 'hello')
616− \/3.548.533.422.469.437.734.729.094.584.175.910.682.076.656.883.559.953.324.378.007\/
599+0waH.QNxTs.NuyyS.HXu3P.J8bdC.KGkdd
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− \/
620```
600```
621
601
602+#### Discussion
603+
604+SHA-1 is a deprecated function; it is not considered secure.
605+
622---
606---
623
607
624## `++og`
608## `++og`
@@ -637,16 +621,16 @@ A core.
637#### Source
621#### Source
638
622
639```hoon
623```hoon
640− ++ og
624+++ og
641− ~/ %og
625+ ~/ %og
642− |_ a=@
626+ |_ a=@
643```
627```
644
628
645#### Examples
629#### Examples
646
630
647```
631```
648− > ~(. og 919)
632+> ~(. og 919)
649− <4.wmp {a/@ud <54.tyv 119.olq 31.ohr 1.jmk $143>}>
633+<4.wmp {a/@ud <54.tyv 119.olq 31.ohr 1.jmk $143>}>
650```
634```
651
635
652#### Discussion
636#### Discussion
@@ -675,26 +659,28 @@ An atom.
675#### Source
659#### Source
676
660
677```hoon
661```hoon
678− ++ rad
662+++ rad
679− |= b=@ ^- @
663+ |= b=@ ^- @
664+ ~_ leaf+"rad-zero"
665+ ?< =(0 b)
680− =+ c=(raw (met 0 b))
666+ =+ c=(raw (met 0 b))
681− ?:((lth c b) c $(a +(a)))
667+ ?:((lth c b) c $(a +(a)))
682```
668```
683
669
684#### Examples
670#### Examples
685
671
686```
672```
687− > (~(rad og 5) 11)
673+> (~(rad og 5) 11)
688− 4
674+4
689
675
690− > (~(rad og 758.716.593) 11)
676+> (~(rad og 758.716.593) 11)
691− 2
677+2
692
678
693− > (~(rad og 1) 100.000)
679+> (~(rad og 1) 100.000)
694− 71.499
680+71.499
695
681
696− > (~(rad og eny) 11) :: `eny` acts as a random sample
682+> (~(rad og eny) 11) :: `eny` acts as a random sample
697− 7
683+7
698```
684```
699
685
700---
686---
@@ -718,23 +704,23 @@ A cell.
718#### Source
704#### Source
719
705
720```hoon
706```hoon
721− ++ rads
707+++ rads
722− |= b=@
708+ |= b=@
723− =+ r=(rad b)
709+ =+ r=(rad b)
724− [r +>.$(a (shas %og-s (mix a r)))]
710+ [r +>.$(a (shas %og-s (mix a r)))]
725```
711```
726
712
727#### Examples
713#### Examples
728
714
729```
715```
730− > (~(rads og 4) 10)
716+> (~(rads og 4) 10)
731− [2 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
717+[2 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
732
718
733− > =/ rng ~(. og 7)
719+> =/ rng ~(. og 7)
734− =^ a rng (rads:rng 10)
720+ =^ a rng (rads:rng 10)
735− =^ b rng (rads:rng 10)
721+ =^ b rng (rads:rng 10)
736− [a b]
722+ [a b]
737− [2 8]
723+[2 8]
738```
724```
739
725
740#### Discussion
726#### Discussion
@@ -762,35 +748,35 @@ An atom.
762#### Source
748#### Source
763
749
764```hoon
750```hoon
765− ++ raw
751+++ raw
766− ~/ %raw
752+ ~/ %raw
767− |= b=@ ^- @
753+ |= b=@ ^- @
768− %+ can
754+ %+ can
769− 0
755+ 0
770− =+ c=(shas %og-a (mix b a))
756+ =+ c=(shas %og-a (mix b a))
771− |- ^- (list [@ @])
757+ |- ^- (list [@ @])
772− ?: =(0 b)
758+ ?: =(0 b)
773− ~
759+ ~
774− =+ d=(shas %og-b (mix b (mix a c)))
760+ =+ d=(shas %og-b (mix b (mix a c)))
775− ?: (lth b 256)
761+ ?: (lth b 256)
776− [[b (end 0 b d)] ~]
762+ [[b (end [0 b] d)] ~]
777− [[256 d] $(c d, b (sub b 256))]
763+ [[256 d] $(c d, b (sub b 256))]
778```
764```
779
765
780#### Examples
766#### Examples
781
767
782```
768```
783− > `@ud`(~(raw og 27) 4)
769+> `@ud`(~(raw og 27) 4)
784− 0b1001
770+0b1001
785
771
786− > `@ub`(~(raw og 27) 3)
772+> `@ub`(~(raw og 27) 3)
787− 0b0
773+0b0
788
774
789− > `@ub`(~(raw og 11) 4)
775+> `@ub`(~(raw og 11) 4)
790− 0b1111
776+0b1111
791
777
792− > `@ub`(~(raw og 11) 3)
778+> `@ub`(~(raw og 11) 3)
793− 0b100
779+0b100
794```
780```
795
781
796---
782---
@@ -806,24 +792,23 @@ parent core with `(raw b)`.
806#### Source
792#### Source
807
793
808```hoon
794```hoon
809− ++ raws
795+++ raws
810− |= b=@
796+ |= b=@
811− =+ r=(raw b)
797+ =+ r=(raw b)
812− [r +>.$(a (shas %og-s r))]
798+ [r +>.$(a (shas %og-s (mix a r)))]
813− --
814```
799```
815
800
816#### Examples
801#### Examples
817
802
818```
803```
819− > `[@ub _og]`(~(raws og 7) 4)
804+> `[@ub _og]`(~(raws og 7) 4)
820− [0b1100 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
805+[0b1100 <4.wmp {a/@ <54.tyv 119.olq 31.ohr 1.jmk $143>}>]
821
806
822− > =/ rng ~(. og 7)
807+> =/ rng ~(. og 7)
823− =^ a rng (rads:rng 4)
808+ =^ a rng (rads:rng 4)
824− =^ b rng (rads:rng 4)
809+ =^ b rng (rads:rng 4)
825− [`@ub`a `@ub`b]
810+ [`@ub`a `@ub`b]
826− [0b10 0b1]
811+[0b10 0b1]
827```
812```
828
813
829#### Discussion
814#### Discussion
content/docs/hoon/reference/stdlib/3f.md+444−314
@@ -14,8 +14,8 @@ Used in the `@p` phonetic base.
14#### Source
14#### Source
15
15
16```hoon
16```hoon
17− ++ un
17+++ un
18− |%
18+ |%
19```
19```
20
20
21---
21---
@@ -39,36 +39,35 @@ An atom.
39#### Source
39#### Source
40
40
41```hoon
41```hoon
42− ++ wren
42+++ wren
43− |= pyn=@ ^- @
43+ |= pyn=@ ^- @
44− =+ len=(met 3 pyn)
44+ =+ len=(met 3 pyn)
45− ?: =(0 len)
45+ ?: =(0 len)
46− 0
46+ 0
47− => .(len (dec len))
47+ => .(len (dec len))
48− =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
48+ =+ mig=(zaft (xafo len (cut 3 [len 1] pyn)))
49− %+ can 3
49+ %+ can 3
50− %- flop ^- (list [@ @])
50+ %- flop ^- (list [@ @])
51− :- [1 mig]
51+ :- [1 mig]
52− |- ^- (list [@ @])
52+ |- ^- (list [@ @])
53− ?: =(0 len)
53+ ?: =(0 len)
54− ~
54+ ~
55− => .(len (dec len))
55+ => .(len (dec len))
56− =+ mog=(zyft :(mix mig (end 3 1 len) (cut 3 [len 1] pyn)))
56+ =+ mog=(zyft :(mix mig (end 3 len) (cut 3 [len 1] pyn)))
57− [[1 mog] $(mig mog)]
57+ [[1 mog] $(mig mog)]
58− ::
59```
58```
60
59
61#### Examples
60#### Examples
62
61
63```
62```
64− > `@ux`(wren:un 'testing')
63+> `@ux`(wren:un 'testing')
65− 0x30.bf6a.b9fe.7d8f
64+0x30.bf6a.b9fe.7d8f
66
65
67− > `@ux`'testing'
66+> `@ux`'testing'
68− 0x67.6e69.7473.6574
67+0x67.6e69.7473.6574
69
68
70− > `@da`(wred:un (wren:un ~2001.2.5))
69+> `@da`(wred:un (wren:un ~2001.2.5))
71− ~2001.2.5
70+~2001.2.5
72```
71```
73
72
74---
73---
@@ -92,36 +91,35 @@ An atom.
92#### Source
91#### Source
93
92
94```hoon
93```hoon
95− ++ wred
94+++ wred
96− |= cry=@ ^- @
95+ |= cry=@ ^- @
97− =+ len=(met 3 cry)
96+ =+ len=(met 3 cry)
98− ?: =(0 len)
97+ ?: =(0 len)
99− 0
98+ 0
100− => .(len (dec len))
99+ => .(len (dec len))
101− =+ mig=(cut 3 [len 1] cry)
100+ =+ mig=(cut 3 [len 1] cry)
102− %+ can 3
101+ %+ can 3
103− %- flop ^- (list [@ @])
102+ %- flop ^- (list [@ @])
104− :- [1 (xaro len (zart mig))]
103+ :- [1 (xaro len (zart mig))]
105− |- ^- (list [@ @])
104+ |- ^- (list [@ @])
106− ?: =(0 len)
105+ ?: =(0 len)
107− ~
106+ ~
108− => .(len (dec len))
107+ => .(len (dec len))
109− =+ mog=(cut 3 [len 1] cry)
108+ =+ mog=(cut 3 [len 1] cry)
110− [[1 :(mix mig (end 3 1 len) (zyrt mog))] $(mig mog)]
109+ [[1 :(mix mig (end 3 len) (zyrt mog))] $(mig mog)]
111− ::
112```
110```
113
111
114#### Examples
112#### Examples
115
113
116```
114```
117− > (wred:un 0x30.bf6a.b9fe.7d8f)
115+> (wred:un 0x30.bf6a.b9fe.7d8f)
118− 29.113.321.805.538.676
116+29.113.321.805.538.676
119
117
120− > `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
118+> `@t`(wred:un 0x30.bf6a.b9fe.7d8f)
121− 'testing'
119+'testing'
122
120
123− > (wred:un (wren:un 200.038.426))
121+> (wred:un (wren:un 200.038.426))
124− 200.038.426
122+200.038.426
125```
123```
126
124
127---
125---
@@ -146,20 +144,20 @@ An atom.
146#### Source
144#### Source
147
145
148```hoon
146```hoon
149− ++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
147+++ xafo |=([a=@ b=@] +((mod (add (dec b) a) 255)))
150```
148```
151
149
152#### Examples
150#### Examples
153
151
154```
152```
155− > (xafo:un 5 6)
153+> (xafo:un 5 6)
156− 11
154+11
157
155
158− > (xafo:un 256 20)
156+> (xafo:un 256 20)
159− 21
157+21
160
158
161− > (xafo:un 256 (xaro:un 256 20))
159+> (xafo:un 256 (xaro:un 256 20))
162− 20
160+20
163```
161```
164
162
165---
163---
@@ -184,20 +182,20 @@ An atom.
184#### Source
182#### Source
185
183
186```hoon
184```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)))
188```
186```
189
187
190#### Examples
188#### Examples
191
189
192```
190```
193− > (xaro:un 17 57)
191+> (xaro:un 17 57)
194− 40
192+40
195
193
196− > (xaro:un 265 12)
194+> (xaro:un 265 12)
197− 2
195+2
198
196
199− > (xaro:un 256 (xafo:un 256 20))
197+> (xaro:un 256 (xafo:un 256 20))
200− 20
198+20
201```
199```
202
200
203---
201---
@@ -220,37 +218,37 @@ An atom.
220#### Source
218#### Source
221
219
222```hoon
220```hoon
223− ++ zaft
221+++ zaft
224− |= a=@D
222+ |= a=@D
225− =+ ^= b
223+ =+ ^= b
226− 0xcc.75bc.86c8.2fb1.9a42.f0b3.79a0.92ca.21f6.1e41.cde5.fcc0.
224+ 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.
225+ 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.
226+ 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.
227+ 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.
228+ 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.
229+ 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.
230+ 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.
231+ 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.
232+ 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.
233+ 3750.6ef1.44dd.89ef.6576.d00a.fbda.9ed2.3b6c.7b0c.bde9.2ade.
236− 5c88.c182.481a.1b0f.2bfd.d591.2726.57ba
234+ 5c88.c182.481a.1b0f.2bfd.d591.2726.57ba
237− (cut 3 [(dec a) 1] b)
235+ (cut 3 [(dec a) 1] b)
238```
236```
239
237
240#### Examples
238#### Examples
241
239
242```
240```
243− > (zaft:un 0x12)
241+> (zaft:un 0x12)
244− 42
242+42
245
243
246− > (zaft:un 0xff)
244+> (zaft:un 0xff)
247− 204
245+204
248− > `@ux`(zart:un 204)
246+> `@ux`(zart:un 204)
249− 0xff
247+0xff
250
248
251− > (zaft:un 0x0)
249+> (zaft:un 0x0)
252− ! decrement-underflow
250+! decrement-underflow
253− ! exit
251+! exit
254```
252```
255
253
256---
254---
@@ -273,35 +271,34 @@ An atom.
273#### Source
271#### Source
274
272
275```hoon
273```hoon
276− ++ zart :: reverse 255-sbox
274+++ zart
277− |= a=@D
275+ |= a=@D
278− =+ ^= b
276+ =+ ^= b
279− 0x68.4f07.ea1c.73c9.75c2.efc8.d559.5125.f621.a7a8.8591.5613.
277+ 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.
278+ 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.
279+ 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.
280+ 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.
281+ 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.
282+ 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.
283+ 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.
284+ 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.
285+ 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.
286+ 2c04.0339.97a1.2ff0.49d0.eeb8.6c0a.0b37.b967.c347.d9ac.e072.
289− e409.7b9f.1598.1d3f.33de.8ce3.8970.8e7a
287+ e409.7b9f.1598.1d3f.33de.8ce3.8970.8e7a
290− (cut 3 [(dec a) 1] b)
288+ (cut 3 [(dec a) 1] b)
291− ::
292```
289```
293
290
294#### Examples
291#### Examples
295
292
296```
293```
297− > `@ux`(zart:un 204)
294+> `@ux`(zart:un 204)
298− 0xff
295+0xff
299
296
300− > `@ux`(zart:un 42)
297+> `@ux`(zart:un 42)
301− 0x12
298+0x12
302
299
303− > (zaft:un 0x12)
300+> (zaft:un 0x12)
304− 42
301+42
305```
302```
306
303
307---
304---
@@ -324,38 +321,37 @@ An atom.
324#### Source
321#### Source
325
322
326```hoon
323```hoon
327− ++ zyft :: forward 256-sbox
324+++ zyft
328− |= a=@D
325+ |= a=@D
329− =+ ^= b
326+ =+ ^= b
330− 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
327+ 0xbb49.b71f.b881.b402.17e4.6b86.69b5.1647.115f.dddb.7ca5.
331− 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
328+ 8371.4bd5.19a9.b092.605d.0d9b.e030.a0cc.78ba.5706.4d2d.
332− 986a.768c.f8e8.c4c7.2f1c.effe.3cae.01c0.253e.65d3.3872.
329+ 986a.768c.f8e8.c4c7.2f1c.effe.3cae.01c0.253e.65d3.3872.
333− ce0e.7a74.8ac6.daac.7e5c.6479.44ec.4143.3d20.4af0.ee6c.
330+ ce0e.7a74.8ac6.daac.7e5c.6479.44ec.4143.3d20.4af0.ee6c.
334− c828.deca.0377.249f.ffcd.7b4f.eb7d.66f2.8951.042e.595a.
331+ c828.deca.0377.249f.ffcd.7b4f.eb7d.66f2.8951.042e.595a.
335− 8e13.f9c3.a79a.f788.6199.9391.7fab.6200.4ce5.0758.e2f1.
332+ 8e13.f9c3.a79a.f788.6199.9391.7fab.6200.4ce5.0758.e2f1.
336− 7594.c945.d218.4248.afa1.e61a.54fb.1482.bea4.96a2.3473.
333+ 7594.c945.d218.4248.afa1.e61a.54fb.1482.bea4.96a2.3473.
337− 63c2.e7cb.155b.120a.4ed7.bfd8.b31b.4008.f329.fca3.5380.
334+ 63c2.e7cb.155b.120a.4ed7.bfd8.b31b.4008.f329.fca3.5380.
338− 9556.0cb2.8722.2bea.e96e.3ac5.d1bc.10e3.2c52.a62a.b1d6.
335+ 9556.0cb2.8722.2bea.e96e.3ac5.d1bc.10e3.2c52.a62a.b1d6.
339− 35aa.d05e.f6a8.0f3b.31ed.559d.09ad.f585.6d21.fd1d.8d67.
336+ 35aa.d05e.f6a8.0f3b.31ed.559d.09ad.f585.6d21.fd1d.8d67.
340− 370b.26f4.70c1.b923.4684.6fbd.cf8b.5036.0539.9cdc.d93f.
337+ 370b.26f4.70c1.b923.4684.6fbd.cf8b.5036.0539.9cdc.d93f.
341− 9068.1edf.8f33.b632.d427.97fa.9ee1
338+ 9068.1edf.8f33.b632.d427.97fa.9ee1
342− (cut 3 [a 1] b)
339+ (cut 3 [a 1] b)
343− ::
344```
340```
345
341
346#### Examples
342#### Examples
347
343
348```
344```
349− > (zyft:un 0x12)
345+> (zyft:un 0x12)
350− 57
346+57
351
347
352− > (zyft:un 0x0)
348+> (zyft:un 0x0)
353− 225
349+225
354
350
355− > (zyft:un 0xff)
351+> (zyft:un 0xff)
356− 187
352+187
357− > `@ux`(zyrt:un 187)
353+> `@ux`(zyrt:un 187)
358− 0xff
354+0xff
359```
355```
360
356
361---
357---
@@ -378,66 +374,76 @@ An atom.
378#### Source
374#### Source
379
375
380```hoon
376```hoon
381− ++ zyrt :: reverse 256-sbox
377+++ zyrt
382− |= a=@D
378+ |= a=@D
383− =+ ^= b
379+ =+ ^= b
384− 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
380+ 0x9fc8.2753.6e02.8fcf.8b35.2b20.5598.7caa.c9a9.30b0.9b48.
385− 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
381+ 47ce.6371.80f6.407d.00dd.0aa5.ed10.ecb7.0f5a.5c3a.e605.
386− c077.4337.17bd.9eda.62a4.79a7.ccb8.44cd.8e64.1ec4.5b6b.
382+ c077.4337.17bd.9eda.62a4.79a7.ccb8.44cd.8e64.1ec4.5b6b.
387− 1842.ffd8.1dfb.fd07.f2f9.594c.3be3.73c6.2cb6.8438.e434.
383+ 1842.ffd8.1dfb.fd07.f2f9.594c.3be3.73c6.2cb6.8438.e434.
388− 8d3d.ea6a.5268.72db.a001.2e11.de8c.88d3.0369.4f7a.87e2.
384+ 8d3d.ea6a.5268.72db.a001.2e11.de8c.88d3.0369.4f7a.87e2.
389− 860d.0991.25d0.16b9.978a.4bf4.2a1a.e96c.fa50.85b5.9aeb.
385+ 860d.0991.25d0.16b9.978a.4bf4.2a1a.e96c.fa50.85b5.9aeb.
390− 9dbb.b2d9.a2d1.7bba.66be.e81f.1946.29a8.f5d2.f30c.2499.
386+ 9dbb.b2d9.a2d1.7bba.66be.e81f.1946.29a8.f5d2.f30c.2499.
391− c1b3.6583.89e1.ee36.e0b4.6092.937e.d74e.2f6f.513e.9615.
387+ c1b3.6583.89e1.ee36.e0b4.6092.937e.d74e.2f6f.513e.9615.
392− 9c5d.d581.e7ab.fe74.f01b.78b1.ae75.af57.0ec2.adc7.3245.
388+ 9c5d.d581.e7ab.fe74.f01b.78b1.ae75.af57.0ec2.adc7.3245.
393− 12bf.2314.3967.0806.31dc.cb94.d43f.493c.54a6.0421.c3a1.
389+ 12bf.2314.3967.0806.31dc.cb94.d43f.493c.54a6.0421.c3a1.
394− 1c4a.28ac.fc0b.26ca.5870.e576.f7f1.616d.905f.ef41.33bc.
390+ 1c4a.28ac.fc0b.26ca.5870.e576.f7f1.616d.905f.ef41.33bc.
395− df4d.225e.2d56.7fd6.1395.a3f8.c582
391+ df4d.225e.2d56.7fd6.1395.a3f8.c582
396− (cut 3 [a 1] b)
392+ (cut 3 [a 1] b)
397```
393```
398
394
399#### Examples
395#### Examples
400
396
401```
397```
402− > `@ux`(zyrt:un 57)
398+> `@ux`(zyrt:un 57)
403− 0x12
399+0x12
404
400
405− > `@ux`(zyrt:un 225)
401+> `@ux`(zyrt:un 225)
406− 0x0
402+0x0
407
403
408− > `@ux`(zyrt:un 187)
404+> `@ux`(zyrt:un 187)
409− 0xff
405+0xff
410− > (zyft:un 0xff)
406+> (zyft:un 0xff)
411− 187
407+187
412```
408```
413
409
414---
410---
415
411
416## `++ob`
412## `++ob`
417
413
418−Reversible scrambling, v2
414+Reversible scrambling, v3
419−
420−```hoon
421− ++ ob
422− |%
423−```
424
415
425A core for performing reversible scrambling operations for the `@p` phonetic
416A core for performing reversible scrambling operations for the `@p` phonetic
426base.
417base.
427
418
419+#### Source
420+
421+```hoon
422+++ ob
423+ ~% %ob ..ob
424+ ==
425+ %fein fein
426+ %fynd fynd
427+ ==
428+ |%
429+```
430+
428---
431---
429
432
430−### `++feen:ob`
433+### `++fein:ob`
431
434
432−Conceal structure, v2
435+conceal structure, v3
433
436
434−Randomly permutes atoms that fit into 17 to 32 bits into one another. If the
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
435−atom fits into 33 to 64 bits, does the same permutation on the low 32 bits
441+into 33 to 64 bits, does the same permutation on the low 32 bits only.
436−only. Otherwise, passes the atom through unchanged.
442+Otherwise, passes `pyn` through unchanged.
437
443
438#### Accepts
444#### Accepts
439
445
440−An atom.
446+`pyn` is an atom.
441
447
442#### Produces
448#### Produces
443
449
@@ -446,49 +452,44 @@ An atom.
446#### Source
452#### Source
447
453
448```hoon
454```hoon
449− ++ feen
455+++ fein
456+ ~/ %fein
450− |= pyn=@ ^- @
457+ |= pyn=@ ^- @
451− ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
458+ ?: &((gte pyn 0x1.0000) (lte pyn 0xffff.ffff))
452− (add 0x1.0000 (fice (sub pyn 0x1.0000)))
459+ (add 0x1.0000 (feis (sub pyn 0x1.0000)))
453− ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
460+ ?: &((gte pyn 0x1.0000.0000) (lte pyn 0xffff.ffff.ffff.ffff))
454− =+ lo=(dis pyn 0xffff.ffff)
461+ =/ lo (dis pyn 0xffff.ffff)
455− =+ hi=(dis pyn 0xffff.ffff.0000.0000)
462+ =/ hi (dis pyn 0xffff.ffff.0000.0000)
456− %+ con hi
463+ %+ con hi
457− (add 0x1.0000 (fice (sub lo 0x1.0000)))
464+ $(pyn lo)
458− pyn
465+ pyn
459− ::
460```
466```
461
467
462#### Examples
468#### Examples
463
469
464```
470```
465− > `@p`(feen:ob 111.103)
471+> (fein:ob 111.103)
466− ~mophul-pagwyx
472+2.783.373.008
467
473
468− > `@p`(feen:ob ~mophul-pagwyx)
474+> (fynd:ob 2.783.373.008)
469− ~wisfed-lonwes
475+111.103
470−
471− > `@p`(feen:ob (fend:ob ~mophul-pagwyx))
472− ~mophul-pagwyx
473−
474− > `@p`(feen:ob ~wex)
475− ~wex
476```
476```
477
477
478---
478---
479
479
480−### `++fend:ob`
480+### `++fynd:ob`
481+
482+Restore structure, v3
481
483
482−Restore structure, v2
484+Restores obfuscated values that have been enciphered with [+fein](feinob).
483
485
484−Randomly permutes atoms that fit into 17 to 32 bits into one another, and
486+Permutes atom `cry` that fits into 17 to 32 bits, or permutes the low 32 bits of
485−randomly permutes the low 32 bits of atoms that fit into 33 to 64 bits;
487+`cry` if it fits into 33 to 64 bits. Otherwise, passes the atom through
486−otherwise, passes the atom through unchanged. The inverse of the one applied
488+unchanged. The inverse of the one applied by [`+fein`](#feinob).
487−by `feen`.
488
489
489#### Accepts
490#### Accepts
490
491
491−An atom.
492+`cry` is an atom.
492
493
493#### Produces
494#### Produces
494
495
@@ -497,52 +498,42 @@ An atom.
497#### Source
498#### Source
498
499
499```hoon
500```hoon
500− ++ fend
501+++ fynd
502+ ~/ %fynd
501− |= cry=@ ^- @
503+ |= cry=@ ^- @
502− ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
504+ ?: &((gte cry 0x1.0000) (lte cry 0xffff.ffff))
503− (add 0x1.0000 (teil (sub cry 0x1.0000)))
505+ (add 0x1.0000 (tail (sub cry 0x1.0000)))
504− ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
506+ ?: &((gte cry 0x1.0000.0000) (lte cry 0xffff.ffff.ffff.ffff))
505− =+ lo=(dis cry 0xffff.ffff)
507+ =/ lo (dis cry 0xffff.ffff)
506− =+ hi=(dis cry 0xffff.ffff.0000.0000)
508+ =/ hi (dis cry 0xffff.ffff.0000.0000)
507− %+ con hi
509+ %+ con hi
508− (add 0x1.0000 (teil (sub lo 0x1.0000)))
510+ $(cry lo)
509− cry
511+ cry
510− ::
511```
512```
512
513
513#### Examples
514#### Examples
514
515
515```
516```
516− > `@p`(fend:ob 111.103)
517+> (fein:ob 111.103)
517− ~doznec-sapfes
518+2.783.373.008
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
527
519
528− > `@p`(fend:ob ~tarmed)
520+> (fynd:ob 2.783.373.008)
529− ~tarmed
521+111.103
530```
522```
531
523
532---
524---
533
525
534−### `++fice:ob`
526+### `++feis:ob`
535
527
536−Feistel-like cipher
528+Four-round generalised Feistel cipher over the domain [0, 2^32 - 2^16 - 1]
537
529
538−Produces an atom by applying a variant of the Feistel cipher. Unlike
530+See: Black & Rogaway (2002), Ciphers for arbitrary finite domains.
539−a conventional Feistel cipher that is its own inverse if keys are used in
531+
540−reverse order, this Feistel-like cipher uses two moduli that must be swapped
532+Inverse of [`+tail`](#tailob).
541−when applying the reverse transformation. The inverse of `teil`.
542
533
543#### Accepts
534#### Accepts
544
535
545−`nor` is an atom.
536+`m` is an atom.
546
537
547#### Produces
538#### Produces
548
539
@@ -551,42 +542,33 @@ An atom.
551#### Source
542#### Source
552
543
553```hoon
544```hoon
554− ++ fice :: adapted from
545+++ feis
555− |= nor=@ :: black and rogaway
546+ |= m=@
556− ^- @ :: "ciphers with
547+ ^- @
557− =+ ^= sel :: arbitrary finite
548+ (fee 4 0xffff 0x1.0000 (mul 0xffff 0x1.0000) eff m)
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− ::
564```
549```
565
550
566#### Examples
551#### Examples
567
552
568```
553```
569− > (fice:ob 11)
554+> (feis:ob 11)
570− 776.343.932
555+776.343.932
571
556
572− > (fice:ob (teil:ob 11))
557+> (tail:ob 776.343.932)
573− 11
558+11
574```
559```
575
560
576---
561---
577
562
578−### `++teil:ob`
563+### `++tail:ob`
579
564
580−Reverse Feistel-like cipher
565+Reverse [`+feis`](#feisob)
581
566
582−Applies the reverse of the Feistel-like cipher applied by `fice`. Unlike
567+Applies the reverse of the Feistel cipher applied by `+feis`.
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.
586
568
587#### Accepts
569#### Accepts
588
570
589−`vip` is an atom.
571+`m` is an atom.
590
572
591#### Produces
573#### Produces
592
574
@@ -595,112 +577,261 @@ An atom.
595#### Source
577#### Source
596
578
597```hoon
579```hoon
598− ++ teil :: reverse ++fice
580+++ tail
599− |= vip=@
581+ |= m=@
600− ^- @
582+ ^- @
601− =+ ^= sel
583+ (feen 4 0xffff 0x1.0000 (mul 0xffff 0x1.0000) eff m)
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− ::
608```
584```
609
585
610#### Examples
586#### Examples
611
587
612```
588```
613− > (teil:ob 11)
589+> (feis:ob 11)
614− 514.230.493
590+776.343.932
615
591
616− > (teil:ob (fice:ob 11))
592+> (tail:ob 776.343.932)
617− 11
593+11
618```
594```
619
595
620---
596---
621
597
622−### `++rynd:ob`
598+### `++fee:ob`
599+
600+"Fe" in B&R (2002)
623
601
624−Reverse Feistel-like cipher
602+A Feistel cipher given the following parameters:
625
603
626−A single round of the Feistel-like cipher `fice`. AES ([`aesc`](/docs/hoon/reference/stdlib/3f)) is
604+- `r`: Number of Feistel rounds.
627−used as the round function. The inverse of `rund`.
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].
628
609
629#### Accepts
610#### Accepts
630
611
631−`n` is an atom.
612+`r`, `a`, `b`, `k` are an atoms.
632
613
633−`l` is an atom.
614+`prft` is a gate: `$-([j=@ r=@] @)`.
634
615
635−`r` is an atom.
616+`m` is an atom.
636
617
637#### Produces
618#### Produces
638
619
639−A cell of two atoms.
620+An atom.
640
621
641#### Source
622#### Source
642
623
643```hoon
624```hoon
644− ++ rynd
625+++ fee
645− |= [n=@ l=@ r=@]
626+ |= [r=@ a=@ b=@ k=@ prf=$-([j=@ r=@] @) m=@]
646− ^- [@ @]
627+ ^- @
647− :- r
628+ =/ c (fe r a b prf m)
648− ?~ (mod n 2)
629+ ?: (lth c k)
649− (~(sum fo 65.535) l (en:aesc (snag n raku) r))
630+ c
650− (~(sum fo 65.536) l (en:aesc (snag n raku) r))
631+ (fe r a b prf c)
651```
632```
652
633
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
654
656
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)
655```
665```
656− > (rynd:ob 2 261 9)
657− [9 37.422]
658
666
659− > (rynd:ob 2 (rund:ob 2 37.422 9))
667+---
660− [261 32.902]
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)
661```
723```
662
724
663---
725---
664
726
665−### `++rund:ob`
727+### `++fen:ob`
728+
729+Reverse [`+fe`](#feob)
666
730
667−Reverse single Feistel-like
731+This is an internal function to [`+feen`](#feenob)
668
732
669−A single round of the Feistel-like reverse cipher `teil`. AES ([`aesc`](/docs/hoon/reference/stdlib/3f))
733+Note that this implementation differs slightly from the reference paper
670−is used as the round function. The inverse of `rynd`.
734+to support some legacy behaviour.
671
735
672#### Accepts
736#### Accepts
673
737
674−`n` is an atom.
738+`r`, `a` and `b` are atoms.
675
739
676−`l` is an atom.
740+`prf` is a gate: `$-([j=@ r=@] @)`.
677
741
678−`r` is an atom.
742+`m` is an atom.
679
743
680#### Produces
744#### Produces
681
745
682−A cell of two atoms.
746+An atom.
683
747
684#### Source
748#### Source
685
749
686```hoon
750```hoon
687− ++ rund
751+++ fen
688− |= [n=@ l=@ r=@]
752+ |= [r=@ a=@ b=@ prf=$-([j=@ r=@] @) m=@]
689− ^- [@ @]
690− :- r
753+ =/ j r
754+ ::
755+ =/ ahh
691− ?~ (mod n 2)
756+ ?. =((mod r 2) 0)
692− (~(dif fo 65.535) l (muk (snag n raku) 2 r))
757+ (div m a)
693− (~(dif fo 65.536) l (muk (snag n raku) 2 r))
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)
694```
796```
695
797
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.
697
816
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)
698```
828```
699− > (rund:ob 2 261 9)
700− [9 28.635]
701
829
702− > (rund:ob 2 (rynd:ob 2 28.635 9))
830+#### Example
703− [261 32.651]
831+
832+```
833+> (eff:ob 0 'ab')
834+1.178.819.349
704```
835```
705
836
706---
837---
@@ -709,7 +840,7 @@ A cell of two atoms.
709
840
710Key list
841Key list
711
842
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).
713
844
714#### Produces
845#### Produces
715
846
@@ -718,21 +849,20 @@ A list of atoms of aura `@ux` (hexadecimal).
718#### Source
849#### Source
719
850
720```hoon
851```hoon
721− ++ raku
852+++ raku
722− ^- (list @ux)
853+ ^- (list @ux)
723− :~ 0xb76d.5eed
854+ :~ 0xb76d.5eed
724− 0xee28.1300
855+ 0xee28.1300
725− 0x85bc.ae01
856+ 0x85bc.ae01
726− 0x4b38.7af7
857+ 0x4b38.7af7
727− ==
858+ ==
728− --
729```
859```
730
860
731#### Examples
861#### Examples
732
862
733```
863```
734− > raku:ob
864+> raku:ob
735− ~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
865+~[0xb76d.5eed 0xee28.1300 0x85bc.ae01 0x4b38.7af7]
736```
866```
737
867
738---
868---
content/docs/hoon/reference/stdlib/3g.md+124−134
@@ -4,7 +4,7 @@ weight = 27
4template = "doc.html"
4template = "doc.html"
5+++
5+++
6
6
7−## `++coin`
7+## `+$coin`
8
8
9Noun-literal syntax cases
9Noun-literal syntax cases
10
10
@@ -14,91 +14,92 @@ and printed using `++so` and `++co` cores.
14#### Source
14#### Source
15
15
16```hoon
16```hoon
17++$ coin $~ [%$ %ud 0]
17− ++ coin $% [$$ p=dime]
18+ $% [%$ p=dime]
18− [$blob p=*]
19+ [%blob p=*]
19− [$many p=(list coin)]
20+ [%many p=(list coin)]
20− ==
21```
21```
22
22
23−---
24−
25#### Examples
23#### Examples
26
24
27```
25```
28− > `coin`(need (slay '~s1'))
26+> `coin`(need (slay '~s1'))
29− [%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
27+[%$ p=[p=~.dr q=18.446.744.073.709.551.616]]
30
28
31− > `coin`(need (slay '0x2b59'))
29+> `coin`(need (slay '0x2b59'))
32− [%$ p=[p=~.ux q=11.097]]
30+[%$ p=[p=~.ux q=11.097]]
33
31
34− > ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
32+> ~(rend co [%many ~[[%$ %ud 1] [%$ %tas 'a'] [%$ %s -2]]])
35− "._1_a_-2__"
33+"._1_a_-2__"
36− > ._1_a_-2__
34+> ._1_a_-2__
37− [1 %a -2]
35+[1 %a -2]
38
36
39− > `@uv`(jam [3 4])
37+> `@uv`(jam [3 4])
40− 0v2cd1
38+0v2cd1
41
39
42− > (slay '~02cd1')
40+> (slay '~02cd1')
43− [~ u=[%blob p=[3 4]]]
41+[~ u=[%blob p=[3 4]]]
44
42
45− > ~02cd1
43+> ~02cd1
46− [3 4]
44+[3 4]
47```
45```
48
46
49---
47---
50
48
51−## `++dime`
49+## `+$dime`
52
50
53Aura-atom pair
51Aura-atom pair
54
52
53+Used in `++coin`. Convenience methods
55−Used in `++coin`. Convenience methods [`++scot`](/docs/hoon/reference/stdlib/4m) and
54+[`++scot`](/docs/hoon/reference/stdlib/4m#scot) and
56−[`++scow`](/docs/hoon/reference/stdlib/4m) print dimes as `++cord` and `++tape`, respectively.
55+[`++scow`](/docs/hoon/reference/stdlib/4m#scow) print dimes as `++cord` and
56+`++tape`, respectively. [`++slat`](/docs/hoon/reference/stdlib/4m#slat),
57−[`++slat`](/docs/hoon/reference/stdlib/4m), [`++slav`](/docs/hoon/reference/stdlib/4m), and [`++slaw`](/docs/hoon/reference/stdlib/4m) are used
57+[`++slav`](/docs/hoon/reference/stdlib/4m#slav), and
58+[`++slaw`](/docs/hoon/reference/stdlib/4m#slaw) are used to parse atoms of
58−to parse atoms of specific auras.
59+specific auras.
59
60
60#### Source
61#### Source
61
62
62```hoon
63```hoon
63− ++ dime [p=@ta q=@]
64++$ dime [p=@ta q=@]
64```
65```
65
66
66#### Examples
67#### Examples
67
68
68```
69```
69− > +>:(slay '0x123')
70+> +>:(slay '0x123')
70− p=[p=~.ux q=291]
71+p=[p=~.ux q=291]
71```
72```
72
73
73---
74---
74
75
75−## `++edge`
76+## `+$edge`
76
77
77Parsing location metadata. Parsing location input `p` and optional result `p.q` and parsing continuation `q.q`.
78Parsing location metadata. Parsing location input `p` and optional result `p.q` and parsing continuation `q.q`.
78
79
79#### Source
80#### Source
80
81
81```hoon
82```hoon
82− ++ edge [p=hair q=(unit [p=* q=nail])] :: parsing output
83++$ edge [p=hair q=(unit [p=* q=nail])]
83```
84```
84
85
85#### Examples
86#### Examples
86
87
87```
88```
88− > *edge
89+> *edge
89− [p=[p=0 q=0] q=~]
90+[p=[p=0 q=0] q=~]
90
91
91− > (tall:vast [1 1] "a b")
92+> (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"]]]]
93+[p=[p=1 q=3] q=[~ u=[p=[%wing p=~[%a]] q=[p=[p=1 q=2] q=" b"]]]]
93```
94```
94
95
95#### Discussion
96#### Discussion
96
97
97−See also: [Section 3g](/docs/hoon/reference/stdlib/3g#rule), `++rule`
98+See also: [$rule](#rule).
98
99
99---
100---
100
101
101−## `++hair`
102+## `+$hair`
102
103
103Parsing line and column
104Parsing line and column
104
105
@@ -107,23 +108,23 @@ A pair of two `@ud` used in parsing indicating line and column number.
107#### Source
108#### Source
108
109
109```hoon
110```hoon
110− ++ hair [p=@ud q=@ud]
111++$ hair [p=@ud q=@ud]
111```
112```
112
113
113#### Examples
114#### Examples
114
115
115```
116```
116− > *hair
117+> *hair
117− [p=0 q=0]
118+[p=0 q=0]
118
119
119− > `hair`[1 1] :: parsing starts at [1 1] as a convention.
120+> `hair`[1 1] :: parsing starts at [1 1] as a convention.
120− [p=1 q=1]
121+[p=1 q=1]
121
122
122− > ((plus ace) [1 1] " --")
123+> ((plus ace) [1 1] " --")
123− [p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
124+[p=[p=1 q=4] q=[~ u=[p=[~~. " "] q=[p=[p=1 q=4] q="--"]]]]
124
125
125− > `hair`p:((plus ace) [1 1] " --")
126+> `hair`p:((plus ace) [1 1] " --")
126− [p=1 q=4]
127+[p=1 q=4]
127```
128```
128
129
129---
130---
@@ -132,38 +133,39 @@ A pair of two `@ud` used in parsing indicating line and column number.
132
133
133Generic edge
134Generic edge
134
135
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.
136
137
137#### Source
138#### Source
138
139
139```hoon
140```hoon
140− ++ like |* a=gate
141+++ like |* a=$-(* *)
141− |= b=_`*`[(hair) ~]
142+ |: b=`*`[(hair) ~]
142− :- p=(hair -.b)
143+ :- p=(hair -.b)
143− ^= q
144+ ^= q
145+ ?@ +.b ~
144− :- ~
146+ :- ~
145− u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]]
147+ u=[p=(a +>-.b) q=[p=(hair -.b) q=(tape +.b)]]
146```
148```
147
149
148#### Examples
150#### Examples
149
151
150```
152```
151− > *(like char)
153+> *(like char)
152− [p=[p=0 q=0] q=~]
154+[p=[p=0 q=0] q=~]
153
155
154− > (ace [1 1] " a")
156+> (ace [1 1] " a")
155− [p=[p=1 q=2] q=[~ u=[p=' ' q=[p=[p=1 q=2] q="a"]]]]
157+[p=[p=1 q=2] q=[~ u=[p=' ' q=[p=[p=1 q=2] q="a"]]]]
156
158
157− > `(like char)`(ace [1 1] " a")
159+> `(like char)`(ace [1 1] " a")
158− [p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
160+[p=[p=1 q=2] q=[~ [p=~~. q=[p=[p=1 q=2] q="a"]]]]
159
161
160− > `(like ,@)`(ace [1 1] " a")
162+> `(like ,@)`(ace [1 1] " a")
161− [p=[p=1 q=2] q=[~ u=[p=32 q=[p=[p=1 q=2] q="a"]]]]
163+[p=[p=1 q=2] q=[~ u=[p=32 q=[p=[p=1 q=2] q="a"]]]]
162```
164```
163
165
164---
166---
165
167
166−## `++nail`
168+## `+$nail`
167
169
168Location, remainder of parsed text
170Location, remainder of parsed text
169
171
@@ -172,44 +174,44 @@ Indicates parsing position `p`, and remaining text to be parsed `q`.
172#### Source
174#### Source
173
175
174```hoon
176```hoon
175− ++ nail [p=hair q=tape]
177++$ nail [p=hair q=tape]
176```
178```
177
179
178#### Examples
180#### Examples
179
181
180```
182```
181− > +<:;~(plug cab cab)
183+> +<:;~(plug cab cab)
182− c=[p=[p=0 q=0] q=""]
184+c=[p=[p=0 q=0] q=""]
183```
185```
184
186
185---
187---
186
188
187−## `++pint`
189+## `+$pint`
188
190
189Parsing range
191Parsing range
190
192
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
192stack traces.
194stack traces.
193
195
194#### Source
196#### Source
195
197
196```hoon
198```hoon
197− ++ pint [p=[p=@ q=@] q=[p=@ q=@]]
199++$ pint [p=[p=@ q=@] q=[p=@ q=@]]
198```
200```
199
201
200#### Examples
202#### Examples
201
203
202```
204```
203− > !:(!!) :: !! always produces a crash
205+> !:(!!) :: !! always produces a crash
204− /~zod/home/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
206+/~zod/home/~2014.9.20..01.22.04..52e3/:<[1 4].[1 6]>
205
207
206− > `pint`[[1 4] [1 6]]
208+> `pint`[[1 4] [1 6]]
207− [p=[p=1 q=4] q=[p=1 q=6]]
209+[p=[p=1 q=4] q=[p=1 q=6]]
208```
210```
209
211
210---
212---
211
213
212−## `++rule`
214+## `+$rule`
213
215
214Parsing rule
216Parsing rule
215
217
@@ -218,19 +220,19 @@ An empty parsing rule, but used to check that parsing rules match this with `_`.
218#### Source
220#### Source
219
221
220```hoon
222```hoon
221− ++ rule _|=(nail *edge)
223++$ rule _|:($:nail $:edge)
222```
224```
223
225
224#### Examples
226#### Examples
225
227
226```
228```
227− > ([|=(a=nail [p.a ~ u=['a' a]])]:|6 [1 1] "hi")
229+> ([|=(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"]]
230+[[p=1 q=1] ~ u=['a' p=[p=1 q=1] q="hi"]]
229```
231```
230
232
231---
233---
232
234
233−## `++spot`
235+## `+$spot`
234
236
235Stack trace line
237Stack trace line
236
238
@@ -245,14 +247,14 @@ The stack trace that is printed after crashing.
245#### Examples
247#### Examples
246
248
247```
249```
248− > !: !! :: !! always produces a crash
250+> !: !! :: !! always produces a crash
249− /~zod/home/~2018.8.8..21.42.40..7852:<[1 5].[1 7]>
251+/~zod/home/~2018.8.8..21.42.40..7852:<[1 5].[1 7]>
250− ! exit
252+! exit
251```
253```
252
254
253---
255---
254
256
255−## `++tone`
257+## `+$tone`
256
258
257Nock result, error report
259Nock result, error report
258
260
@@ -262,45 +264,27 @@ or failure with an error report (`%2`).
262#### Source
264#### Source
263
265
264```hoon
266```hoon
265− ++ tone $% [$0 p=*] :: success
267++$ tone $% [%0 product=*]
266− [$1 p=(list)] :: blocks
268+ [%1 block=*]
267− [$2 p=(list [@ta *])] :: error report
269+ [%2 trace=(list [@ta *])]
268− ==
270+ ==
269```
271```
270
272
271#### Examples
273#### Examples
272
274
273```
275```
274− > (mink [[20 21] 0 3] $~)
276+> (mink [[20 21] 0 3] $~)
275− [%0 p=21]
277+[%0 product=21]
276−
278+```
277−
279+
280+```
278− > (mink [[1 2] !=(!:(+(.)))] ,~)
281+> (mink [[1 2] !=(!:(+(.)))] ,~)
279− [ %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]]]]
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− ]
299```
283```
300
284
301---
285---
302
286
303−## `++toon`
287+## `+$toon`
304
288
305Nock result, stack trace
289Nock result, stack trace
306
290
@@ -310,20 +294,30 @@ or failure with a stack trace (`%2`).
310#### Source
294#### Source
311
295
312```hoon
296```hoon
313− ++ toon $% [$0 p=*] :: success
297++$ toon $% [%0 p=*] :: success
314− [$1 p=(list)] :: blocks
298+ [%1 p=*] :: block
315− [$2 p=(list tank)] :: stack trace
299+ [%2 p=(list tank)] :: stack trace
316− ==
300+ == ::
317```
301```
318
302
319#### Examples
303#### Examples
320
304
321```
305```
322− > (mock [[20 21] 0 3] $~)
306+> (mock [[20 21] 0 3] $~)
323− [%0 p=21]
307+[%0 p=21]
308+```
324
309
310+```
325− > (mock [[1 2] !=(!:(+(.)))] ,~)
311+> (mock [[1 2] !=(!:(+(.)))] ,~)
326− [%2 p=~[[%leaf p="/~zod/try/~2014.9.23..18.34.32..d3c5/:<[1 20].[1 24]>"]]]
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+]
327```
321```
328
322
329---
323---
@@ -332,34 +326,30 @@ or failure with a stack trace (`%2`).
332
326
333Product from edge
327Product from edge
334
328
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.
336
330
337#### Source
331#### Source
338
332
339```hoon
333```hoon
340− ++ wonk |*(veq=edge ?~(q.veq !! p.u.q.veq))
334+++ wonk =+ veq=$:edge
335+ |@ ++ $ ?~(q.veq !! p.u.q.veq)
336+ --
341```
337```
342
338
343#### Examples
339#### Examples
344
340
345```
341```
346− > (wide:vast [1 1] "(add 2 2)")
342+> (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]]]
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=""]]]]
352− q=[p=[p=1 q=10] q=""]
344+```
353− ]
354− ]
355− ]
356
345
346+```
357− > (wonk (wide:vast [1 1] "(add 2 2)"))
347+> (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]]]
348+[%cncl p=[%wing p=~[%add]] q=~[[%sand p=%ud q=2] [%sand p=%ud q=2]]]
359```
349```
360
350
361#### Discussion
351#### Discussion
362
352
363−See also: `++edge`
353+See also: [`$edge`](#edge)
364
354
365---
355---
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).
99<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
99<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#cmpsi' title="Compare (signed integer)"><code>++cmp:si</code></a>
100<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
100<a class="tooltip" href='/docs/hoon/reference/stdlib/4k/#co' title="Literal rendering engine"><code>++co</code></a>
101<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#coil' title="Tuple of core information"><code>++coil</code></a>
101<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>
103<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#col' title="Parse : (col)"><code>++col</code></a>
103<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#col' title="Parse : (col)"><code>++col</code></a>
104<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#cold' title="Replace with constant"><code>++cold</code></a>
104<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#cold' title="Replace with constant"><code>++cold</code></a>
105<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#com' title="Parse , (com)"><code>++com</code></a>
105<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).
138<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#digby' title="Address of key (map)"><code>++dig:by</code></a>
138<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#digby' title="Address of key (map)"><code>++dig:by</code></a>
139<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#digin' title="Address of a in set"><code>++dig:in</code></a>
139<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#digin' title="Address of a in set"><code>++dig:in</code></a>
140<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#dimag' title="Parse decimal number"><code>++dim:ag</code></a>
140<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>
142<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#dinre' title="(Undocumented)"><code>++din:re</code></a>
142<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#dinre' title="(Undocumented)"><code>++din:re</code></a>
143<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#dis' title="Binary AND (atoms)"><code>++dis</code></a>
143<a class="tooltip" href='/docs/hoon/reference/stdlib/2d/#dis' title="Binary AND (atoms)"><code>++dis</code></a>
144<a class="tooltip" href='/docs/hoon/reference/stdlib/4i/#dit' title="Decimal digit"><code>++dit</code></a>
144<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).
172<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#eadfl' title="Exact add"><code>++ead:fl</code></a>
172<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#eadfl' title="Exact add"><code>++ead:fl</code></a>
173<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#each' title="Mold of fork between two types"><code>++each</code></a>
173<a class="tooltip" href='/docs/hoon/reference/stdlib/1c/#each' title="Mold of fork between two types"><code>++each</code></a>
174<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#easy' title="Always parse"><code>++easy</code></a>
174<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>
176<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#egcd' title="Extended Euclidean algorithm"><code>++egcd</code></a>
177<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#egcd' title="Extended Euclidean algorithm"><code>++egcd</code></a>
177<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#emnfl' title="Minimum exponent"><code>++emn:fl</code></a>
178<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#emnfl' title="Minimum exponent"><code>++emn:fl</code></a>
178<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#emufl' title="Exact multiply"><code>++emu:fl</code></a>
179<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).
200<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#fas' title="Parse / (fas)"><code>++fas</code></a>
201<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#fas' title="Parse / (fas)"><code>++fas</code></a>
201<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fe' title="Modulo bloq"><code>++fe</code></a>
202<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fe' title="Modulo bloq"><code>++fe</code></a>
202<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/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/#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>
204−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fendob' title="Restore structure v2"><code>++fend:ob</code></a>
207+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feinob' title="Conceal structure v3"><code>++fein:ob</code></a>
205−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ficeob' title="Feistellike cipher"><code>++fice: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>
206<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fil' title="Fill bloqstream"><code>++fil</code></a>
210<a class="tooltip" href='/docs/hoon/reference/stdlib/2c/#fil' title="Fill bloqstream"><code>++fil</code></a>
207<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
211<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#find' title="First index in list"><code>++find</code></a>
208<a class="tooltip" href='/docs/hoon/reference/stdlib/4c/#fitre' title="Fit on one line test"><code>++fit:re</code></a>
212<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).
224<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
228<a class="tooltip" href='/docs/hoon/reference/stdlib/3a/#frasi' title="Divide (signed integer)"><code>++fra:si</code></a>
225<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#full' title="Parse to end"><code>++full</code></a>
229<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#full' title="Parse to end"><code>++full</code></a>
226<a class="tooltip" href='/docs/hoon/reference/stdlib/4f/#funk' title="Add to tape"><code>++funk</code></a>
230<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>
227
232
228### g
233### g
229
234
@@ -272,7 +277,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
272
277
273### h
278### h
274
279
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>
276<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
281<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#hasby' title="Key existence check (map)"><code>++has:by</code></a>
277<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
282<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#hasin' title="Key existence check (set)"><code>++has:in</code></a>
278<a class="tooltip" href='/docs/hoon/reference/stdlib/2j/#hasju' title="Check contents (jug)"><code>++has:ju</code></a>
283<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).
420
425
421### n
426### n
422
427
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>
424<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#napto' title="Remove head of queue"><code>++nap:to</code></a>
429<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#napto' title="Remove head of queue"><code>++nap:to</code></a>
425<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ne' title="Digit rendering engine"><code>++ne</code></a>
430<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#ne' title="Digit rendering engine"><code>++ne</code></a>
426<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#nedfl' title="Require float"><code>++ned:fl</code></a>
431<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).
461<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pevab' title="Parse <=5 in base 32"><code>++pev:ab</code></a>
466<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pevab' title="Parse <=5 in base 32"><code>++pev:ab</code></a>
462<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pewab' title="Parse <= 5 in base 64"><code>++pew:ab</code></a>
467<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pewab' title="Parse <= 5 in base 64"><code>++pew:ab</code></a>
463<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#pfix' title="Discard first rule"><code>++pfix</code></a>
468<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>
465<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pivab' title="Parse 5 digits in base 32"><code>++piv:ab</code></a>
470<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#pivab' title="Parse 5 digits in base 32"><code>++piv:ab</code></a>
466<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#piwab' title="Parse 5 digits in base 64"><code>++piw:ab</code></a>
471<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#piwab' title="Parse 5 digits in base 64"><code>++piw:ab</code></a>
467<a class="tooltip" href='/docs/hoon/reference/stdlib/4e/#plug' title="Parse to tuple"><code>++plug</code></a>
472<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).
535<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#rub' title="Lengthdecode"><code>++rub</code></a>
540<a class="tooltip" href='/docs/hoon/reference/stdlib/2p/#rub' title="Lengthdecode"><code>++rub</code></a>
536<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rubat' title="(Undocumented)"><code>++rub:at</code></a>
541<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rubat' title="(Undocumented)"><code>++rub:at</code></a>
537<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rudat' title="(Undocumented)"><code>++rud:at</code></a>
542<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>
539<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rumat' title="(Undocumented)"><code>++rum:at</code></a>
544<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rumat' title="(Undocumented)"><code>++rum:at</code></a>
540<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#runby' title="Transform values (map)"><code>++run:by</code></a>
545<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#runby' title="Transform values (map)"><code>++run:by</code></a>
541<a class="tooltip" href='/docs/hoon/reference/stdlib/2h/#runin' title="Apply gate to set"><code>++run:in</code></a>
546<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>
543<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#runt' title="Prepend n times"><code>++runt</code></a>
547<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#runt' title="Prepend n times"><code>++runt</code></a>
544<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rupat' title="(Undocumented)"><code>++rup:at</code></a>
548<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#rupat' title="(Undocumented)"><code>++rup:at</code></a>
545<a class="tooltip" href='/docs/hoon/reference/stdlib/4g/#rush' title="Parse or null"><code>++rush</code></a>
549<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).
547<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#rutby' title="Transform nodes (map)"><code>++rut:by</code></a>
551<a class="tooltip" href='/docs/hoon/reference/stdlib/2i/#rutby' title="Transform nodes (map)"><code>++rut:by</code></a>
548<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#ruvat' title="(Undocumented)"><code>++ruv:at</code></a>
552<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#ruvat' title="(Undocumented)"><code>++ruv:at</code></a>
549<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#ruxat' title="(Undocumented)"><code>++rux:at</code></a>
553<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>
551
554
552### s
555### s
553
556
@@ -642,7 +645,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
642<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#spdfl' title="Produce smallest denormalized float"><code>++spd:fl</code></a>
645<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#spdfl' title="Produce smallest denormalized float"><code>++spd:fl</code></a>
643<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spin' title="Gate to list (with state)"><code>++spin</code></a>
646<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spin' title="Gate to list (with state)"><code>++spin</code></a>
644<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#spnfl' title="Produce smallest normal float"><code>++spn:fl</code></a>
647<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>
646<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#spud' title="Render path as tape"><code>++spud</code></a>
649<a class="tooltip" href='/docs/hoon/reference/stdlib/4m/#spud' title="Render path as tape"><code>++spud</code></a>
647<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spun' title="Gate to list (with state)"><code>++spun</code></a>
650<a class="tooltip" href='/docs/hoon/reference/stdlib/2b/#spun' title="Gate to list (with state)"><code>++spun</code></a>
648<a class="tooltip" href='/docs/hoon/reference/stdlib/2g/#sqt' title="Compute square root with remainder"><code>++sqt</code></a>
651<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).
702<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tec' title="Parse ` (tec)"><code>++tec</code></a>
705<a class="tooltip" href='/docs/hoon/reference/stdlib/4h/#tec' title="Parse ` (tec)"><code>++tec</code></a>
703<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tedab' title="Parse decimal number with <= 3 digits"><code>++ted:ab</code></a>
706<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tedab' title="Parse decimal number with <= 3 digits"><code>++ted:ab</code></a>
704<a class="tooltip" href='/docs/hoon/reference/stdlib/4b/#teff' title="UTF8 length"><code>++teff</code></a>
707<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>
706<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>+$term</code></a>
709<a class="tooltip" href='/docs/hoon/reference/stdlib/2q/#term' title="Hoon constant"><code>+$term</code></a>
707<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
710<a class="tooltip" href='/docs/hoon/reference/stdlib/2n/#test' title="Test for equality"><code>++test</code></a>
708<a class="tooltip" href='/docs/hoon/reference/stdlib/4j/#tidab' title="Parse 3 decimal digits"><code>++tid:ab</code></a>
711<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).
721<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirs' title="Round singleprecision float to nearest signed integer"><code>++toi:rs</code></a>
724<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirs' title="Round singleprecision float to nearest signed integer"><code>++toi:rs</code></a>
722<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirq' title="Round quadprecision float to nearest signed integer"><code>++toi:rq</code></a>
725<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#toirq' title="Round quadprecision float to nearest signed integer"><code>++toi:rq</code></a>
723<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tojfl' title="Round unsigned and signed integer to float"><code>++toj:fl</code></a>
726<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>
727+<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>
728+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>+$toon</code></a>
726<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#topto' title="Produce head of queue"><code>++top:to</code></a>
729<a class="tooltip" href='/docs/hoon/reference/stdlib/2k/#topto' title="Produce head of queue"><code>++top:to</code></a>
727<a class="tooltip" href='/docs/hoon/reference/stdlib/4a/#tospo' title="Fetch prefix"><code>++tos:po</code></a>
730<a class="tooltip" href='/docs/hoon/reference/stdlib/4a/#tospo' title="Fetch prefix"><code>++tos:po</code></a>
728<a class="tooltip" href='/docs/hoon/reference/stdlib/3b/#tosrh' title="Convert halfprecision float to singleprecision float"><code>++tos:rh</code></a>
731<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).
1372### 3f: scrambling
1375### 3f: scrambling
1373
1376
1374<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ob' title="Reversible scrambling v2"><code>++ob</code></a>
1377<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>
1378+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#feinob' title="Conceal structure v3"><code>++fein:ob</code></a>
1376−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fendob' title="Restore structure v2"><code>++fend:ob</code></a>
1379+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fyndob' title="Restore structure v3"><code>++fynd:ob</code></a>
1377−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ficeob' title="Feistellike cipher"><code>++fice: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>
1378<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#rakuob' title="Key list"><code>++raku:ob</code></a>
1381<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>
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>
1380−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#ryndob' title="Reverse Feistellike cipher"><code>++rynd: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>
1381−<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#teilob' title="Reverse Feistellike cipher"><code>++teil:ob</code></a>
1386+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#fenob' title="Reverse +fe"><code>++fen:ob</code></a>
1382−
1387+<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#effob' title="murmur3-based pseudorandom function"><code>++eff:ob</code></a>
1383<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#un' title="Reversible scrambling"><code>++un</code></a>
1388<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#un' title="Reversible scrambling"><code>++un</code></a>
1384<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#wredun' title="Restore structure"><code>++wred:un</code></a>
1389<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#wredun' title="Restore structure"><code>++wred:un</code></a>
1385<a class="tooltip" href='/docs/hoon/reference/stdlib/3f/#wrenun' title="Conceal structure"><code>++wren:un</code></a>
1390<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).
1392
1397
1393### 3g: molds and mold builders
1398### 3g: molds and mold builders
1394
1399
1395−<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#coin' title="Nounliteral syntax cases"><code>++coin</code></a>
1400+<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>
1401+<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>
1402+<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>
1403+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#hair' title="Parsing line and column"><code>+$hair</code></a>
1399<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#like' title="Generic edge"><code>++like</code></a>
1404<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>
1405+<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>
1406+<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>
1407+<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>
1408+<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>
1409+<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>
1410+<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#toon' title="Nock result (stack trace)"><code>+$toon</code></a>
1406<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#wonk' title="Product from edge"><code>++wonk</code></a>
1411<a class="tooltip" href='/docs/hoon/reference/stdlib/3g/#wonk' title="Product from edge"><code>++wonk</code></a>
1407
1412
1408### 4a: exotic bases
1413### 4a: exotic bases
@@ -1716,7 +1721,7 @@ Can be navigated [alphabetically](#alphabetical) or [by section](#by-section).
1716<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#span' title="ASCII atom"><code>++span</code></a>
1721<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#span' title="ASCII atom"><code>++span</code></a>
1717<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tiki' title="(Undocumented)"><code>++tiki</code></a>
1722<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tiki' title="(Undocumented)"><code>++tiki</code></a>
1718<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#toga' title="Tree of faces"><code>++toga</code></a>
1723<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>
1720<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tuna' title="XML template tree"><code>++tuna</code></a>
1725<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tuna' title="XML template tree"><code>++tuna</code></a>
1721<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tusk' title="List of expressions"><code>++tusk</code></a>
1726<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tusk' title="List of expressions"><code>++tusk</code></a>
1722<a class="tooltip" href='/docs/hoon/reference/stdlib/4o/#tyke' title="List of 'maybe' hoons"><code>++tyke</code></a>
1727<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 = [
2431 slug: "https://urbit.org/docs/reference/library/3g/#edge",
2431 slug: "https://urbit.org/docs/reference/library/3g/#edge",
2432 desc: "Used in the Hoon standard library.",
2432 desc: "Used in the Hoon standard library.",
2433 },
2433 },
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+ },
2434 {
2441 {
2435 name: "Extended Euclidean algorithm",
2442 name: "Extended Euclidean algorithm",
2436 symbol: "egcd",
2443 symbol: "egcd",
@@ -2600,24 +2607,52 @@ export const glossary = [
2600 desc: "Used in the Hoon standard library.",
2607 desc: "Used in the Hoon standard library.",
2601 },
2608 },
2602 {
2609 {
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",
2604 symbol: "feen:ob",
2625 symbol: "feen:ob",
2605 usage: "stdlib",
2626 usage: "stdlib",
2606 slug: "https://urbit.org/docs/reference/library/3f/#feenob",
2627 slug: "https://urbit.org/docs/reference/library/3f/#feenob",
2607 desc: "Used in the Hoon standard library.",
2628 desc: "Used in the Hoon standard library.",
2608 },
2629 },
2609 {
2630 {
2610− name: "Restore structure v2",
2631+ name: "Conceal structure v3",
2611− symbol: "fend:ob",
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",
2612 usage: "stdlib",
2640 usage: "stdlib",
2613− slug: "https://urbit.org/docs/reference/library/3f/#fendob",
2641+ slug: "https://urbit.org/docs/reference/library/3f/#fenob",
2614 desc: "Used in the Hoon standard library.",
2642 desc: "Used in the Hoon standard library.",
2615 },
2643 },
2616 {
2644 {
2617− name: "Feistel-like cipher",
2645+ name: "Restore structure v3",
2618− symbol: "fice:ob",
2646+ symbol: "fynd:ob",
2619 usage: "stdlib",
2647 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",
2621 desc: "Used in the Hoon standard library.",
2656 desc: "Used in the Hoon standard library.",
2622 },
2657 },
2623 {
2658 {
@@ -4713,13 +4748,6 @@ export const glossary = [
4713 slug: "https://urbit.org/docs/reference/library/2h/#runin",
4748 slug: "https://urbit.org/docs/reference/library/2h/#runin",
4714 desc: "Used in the Hoon standard library.",
4749 desc: "Used in the Hoon standard library.",
4715 },
4750 },
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− },
4723 {
4751 {
4724 name: "Prepend n times",
4752 name: "Prepend n times",
4725 symbol: "runt",
4753 symbol: "runt",
@@ -4769,13 +4797,6 @@ export const glossary = [
4769 slug: "https://urbit.org/docs/reference/library/4b/#ruxat",
4797 slug: "https://urbit.org/docs/reference/library/4b/#ruxat",
4770 desc: "Used in the Hoon standard library.",
4798 desc: "Used in the Hoon standard library.",
4771 },
4799 },
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− },
4779 {
4800 {
4780 name: "Identity (produces same value)",
4801 name: "Identity (produces same value)",
4781 symbol: "same",
4802 symbol: "same",
@@ -5813,10 +5834,10 @@ export const glossary = [
5813 desc: "Used in the Hoon standard library.",
5834 desc: "Used in the Hoon standard library.",
5814 },
5835 },
5815 {
5836 {
5816− name: "Reverse Feistel-like cipher",
5837+ name: "Reverse +feis",
5817− symbol: "teil:ob",
5838+ symbol: "tail:ob",
5818 usage: "stdlib",
5839 usage: "stdlib",
5819− slug: "https://urbit.org/docs/reference/library/3f/#teilob",
5840+ slug: "https://urbit.org/docs/reference/library/3f/#tailob",
5820 desc: "Used in the Hoon standard library.",
5841 desc: "Used in the Hoon standard library.",
5821 },
5842 },
5822 {
5843 {