@grain/stdlib 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/array.md +491 -491
- package/bigint.md +198 -198
- package/buffer.gr +66 -1
- package/buffer.md +395 -272
- package/bytes.gr +1 -0
- package/bytes.md +200 -199
- package/char.md +125 -125
- package/exception.md +9 -9
- package/float32.md +195 -195
- package/float64.md +195 -195
- package/fs.md +115 -115
- package/hash.md +16 -16
- package/int16.md +155 -155
- package/int32.gr +1 -1
- package/int32.md +207 -207
- package/int64.gr +1 -1
- package/int64.md +207 -207
- package/int8.md +155 -155
- package/json.md +59 -59
- package/list.md +347 -347
- package/map.md +222 -222
- package/marshal.md +12 -12
- package/number.gr +119 -5
- package/number.md +503 -261
- package/option.md +141 -141
- package/package.json +1 -1
- package/path.md +90 -90
- package/pervasives.md +238 -238
- package/priorityqueue.md +112 -112
- package/queue.md +117 -117
- package/random.md +37 -37
- package/range.md +36 -36
- package/rational.md +107 -107
- package/regex.md +91 -91
- package/result.md +102 -102
- package/runtime/atof/decimal.md +6 -6
- package/runtime/compare.md +7 -7
- package/runtime/dataStructures.md +178 -178
- package/runtime/equal.md +7 -7
- package/runtime/exception.md +15 -15
- package/runtime/malloc.md +9 -9
- package/runtime/numbers.md +269 -269
- package/runtime/string.md +17 -17
- package/runtime/unsafe/conv.md +6 -6
- package/runtime/unsafe/memory.md +10 -10
- package/runtime/utf8.md +31 -31
- package/runtime/wasi.md +9 -9
- package/set.md +211 -211
- package/stack.md +122 -122
- package/string.md +228 -228
- package/uint16.md +148 -148
- package/uint32.md +192 -192
- package/uint64.md +192 -192
- package/uint8.md +148 -148
- package/uri.md +77 -77
- package/wasi/file.md +269 -269
- package/wasi/process.md +21 -21
- package/wasi/random.md +9 -9
- package/wasi/time.md +12 -12
package/float64.md
CHANGED
|
@@ -115,15 +115,15 @@ Converts a Number to a Float64.
|
|
|
115
115
|
|
|
116
116
|
Parameters:
|
|
117
117
|
|
|
118
|
-
|param|type|description|
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
| param | type | description |
|
|
119
|
+
| -------- | -------- | -------------------- |
|
|
120
|
+
| `number` | `Number` | The value to convert |
|
|
121
121
|
|
|
122
122
|
Returns:
|
|
123
123
|
|
|
124
|
-
|type|description|
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
| type | description |
|
|
125
|
+
| --------- | ----------------------------------- |
|
|
126
|
+
| `Float64` | The Number represented as a Float64 |
|
|
127
127
|
|
|
128
128
|
### Float64.**toNumber**
|
|
129
129
|
|
|
@@ -140,15 +140,15 @@ Converts a Float64 to a Number.
|
|
|
140
140
|
|
|
141
141
|
Parameters:
|
|
142
142
|
|
|
143
|
-
|param|type|description|
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
| param | type | description |
|
|
144
|
+
| ------- | --------- | -------------------- |
|
|
145
|
+
| `float` | `Float64` | The value to convert |
|
|
146
146
|
|
|
147
147
|
Returns:
|
|
148
148
|
|
|
149
|
-
|type|description|
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
| type | description |
|
|
150
|
+
| -------- | ----------------------------------- |
|
|
151
|
+
| `Number` | The Float64 represented as a Number |
|
|
152
152
|
|
|
153
153
|
### Float64.**reinterpretInt64**
|
|
154
154
|
|
|
@@ -165,15 +165,15 @@ Interprets an Int64 as a Float64.
|
|
|
165
165
|
|
|
166
166
|
Parameters:
|
|
167
167
|
|
|
168
|
-
|param|type|description|
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
| param | type | description |
|
|
169
|
+
| ------- | ------- | -------------------- |
|
|
170
|
+
| `value` | `Int64` | The value to convert |
|
|
171
171
|
|
|
172
172
|
Returns:
|
|
173
173
|
|
|
174
|
-
|type|description|
|
|
175
|
-
|
|
176
|
-
|
|
174
|
+
| type | description |
|
|
175
|
+
| --------- | ----------------------------------- |
|
|
176
|
+
| `Float64` | The Int64 interpreted as an Float64 |
|
|
177
177
|
|
|
178
178
|
Examples:
|
|
179
179
|
|
|
@@ -200,15 +200,15 @@ Interprets an Uint64 as a Float64.
|
|
|
200
200
|
|
|
201
201
|
Parameters:
|
|
202
202
|
|
|
203
|
-
|param|type|description|
|
|
204
|
-
|
|
205
|
-
|
|
203
|
+
| param | type | description |
|
|
204
|
+
| ------- | -------- | -------------------- |
|
|
205
|
+
| `value` | `Uint64` | The value to convert |
|
|
206
206
|
|
|
207
207
|
Returns:
|
|
208
208
|
|
|
209
|
-
|type|description|
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
| type | description |
|
|
210
|
+
| --------- | ------------------------------------ |
|
|
211
|
+
| `Float64` | The Uint64 interpreted as an Float64 |
|
|
212
212
|
|
|
213
213
|
Examples:
|
|
214
214
|
|
|
@@ -242,16 +242,16 @@ Computes the sum of its operands.
|
|
|
242
242
|
|
|
243
243
|
Parameters:
|
|
244
244
|
|
|
245
|
-
|param|type|description|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
245
|
+
| param | type | description |
|
|
246
|
+
| ----- | --------- | ------------------ |
|
|
247
|
+
| `x` | `Float64` | The first operand |
|
|
248
|
+
| `y` | `Float64` | The second operand |
|
|
249
249
|
|
|
250
250
|
Returns:
|
|
251
251
|
|
|
252
|
-
|type|description|
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
| type | description |
|
|
253
|
+
| --------- | --------------------------- |
|
|
254
|
+
| `Float64` | The sum of the two operands |
|
|
255
255
|
|
|
256
256
|
Examples:
|
|
257
257
|
|
|
@@ -282,16 +282,16 @@ Computes the difference of its operands.
|
|
|
282
282
|
|
|
283
283
|
Parameters:
|
|
284
284
|
|
|
285
|
-
|param|type|description|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
285
|
+
| param | type | description |
|
|
286
|
+
| ----- | --------- | ------------------ |
|
|
287
|
+
| `x` | `Float64` | The first operand |
|
|
288
|
+
| `y` | `Float64` | The second operand |
|
|
289
289
|
|
|
290
290
|
Returns:
|
|
291
291
|
|
|
292
|
-
|type|description|
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
| type | description |
|
|
293
|
+
| --------- | ---------------------------------- |
|
|
294
|
+
| `Float64` | The difference of the two operands |
|
|
295
295
|
|
|
296
296
|
Examples:
|
|
297
297
|
|
|
@@ -322,16 +322,16 @@ Computes the product of its operands.
|
|
|
322
322
|
|
|
323
323
|
Parameters:
|
|
324
324
|
|
|
325
|
-
|param|type|description|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
| param | type | description |
|
|
326
|
+
| ----- | --------- | ------------------ |
|
|
327
|
+
| `x` | `Float64` | The first operand |
|
|
328
|
+
| `y` | `Float64` | The second operand |
|
|
329
329
|
|
|
330
330
|
Returns:
|
|
331
331
|
|
|
332
|
-
|type|description|
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
| type | description |
|
|
333
|
+
| --------- | ------------------------------- |
|
|
334
|
+
| `Float64` | The product of the two operands |
|
|
335
335
|
|
|
336
336
|
Examples:
|
|
337
337
|
|
|
@@ -362,16 +362,16 @@ Computes the quotient of its operands.
|
|
|
362
362
|
|
|
363
363
|
Parameters:
|
|
364
364
|
|
|
365
|
-
|param|type|description|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
365
|
+
| param | type | description |
|
|
366
|
+
| ----- | --------- | ------------------ |
|
|
367
|
+
| `x` | `Float64` | The first operand |
|
|
368
|
+
| `y` | `Float64` | The second operand |
|
|
369
369
|
|
|
370
370
|
Returns:
|
|
371
371
|
|
|
372
|
-
|type|description|
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
| type | description |
|
|
373
|
+
| --------- | -------------------------------- |
|
|
374
|
+
| `Float64` | The quotient of the two operands |
|
|
375
375
|
|
|
376
376
|
Examples:
|
|
377
377
|
|
|
@@ -395,16 +395,16 @@ Computes the exponentiation of the given base and power.
|
|
|
395
395
|
|
|
396
396
|
Parameters:
|
|
397
397
|
|
|
398
|
-
|param|type|description|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
398
|
+
| param | type | description |
|
|
399
|
+
| ------- | --------- | ------------------ |
|
|
400
|
+
| `base` | `Float64` | The base float |
|
|
401
|
+
| `power` | `Float64` | The exponent float |
|
|
402
402
|
|
|
403
403
|
Returns:
|
|
404
404
|
|
|
405
|
-
|type|description|
|
|
406
|
-
|
|
407
|
-
|
|
405
|
+
| type | description |
|
|
406
|
+
| --------- | ---------------------------------- |
|
|
407
|
+
| `Float64` | The base raised to the given power |
|
|
408
408
|
|
|
409
409
|
Examples:
|
|
410
410
|
|
|
@@ -435,16 +435,16 @@ Checks if the first value is less than the second value.
|
|
|
435
435
|
|
|
436
436
|
Parameters:
|
|
437
437
|
|
|
438
|
-
|param|type|description|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
438
|
+
| param | type | description |
|
|
439
|
+
| ----- | --------- | ---------------- |
|
|
440
|
+
| `x` | `Float64` | The first value |
|
|
441
|
+
| `y` | `Float64` | The second value |
|
|
442
442
|
|
|
443
443
|
Returns:
|
|
444
444
|
|
|
445
|
-
|type|description|
|
|
446
|
-
|
|
447
|
-
|
|
445
|
+
| type | description |
|
|
446
|
+
| ------ | ---------------------------------------------------------------------------- |
|
|
447
|
+
| `Bool` | `true` if the first value is less than the second value or `false` otherwise |
|
|
448
448
|
|
|
449
449
|
Examples:
|
|
450
450
|
|
|
@@ -475,16 +475,16 @@ Checks if the first value is greater than the second value.
|
|
|
475
475
|
|
|
476
476
|
Parameters:
|
|
477
477
|
|
|
478
|
-
|param|type|description|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
| param | type | description |
|
|
479
|
+
| ----- | --------- | ---------------- |
|
|
480
|
+
| `x` | `Float64` | The first value |
|
|
481
|
+
| `y` | `Float64` | The second value |
|
|
482
482
|
|
|
483
483
|
Returns:
|
|
484
484
|
|
|
485
|
-
|type|description|
|
|
486
|
-
|
|
487
|
-
|
|
485
|
+
| type | description |
|
|
486
|
+
| ------ | ------------------------------------------------------------------------------- |
|
|
487
|
+
| `Bool` | `true` if the first value is greater than the second value or `false` otherwise |
|
|
488
488
|
|
|
489
489
|
Examples:
|
|
490
490
|
|
|
@@ -515,16 +515,16 @@ Checks if the first value is less than or equal to the second value.
|
|
|
515
515
|
|
|
516
516
|
Parameters:
|
|
517
517
|
|
|
518
|
-
|param|type|description|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
518
|
+
| param | type | description |
|
|
519
|
+
| ----- | --------- | ---------------- |
|
|
520
|
+
| `x` | `Float64` | The first value |
|
|
521
|
+
| `y` | `Float64` | The second value |
|
|
522
522
|
|
|
523
523
|
Returns:
|
|
524
524
|
|
|
525
|
-
|type|description|
|
|
526
|
-
|
|
527
|
-
|
|
525
|
+
| type | description |
|
|
526
|
+
| ------ | ---------------------------------------------------------------------------------------- |
|
|
527
|
+
| `Bool` | `true` if the first value is less than or equal to the second value or `false` otherwise |
|
|
528
528
|
|
|
529
529
|
Examples:
|
|
530
530
|
|
|
@@ -560,16 +560,16 @@ Checks if the first value is greater than or equal to the second value.
|
|
|
560
560
|
|
|
561
561
|
Parameters:
|
|
562
562
|
|
|
563
|
-
|param|type|description|
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
563
|
+
| param | type | description |
|
|
564
|
+
| ----- | --------- | ---------------- |
|
|
565
|
+
| `x` | `Float64` | The first value |
|
|
566
|
+
| `y` | `Float64` | The second value |
|
|
567
567
|
|
|
568
568
|
Returns:
|
|
569
569
|
|
|
570
|
-
|type|description|
|
|
571
|
-
|
|
572
|
-
|
|
570
|
+
| type | description |
|
|
571
|
+
| ------ | ------------------------------------------------------------------------------------------- |
|
|
572
|
+
| `Bool` | `true` if the first value is greater than or equal to the second value or `false` otherwise |
|
|
573
573
|
|
|
574
574
|
Examples:
|
|
575
575
|
|
|
@@ -599,15 +599,15 @@ All values are finite exept for NaN, infinity or negative infinity.
|
|
|
599
599
|
|
|
600
600
|
Parameters:
|
|
601
601
|
|
|
602
|
-
|param|type|description|
|
|
603
|
-
|
|
604
|
-
|
|
602
|
+
| param | type | description |
|
|
603
|
+
| ----- | --------- | ------------------- |
|
|
604
|
+
| `x` | `Float64` | The number to check |
|
|
605
605
|
|
|
606
606
|
Returns:
|
|
607
607
|
|
|
608
|
-
|type|description|
|
|
609
|
-
|
|
610
|
-
|
|
608
|
+
| type | description |
|
|
609
|
+
| ------ | -------------------------------------------------- |
|
|
610
|
+
| `Bool` | `true` if the value is finite or `false` otherwise |
|
|
611
611
|
|
|
612
612
|
Examples:
|
|
613
613
|
|
|
@@ -646,15 +646,15 @@ Checks if the value is a float NaN value (Not A Number).
|
|
|
646
646
|
|
|
647
647
|
Parameters:
|
|
648
648
|
|
|
649
|
-
|param|type|description|
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
| param | type | description |
|
|
650
|
+
| ----- | --------- | ------------------ |
|
|
651
|
+
| `x` | `Float64` | The value to check |
|
|
652
652
|
|
|
653
653
|
Returns:
|
|
654
654
|
|
|
655
|
-
|type|description|
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
| type | description |
|
|
656
|
+
| ------ | --------------------------------------------- |
|
|
657
|
+
| `Bool` | `true` if the value is NaN, otherwise `false` |
|
|
658
658
|
|
|
659
659
|
Examples:
|
|
660
660
|
|
|
@@ -693,15 +693,15 @@ Checks if a float is infinite, that is either of positive or negative infinity.
|
|
|
693
693
|
|
|
694
694
|
Parameters:
|
|
695
695
|
|
|
696
|
-
|param|type|description|
|
|
697
|
-
|
|
698
|
-
|
|
696
|
+
| param | type | description |
|
|
697
|
+
| ----- | --------- | ------------------ |
|
|
698
|
+
| `x` | `Float64` | The value to check |
|
|
699
699
|
|
|
700
700
|
Returns:
|
|
701
701
|
|
|
702
|
-
|type|description|
|
|
703
|
-
|
|
704
|
-
|
|
702
|
+
| type | description |
|
|
703
|
+
| ------ | ---------------------------------------------------- |
|
|
704
|
+
| `Bool` | `true` if the value is infinite or `false` otherwise |
|
|
705
705
|
|
|
706
706
|
Examples:
|
|
707
707
|
|
|
@@ -740,16 +740,16 @@ Returns the smaller of its operands.
|
|
|
740
740
|
|
|
741
741
|
Parameters:
|
|
742
742
|
|
|
743
|
-
|param|type|description|
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
743
|
+
| param | type | description |
|
|
744
|
+
| ----- | --------- | ------------------ |
|
|
745
|
+
| `x` | `Float64` | The first operand |
|
|
746
|
+
| `y` | `Float64` | The second operand |
|
|
747
747
|
|
|
748
748
|
Returns:
|
|
749
749
|
|
|
750
|
-
|type|description|
|
|
751
|
-
|
|
752
|
-
|
|
750
|
+
| type | description |
|
|
751
|
+
| --------- | ------------------------------- |
|
|
752
|
+
| `Float64` | The smaller of the two operands |
|
|
753
753
|
|
|
754
754
|
Examples:
|
|
755
755
|
|
|
@@ -772,16 +772,16 @@ Returns the larger of its operands.
|
|
|
772
772
|
|
|
773
773
|
Parameters:
|
|
774
774
|
|
|
775
|
-
|param|type|description|
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
775
|
+
| param | type | description |
|
|
776
|
+
| ----- | --------- | ------------------ |
|
|
777
|
+
| `x` | `Float64` | The first operand |
|
|
778
|
+
| `y` | `Float64` | The second operand |
|
|
779
779
|
|
|
780
780
|
Returns:
|
|
781
781
|
|
|
782
|
-
|type|description|
|
|
783
|
-
|
|
784
|
-
|
|
782
|
+
| type | description |
|
|
783
|
+
| --------- | ------------------------------ |
|
|
784
|
+
| `Float64` | The larger of the two operands |
|
|
785
785
|
|
|
786
786
|
Examples:
|
|
787
787
|
|
|
@@ -804,15 +804,15 @@ Returns the absolute value. That is, it returns `x` if `x` is positive or zero a
|
|
|
804
804
|
|
|
805
805
|
Parameters:
|
|
806
806
|
|
|
807
|
-
|param|type|description|
|
|
808
|
-
|
|
809
|
-
|
|
807
|
+
| param | type | description |
|
|
808
|
+
| ----- | --------- | ----------- |
|
|
809
|
+
| `x` | `Float64` | The operand |
|
|
810
810
|
|
|
811
811
|
Returns:
|
|
812
812
|
|
|
813
|
-
|type|description|
|
|
814
|
-
|
|
815
|
-
|
|
813
|
+
| type | description |
|
|
814
|
+
| --------- | --------------------------------- |
|
|
815
|
+
| `Float64` | The absolute value of the operand |
|
|
816
816
|
|
|
817
817
|
Examples:
|
|
818
818
|
|
|
@@ -839,15 +839,15 @@ Returns the negation of its operand.
|
|
|
839
839
|
|
|
840
840
|
Parameters:
|
|
841
841
|
|
|
842
|
-
|param|type|description|
|
|
843
|
-
|
|
844
|
-
|
|
842
|
+
| param | type | description |
|
|
843
|
+
| ----- | --------- | ----------- |
|
|
844
|
+
| `x` | `Float64` | The operand |
|
|
845
845
|
|
|
846
846
|
Returns:
|
|
847
847
|
|
|
848
|
-
|type|description|
|
|
849
|
-
|
|
850
|
-
|
|
848
|
+
| type | description |
|
|
849
|
+
| --------- | ------------------- |
|
|
850
|
+
| `Float64` | The negated operand |
|
|
851
851
|
|
|
852
852
|
Examples:
|
|
853
853
|
|
|
@@ -874,15 +874,15 @@ Rounds its operand up to the next largest whole value.
|
|
|
874
874
|
|
|
875
875
|
Parameters:
|
|
876
876
|
|
|
877
|
-
|param|type|description|
|
|
878
|
-
|
|
879
|
-
|
|
877
|
+
| param | type | description |
|
|
878
|
+
| ----- | --------- | ------------------- |
|
|
879
|
+
| `x` | `Float64` | The operand to ceil |
|
|
880
880
|
|
|
881
881
|
Returns:
|
|
882
882
|
|
|
883
|
-
|type|description|
|
|
884
|
-
|
|
885
|
-
|
|
883
|
+
| type | description |
|
|
884
|
+
| --------- | ------------------------------------------- |
|
|
885
|
+
| `Float64` | The next largest whole value of the operand |
|
|
886
886
|
|
|
887
887
|
Examples:
|
|
888
888
|
|
|
@@ -909,15 +909,15 @@ Rounds its operand down to the largest whole value less than the operand.
|
|
|
909
909
|
|
|
910
910
|
Parameters:
|
|
911
911
|
|
|
912
|
-
|param|type|description|
|
|
913
|
-
|
|
914
|
-
|
|
912
|
+
| param | type | description |
|
|
913
|
+
| ----- | --------- | -------------------- |
|
|
914
|
+
| `x` | `Float64` | The operand to floor |
|
|
915
915
|
|
|
916
916
|
Returns:
|
|
917
917
|
|
|
918
|
-
|type|description|
|
|
919
|
-
|
|
920
|
-
|
|
918
|
+
| type | description |
|
|
919
|
+
| --------- | --------------------------------------- |
|
|
920
|
+
| `Float64` | The previous whole value of the operand |
|
|
921
921
|
|
|
922
922
|
Examples:
|
|
923
923
|
|
|
@@ -944,15 +944,15 @@ Returns the whole value part of its operand, removing any fractional value.
|
|
|
944
944
|
|
|
945
945
|
Parameters:
|
|
946
946
|
|
|
947
|
-
|param|type|description|
|
|
948
|
-
|
|
949
|
-
|
|
947
|
+
| param | type | description |
|
|
948
|
+
| ----- | --------- | ----------------------- |
|
|
949
|
+
| `x` | `Float64` | The operand to truncate |
|
|
950
950
|
|
|
951
951
|
Returns:
|
|
952
952
|
|
|
953
|
-
|type|description|
|
|
954
|
-
|
|
955
|
-
|
|
953
|
+
| type | description |
|
|
954
|
+
| --------- | ----------------------------------- |
|
|
955
|
+
| `Float64` | The whole value part of the operand |
|
|
956
956
|
|
|
957
957
|
Examples:
|
|
958
958
|
|
|
@@ -975,15 +975,15 @@ Returns its operand rounded to its nearest integer.
|
|
|
975
975
|
|
|
976
976
|
Parameters:
|
|
977
977
|
|
|
978
|
-
|param|type|description|
|
|
979
|
-
|
|
980
|
-
|
|
978
|
+
| param | type | description |
|
|
979
|
+
| ----- | --------- | -------------------- |
|
|
980
|
+
| `x` | `Float64` | The operand to round |
|
|
981
981
|
|
|
982
982
|
Returns:
|
|
983
983
|
|
|
984
|
-
|type|description|
|
|
985
|
-
|
|
986
|
-
|
|
984
|
+
| type | description |
|
|
985
|
+
| --------- | ---------------------------------- |
|
|
986
|
+
| `Float64` | The nearest integer to the operand |
|
|
987
987
|
|
|
988
988
|
Examples:
|
|
989
989
|
|
|
@@ -1018,15 +1018,15 @@ Computes the square root of its operand.
|
|
|
1018
1018
|
|
|
1019
1019
|
Parameters:
|
|
1020
1020
|
|
|
1021
|
-
|param|type|description|
|
|
1022
|
-
|
|
1023
|
-
|
|
1021
|
+
| param | type | description |
|
|
1022
|
+
| ----- | --------- | -------------------------- |
|
|
1023
|
+
| `x` | `Float64` | The operand to square root |
|
|
1024
1024
|
|
|
1025
1025
|
Returns:
|
|
1026
1026
|
|
|
1027
|
-
|type|description|
|
|
1028
|
-
|
|
1029
|
-
|
|
1027
|
+
| type | description |
|
|
1028
|
+
| --------- | ------------------------------ |
|
|
1029
|
+
| `Float64` | The square root of the operand |
|
|
1030
1030
|
|
|
1031
1031
|
Examples:
|
|
1032
1032
|
|
|
@@ -1049,16 +1049,16 @@ Copys the sign of the second operand to the first operand.
|
|
|
1049
1049
|
|
|
1050
1050
|
Parameters:
|
|
1051
1051
|
|
|
1052
|
-
|param|type|description|
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1052
|
+
| param | type | description |
|
|
1053
|
+
| ----- | --------- | --------------------------------- |
|
|
1054
|
+
| `x` | `Float64` | The operand to be modify |
|
|
1055
|
+
| `y` | `Float64` | The operand to copy the sign from |
|
|
1056
1056
|
|
|
1057
1057
|
Returns:
|
|
1058
1058
|
|
|
1059
|
-
|type|description|
|
|
1060
|
-
|
|
1061
|
-
|
|
1059
|
+
| type | description |
|
|
1060
|
+
| --------- | ----------------------------------------------------- |
|
|
1061
|
+
| `Float64` | The first operand with the sign of the second operand |
|
|
1062
1062
|
|
|
1063
1063
|
Examples:
|
|
1064
1064
|
|
|
@@ -1091,18 +1091,18 @@ Determines whether two values are considered close to each other using a relativ
|
|
|
1091
1091
|
|
|
1092
1092
|
Parameters:
|
|
1093
1093
|
|
|
1094
|
-
|param|type|description|
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1094
|
+
| param | type | description |
|
|
1095
|
+
| -------------------- | --------- | ----------------------------------------------------------------------------- |
|
|
1096
|
+
| `a` | `Float64` | The first value |
|
|
1097
|
+
| `b` | `Float64` | The second value |
|
|
1098
|
+
| `?relativeTolerance` | `Float64` | The maximum tolerance to use relative to the larger absolute value `a` or `b` |
|
|
1099
|
+
| `?absoluteTolerance` | `Float64` | The absolute tolerance to use, regardless of the values of `a` or `b` |
|
|
1100
1100
|
|
|
1101
1101
|
Returns:
|
|
1102
1102
|
|
|
1103
|
-
|type|description|
|
|
1104
|
-
|
|
1105
|
-
|
|
1103
|
+
| type | description |
|
|
1104
|
+
| ------ | ---------------------------------------------------------------------------- |
|
|
1105
|
+
| `Bool` | `true` if the values are considered close to each other or `false` otherwise |
|
|
1106
1106
|
|
|
1107
1107
|
Examples:
|
|
1108
1108
|
|
|
@@ -1153,15 +1153,15 @@ Computes the sine of a float (in radians).
|
|
|
1153
1153
|
|
|
1154
1154
|
Parameters:
|
|
1155
1155
|
|
|
1156
|
-
|param|type|description|
|
|
1157
|
-
|
|
1158
|
-
|
|
1156
|
+
| param | type | description |
|
|
1157
|
+
| --------- | --------- | -------------------- |
|
|
1158
|
+
| `radians` | `Float64` | The input in radians |
|
|
1159
1159
|
|
|
1160
1160
|
Returns:
|
|
1161
1161
|
|
|
1162
|
-
|type|description|
|
|
1163
|
-
|
|
1164
|
-
|
|
1162
|
+
| type | description |
|
|
1163
|
+
| --------- | ----------------- |
|
|
1164
|
+
| `Float64` | The computed sine |
|
|
1165
1165
|
|
|
1166
1166
|
Examples:
|
|
1167
1167
|
|
|
@@ -1184,15 +1184,15 @@ Computes the cosine of a float (in radians).
|
|
|
1184
1184
|
|
|
1185
1185
|
Parameters:
|
|
1186
1186
|
|
|
1187
|
-
|param|type|description|
|
|
1188
|
-
|
|
1189
|
-
|
|
1187
|
+
| param | type | description |
|
|
1188
|
+
| --------- | --------- | -------------------- |
|
|
1189
|
+
| `radians` | `Float64` | The input in radians |
|
|
1190
1190
|
|
|
1191
1191
|
Returns:
|
|
1192
1192
|
|
|
1193
|
-
|type|description|
|
|
1194
|
-
|
|
1195
|
-
|
|
1193
|
+
| type | description |
|
|
1194
|
+
| --------- | ------------------- |
|
|
1195
|
+
| `Float64` | The computed cosine |
|
|
1196
1196
|
|
|
1197
1197
|
Examples:
|
|
1198
1198
|
|
|
@@ -1215,15 +1215,15 @@ Computes the tangent of a number (in radians).
|
|
|
1215
1215
|
|
|
1216
1216
|
Parameters:
|
|
1217
1217
|
|
|
1218
|
-
|param|type|description|
|
|
1219
|
-
|
|
1220
|
-
|
|
1218
|
+
| param | type | description |
|
|
1219
|
+
| --------- | --------- | -------------------- |
|
|
1220
|
+
| `radians` | `Float64` | The input in radians |
|
|
1221
1221
|
|
|
1222
1222
|
Returns:
|
|
1223
1223
|
|
|
1224
|
-
|type|description|
|
|
1225
|
-
|
|
1226
|
-
|
|
1224
|
+
| type | description |
|
|
1225
|
+
| --------- | -------------------- |
|
|
1226
|
+
| `Float64` | The computed tangent |
|
|
1227
1227
|
|
|
1228
1228
|
Examples:
|
|
1229
1229
|
|