Skip to content

Commit ef55efa

Browse files
authored
Merge pull request #17 from cmontella/document-log-function
Document ln and pow functions
2 parents aeb95d2 + 74e958b commit ef55efa

File tree

1 file changed

+78
-22
lines changed

1 file changed

+78
-22
lines changed

v0.3/handbook/libraries/stdlib.md

Lines changed: 78 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: "Standard Library"
1111
<table class="libitem">
1212
<tr>
1313
<td colspan="2">
14-
<b>gather/sort</b> - Generates an ordering for a set
14+
<b>gather/sort</b> - generates an ordering for a set
1515
</td>
1616
</tr>
1717

@@ -55,7 +55,7 @@ commit
5555
<table class="libitem">
5656
<tr>
5757
<td colspan="2">
58-
<b>gather/count</b> - Returns the number of elements in a set
58+
<b>gather/count</b> - returns the number of elements in a set
5959
</td>
6060
</tr>
6161
<tr>
@@ -92,7 +92,7 @@ commit
9292
<table class="libitem">
9393
<tr>
9494
<td colspan="2">
95-
<b>gather/sum</b> - Returns the sum of values in a set of attributes
95+
<b>gather/sum</b> - returns the sum of values in a set of attributes
9696
</td>
9797
</tr>
9898

@@ -133,7 +133,7 @@ commit
133133
<table class="libitem">
134134
<tr>
135135
<td colspan="2">
136-
<b>math/floor</b> - Rounds a number down
136+
<b>math/floor</b> - rounds a number down
137137
</td>
138138
</tr>
139139

@@ -161,7 +161,7 @@ bind
161161
<table class="libitem">
162162
<tr>
163163
<td colspan="2">
164-
<b>math/ceiling</b> - Rounds a number up
164+
<b>math/ceiling</b> - rounds a number up
165165
</td>
166166
</tr>
167167

@@ -189,7 +189,7 @@ bind
189189
<table class="libitem">
190190
<tr>
191191
<td colspan="2">
192-
<b>math/round</b> - Rounds a number to the nearest integer
192+
<b>math/round</b> - rounds a number to the nearest integer
193193
</td>
194194
</tr>
195195

@@ -217,7 +217,7 @@ bind
217217
<table class="libitem">
218218
<tr>
219219
<td colspan="2">
220-
<b>math/sin</b> - Sine of an angle
220+
<b>math/sin</b> - sine of an angle
221221
</td>
222222
</tr>
223223

@@ -245,7 +245,7 @@ bind
245245
<table class="libitem">
246246
<tr>
247247
<td colspan="2">
248-
<b>math/cos</b> - Cosine of an angle
248+
<b>math/cos</b> - cosine of an angle
249249
</td>
250250
</tr>
251251

@@ -273,7 +273,7 @@ bind
273273
<table class="libitem">
274274
<tr>
275275
<td colspan="2">
276-
<b>math/tan</b> - Tangent of an angle
276+
<b>math/tan</b> - tangent of an angle
277277
</td>
278278
</tr>
279279

@@ -301,7 +301,7 @@ bind
301301
<table class="libitem">
302302
<tr>
303303
<td colspan="2">
304-
<b>math/max</b> - The greater of two values
304+
<b>math/max</b> - the greater of two values
305305
</td>
306306
</tr>
307307

@@ -332,7 +332,7 @@ bind
332332
<table class="libitem">
333333
<tr>
334334
<td colspan="2">
335-
<b>math/min</b> - The lesser of two values
335+
<b>math/min</b> - the lesser of two values
336336
</td>
337337
</tr>
338338

@@ -363,7 +363,7 @@ bind
363363
<table class="libitem">
364364
<tr>
365365
<td colspan="2">
366-
<b>math/mod</b> - Modulo division
366+
<b>math/mod</b> - modulo division
367367
</td>
368368
</tr>
369369

@@ -392,7 +392,7 @@ bind
392392
<table class="libitem">
393393
<tr>
394394
<td colspan="2">
395-
<b>math/absolute</b> - Absolute value of a number
395+
<b>math/absolute</b> - absolute value of a number
396396
</td>
397397
</tr>
398398

@@ -429,7 +429,63 @@ commit
429429
<table class="libitem">
430430
<tr>
431431
<td colspan="2">
432-
<b>math/to-fixed</b> - Formats a number as a string to a certain number of decimal places
432+
<b>math/pow</b> - raise a value to an exponent
433+
</td>
434+
</tr>
435+
436+
<tr>
437+
<td>
438+
<ul>
439+
<li><strong>value</strong> - the vale to exponentiate</li>
440+
<li><strong>exponent</strong> - the exponent</li>
441+
</ul>
442+
</td>
443+
<td>
444+
<code>
445+
Calculate 2 ^ 3
446+
```
447+
search
448+
x = math/pow[value: 2 exponent: 3]
449+
bind
450+
[#ui/text text: "2 ^ 3 = {{x}}"]
451+
```
452+
</code>
453+
</td>
454+
</tr>
455+
</table>
456+
457+
<table class="libitem">
458+
<tr>
459+
<td colspan="2">
460+
<b>math/ln</b> - calculate the natural log of a value
461+
</td>
462+
</tr>
463+
464+
<tr>
465+
<td>
466+
<ul>
467+
<li><strong>value</strong> - the value to take the natural log of</li>
468+
</ul>
469+
</td>
470+
<td>
471+
<code>
472+
calculate the natural log of 17
473+
```
474+
search
475+
x = math/ln[value: 17]
476+
477+
bind
478+
[#ui/text text: "ln(17) = {{x}}"]
479+
```
480+
</code>
481+
</td>
482+
</tr>
483+
</table>
484+
485+
<table class="libitem">
486+
<tr>
487+
<td colspan="2">
488+
<b>math/to-fixed</b> - formats a number as a string to a certain number of decimal places
433489
</td>
434490
</tr>
435491

@@ -461,7 +517,7 @@ bind
461517
<table class="libitem">
462518
<tr>
463519
<td colspan="2">
464-
<b>math/range</b> - Generates a range of numbers
520+
<b>math/range</b> - generates a range of numbers
465521
</td>
466522
</tr>
467523

@@ -490,7 +546,7 @@ bind
490546
<table class="libitem">
491547
<tr>
492548
<td colspan="2">
493-
<b>random/number</b> - Generates a random number between 1 and 0
549+
<b>random/number</b> - generates a random number between 1 and 0
494550
</td>
495551
</tr>
496552

@@ -527,7 +583,7 @@ commit
527583
<table class="libitem">
528584
<tr>
529585
<td colspan="2">
530-
<b>string/replace</b> - Replaces a string of text with another
586+
<b>string/replace</b> - replaces a string of text with another
531587
</td>
532588
</tr>
533589

@@ -558,7 +614,7 @@ bind
558614
<table class="libitem">
559615
<tr>
560616
<td colspan="2">
561-
<b>string/get</b> - Gets a character from a specific location in a string
617+
<b>string/get</b> - gets a character from a specific location in a string
562618
</td>
563619
</tr>
564620

@@ -588,7 +644,7 @@ bind
588644
<table class="libitem">
589645
<tr>
590646
<td colspan="2">
591-
<b>string/uppercase</b> - Converts a string to uppercase
647+
<b>string/uppercase</b> - converts a string to uppercase
592648
</td>
593649
</tr>
594650

@@ -616,7 +672,7 @@ bind
616672
<table class="libitem">
617673
<tr>
618674
<td colspan="2">
619-
<b>string/lowercase</b> - Converts a string to lowercase
675+
<b>string/lowercase</b> - converts a string to lowercase
620676
</td>
621677
</tr>
622678

@@ -644,7 +700,7 @@ bind
644700
<table class="libitem">
645701
<tr>
646702
<td colspan="2">
647-
<b>string/index-of</b> - Returns the position of the first occurrence of a specified value in a string
703+
<b>string/index-of</b> - returns the position of the first occurrence of a specified value in a string
648704
</td>
649705
</tr>
650706

@@ -673,7 +729,7 @@ bind
673729
<table class="libitem">
674730
<tr>
675731
<td colspan="2">
676-
<b>string/codepoint-length</b> - Returns the length of a string in Unicode code points.
732+
<b>string/codepoint-length</b> - returns the length of a string in Unicode code points.
677733
</td>
678734
</tr>
679735

0 commit comments

Comments
 (0)