@grain/stdlib 0.4.5 → 0.4.6
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 +7 -0
- package/LICENSE +1 -1
- package/float32.gr +120 -4
- package/float32.md +315 -0
- package/float64.gr +120 -4
- package/float64.md +315 -0
- package/int32.gr +370 -75
- package/int32.md +833 -0
- package/int64.gr +370 -75
- package/int64.md +833 -0
- package/package.json +1 -1
- package/runtime/numberUtils.gr +7 -5
- package/string.gr +2 -2
- package/sys/file.gr +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
### [0.4.6](https://www.github.com/grain-lang/grain/compare/stdlib-v0.4.5...stdlib-v0.4.6) (2022-01-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **grainfmt:** Indent function application args when adding parens ([#1095](https://www.github.com/grain-lang/grain/issues/1095)) ([64af7d3](https://www.github.com/grain-lang/grain/commit/64af7d387dca2fddb9b3d190ccdf5790ec3d8e65))
|
|
9
|
+
|
|
3
10
|
### [0.4.5](https://www.github.com/grain-lang/grain/compare/stdlib-v0.4.4...stdlib-v0.4.5) (2021-12-31)
|
|
4
11
|
|
|
5
12
|
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2022 Oscar Spencer <oscar@grain-lang.org> and Philip Blair <philip@grain-lang.org>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/float32.gr
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Float32: Utilities for working with the Float32 type.
|
|
3
|
+
* @example import Float32 from "float32"
|
|
4
|
+
*
|
|
5
|
+
* @since v0.2.0
|
|
6
|
+
*/
|
|
1
7
|
import WasmI32 from "runtime/unsafe/wasmi32"
|
|
2
8
|
import WasmF32 from "runtime/unsafe/wasmf32"
|
|
3
9
|
import Memory from "runtime/unsafe/memory"
|
|
@@ -10,10 +16,43 @@ import {
|
|
|
10
16
|
coerceFloat32ToNumber as toNumber
|
|
11
17
|
} from "runtime/numbers"
|
|
12
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @section Conversions: Functions for converting between Numbers and the Float32 type.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Converts a Number to a Float32.
|
|
25
|
+
*
|
|
26
|
+
* @param number: The value to convert
|
|
27
|
+
* @returns The Number represented as a Float32
|
|
28
|
+
*
|
|
29
|
+
* @since v0.2.0
|
|
30
|
+
*/
|
|
13
31
|
export fromNumber
|
|
14
|
-
export toNumber
|
|
15
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Converts a Float32 to a Number.
|
|
35
|
+
*
|
|
36
|
+
* @param float: The value to convert
|
|
37
|
+
* @returns The Float32 represented as a Number
|
|
38
|
+
*
|
|
39
|
+
* @since v0.2.0
|
|
40
|
+
*/
|
|
41
|
+
export toNumber
|
|
16
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @section Operations: Mathematical operations for Float32 values.
|
|
45
|
+
*/
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Computes the sum of its operands.
|
|
49
|
+
*
|
|
50
|
+
* @param x: The first operand
|
|
51
|
+
* @param y: The second operand
|
|
52
|
+
* @returns The sum of the two operands
|
|
53
|
+
*
|
|
54
|
+
* @since v0.2.0
|
|
55
|
+
*/
|
|
17
56
|
@disableGC
|
|
18
57
|
export let rec add = (x: Float32, y: Float32) => {
|
|
19
58
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -26,6 +65,15 @@ export let rec add = (x: Float32, y: Float32) => {
|
|
|
26
65
|
ret
|
|
27
66
|
}
|
|
28
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Computes the difference of its operands.
|
|
70
|
+
*
|
|
71
|
+
* @param x: The first operand
|
|
72
|
+
* @param y: The second operand
|
|
73
|
+
* @returns The difference of the two operands
|
|
74
|
+
*
|
|
75
|
+
* @since v0.2.0
|
|
76
|
+
*/
|
|
29
77
|
@disableGC
|
|
30
78
|
export let rec sub = (x: Float32, y: Float32) => {
|
|
31
79
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -38,6 +86,15 @@ export let rec sub = (x: Float32, y: Float32) => {
|
|
|
38
86
|
ret
|
|
39
87
|
}
|
|
40
88
|
|
|
89
|
+
/**
|
|
90
|
+
* Computes the product of its operands.
|
|
91
|
+
*
|
|
92
|
+
* @param x: The first operand
|
|
93
|
+
* @param y: The second operand
|
|
94
|
+
* @returns The product of the two operands
|
|
95
|
+
*
|
|
96
|
+
* @since v0.2.0
|
|
97
|
+
*/
|
|
41
98
|
@disableGC
|
|
42
99
|
export let rec mul = (x: Float32, y: Float32) => {
|
|
43
100
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -50,6 +107,15 @@ export let rec mul = (x: Float32, y: Float32) => {
|
|
|
50
107
|
ret
|
|
51
108
|
}
|
|
52
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Computes the quotient of its operands.
|
|
112
|
+
*
|
|
113
|
+
* @param x: The first operand
|
|
114
|
+
* @param y: The second operand
|
|
115
|
+
* @returns The quotient of the two operands
|
|
116
|
+
*
|
|
117
|
+
* @since v0.2.0
|
|
118
|
+
*/
|
|
53
119
|
@disableGC
|
|
54
120
|
export let rec div = (x: Float32, y: Float32) => {
|
|
55
121
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -62,8 +128,19 @@ export let rec div = (x: Float32, y: Float32) => {
|
|
|
62
128
|
ret
|
|
63
129
|
}
|
|
64
130
|
|
|
65
|
-
|
|
66
|
-
|
|
131
|
+
/**
|
|
132
|
+
* @section Comparisons: Functions for comparing Float32 values.
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Checks if the first value is less than the second value.
|
|
137
|
+
*
|
|
138
|
+
* @param x: The first value
|
|
139
|
+
* @param y: The second value
|
|
140
|
+
* @returns `true` if the first value is less than the second value or `false` otherwise
|
|
141
|
+
*
|
|
142
|
+
* @since v0.2.0
|
|
143
|
+
*/
|
|
67
144
|
@disableGC
|
|
68
145
|
export let rec lt = (x: Float32, y: Float32) => {
|
|
69
146
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -75,6 +152,15 @@ export let rec lt = (x: Float32, y: Float32) => {
|
|
|
75
152
|
ret
|
|
76
153
|
}
|
|
77
154
|
|
|
155
|
+
/**
|
|
156
|
+
* Checks if the first value is greater than the second value.
|
|
157
|
+
*
|
|
158
|
+
* @param x: The first value
|
|
159
|
+
* @param y: The second value
|
|
160
|
+
* @returns `true` if the first value is greater than the second value or `false` otherwise
|
|
161
|
+
*
|
|
162
|
+
* @since v0.2.0
|
|
163
|
+
*/
|
|
78
164
|
@disableGC
|
|
79
165
|
export let rec gt = (x: Float32, y: Float32) => {
|
|
80
166
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -86,6 +172,15 @@ export let rec gt = (x: Float32, y: Float32) => {
|
|
|
86
172
|
ret
|
|
87
173
|
}
|
|
88
174
|
|
|
175
|
+
/**
|
|
176
|
+
* Checks if the first value is less than or equal to the second value.
|
|
177
|
+
*
|
|
178
|
+
* @param x: The first value
|
|
179
|
+
* @param y: The second value
|
|
180
|
+
* @returns `true` if the first value is less than or equal to the second value or `false` otherwise
|
|
181
|
+
*
|
|
182
|
+
* @since v0.2.0
|
|
183
|
+
*/
|
|
89
184
|
@disableGC
|
|
90
185
|
export let rec lte = (x: Float32, y: Float32) => {
|
|
91
186
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -97,6 +192,15 @@ export let rec lte = (x: Float32, y: Float32) => {
|
|
|
97
192
|
ret
|
|
98
193
|
}
|
|
99
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Checks if the first value is greater than or equal to the second value.
|
|
197
|
+
*
|
|
198
|
+
* @param x: The first value
|
|
199
|
+
* @param y: The second value
|
|
200
|
+
* @returns `true` if the first value is greater than or equal to the second value or `false` otherwise
|
|
201
|
+
*
|
|
202
|
+
* @since v0.2.0
|
|
203
|
+
*/
|
|
100
204
|
@disableGC
|
|
101
205
|
export let rec gte = (x: Float32, y: Float32) => {
|
|
102
206
|
let xv = WasmF32.load(WasmI32.fromGrain(x), 8n)
|
|
@@ -108,7 +212,9 @@ export let rec gte = (x: Float32, y: Float32) => {
|
|
|
108
212
|
ret
|
|
109
213
|
}
|
|
110
214
|
|
|
111
|
-
|
|
215
|
+
/**
|
|
216
|
+
* @section Constants: Float32 constant values.
|
|
217
|
+
*/
|
|
112
218
|
|
|
113
219
|
@disableGC
|
|
114
220
|
let rec makeInfinity = () => {
|
|
@@ -118,6 +224,11 @@ let rec makeInfinity = () => {
|
|
|
118
224
|
ret
|
|
119
225
|
}
|
|
120
226
|
|
|
227
|
+
/**
|
|
228
|
+
* Infinity represented as a Float32 value.
|
|
229
|
+
*
|
|
230
|
+
* @since v0.4.0
|
|
231
|
+
*/
|
|
121
232
|
export let infinity = makeInfinity()
|
|
122
233
|
|
|
123
234
|
@disableGC
|
|
@@ -128,4 +239,9 @@ let rec makeNaN = () => {
|
|
|
128
239
|
ret
|
|
129
240
|
}
|
|
130
241
|
|
|
242
|
+
/**
|
|
243
|
+
* NaN (Not a Number) represented as a Float32 value.
|
|
244
|
+
*
|
|
245
|
+
* @since v0.4.0
|
|
246
|
+
*/
|
|
131
247
|
export let nan = makeNaN()
|
package/float32.md
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Float32
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Utilities for working with the Float32 type.
|
|
6
|
+
|
|
7
|
+
<details disabled>
|
|
8
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
9
|
+
No other changes yet.
|
|
10
|
+
</details>
|
|
11
|
+
|
|
12
|
+
```grain
|
|
13
|
+
import Float32 from "float32"
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Conversions
|
|
17
|
+
|
|
18
|
+
Functions for converting between Numbers and the Float32 type.
|
|
19
|
+
|
|
20
|
+
### Float32.**fromNumber**
|
|
21
|
+
|
|
22
|
+
<details disabled>
|
|
23
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
24
|
+
No other changes yet.
|
|
25
|
+
</details>
|
|
26
|
+
|
|
27
|
+
```grain
|
|
28
|
+
fromNumber : Number -> Float32
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Converts a Number to a Float32.
|
|
32
|
+
|
|
33
|
+
Parameters:
|
|
34
|
+
|
|
35
|
+
|param|type|description|
|
|
36
|
+
|-----|----|-----------|
|
|
37
|
+
|`number`|`Number`|The value to convert|
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
|
|
41
|
+
|type|description|
|
|
42
|
+
|----|-----------|
|
|
43
|
+
|`Float32`|The Number represented as a Float32|
|
|
44
|
+
|
|
45
|
+
### Float32.**toNumber**
|
|
46
|
+
|
|
47
|
+
<details disabled>
|
|
48
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
49
|
+
No other changes yet.
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
```grain
|
|
53
|
+
toNumber : Float32 -> Number
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Converts a Float32 to a Number.
|
|
57
|
+
|
|
58
|
+
Parameters:
|
|
59
|
+
|
|
60
|
+
|param|type|description|
|
|
61
|
+
|-----|----|-----------|
|
|
62
|
+
|`float`|`Float32`|The value to convert|
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
|
|
66
|
+
|type|description|
|
|
67
|
+
|----|-----------|
|
|
68
|
+
|`Number`|The Float32 represented as a Number|
|
|
69
|
+
|
|
70
|
+
## Operations
|
|
71
|
+
|
|
72
|
+
Mathematical operations for Float32 values.
|
|
73
|
+
|
|
74
|
+
### Float32.**add**
|
|
75
|
+
|
|
76
|
+
<details disabled>
|
|
77
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
78
|
+
No other changes yet.
|
|
79
|
+
</details>
|
|
80
|
+
|
|
81
|
+
```grain
|
|
82
|
+
add : (Float32, Float32) -> Float32
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Computes the sum of its operands.
|
|
86
|
+
|
|
87
|
+
Parameters:
|
|
88
|
+
|
|
89
|
+
|param|type|description|
|
|
90
|
+
|-----|----|-----------|
|
|
91
|
+
|`x`|`Float32`|The first operand|
|
|
92
|
+
|`y`|`Float32`|The second operand|
|
|
93
|
+
|
|
94
|
+
Returns:
|
|
95
|
+
|
|
96
|
+
|type|description|
|
|
97
|
+
|----|-----------|
|
|
98
|
+
|`Float32`|The sum of the two operands|
|
|
99
|
+
|
|
100
|
+
### Float32.**sub**
|
|
101
|
+
|
|
102
|
+
<details disabled>
|
|
103
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
104
|
+
No other changes yet.
|
|
105
|
+
</details>
|
|
106
|
+
|
|
107
|
+
```grain
|
|
108
|
+
sub : (Float32, Float32) -> Float32
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Computes the difference of its operands.
|
|
112
|
+
|
|
113
|
+
Parameters:
|
|
114
|
+
|
|
115
|
+
|param|type|description|
|
|
116
|
+
|-----|----|-----------|
|
|
117
|
+
|`x`|`Float32`|The first operand|
|
|
118
|
+
|`y`|`Float32`|The second operand|
|
|
119
|
+
|
|
120
|
+
Returns:
|
|
121
|
+
|
|
122
|
+
|type|description|
|
|
123
|
+
|----|-----------|
|
|
124
|
+
|`Float32`|The difference of the two operands|
|
|
125
|
+
|
|
126
|
+
### Float32.**mul**
|
|
127
|
+
|
|
128
|
+
<details disabled>
|
|
129
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
130
|
+
No other changes yet.
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
```grain
|
|
134
|
+
mul : (Float32, Float32) -> Float32
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
Computes the product of its operands.
|
|
138
|
+
|
|
139
|
+
Parameters:
|
|
140
|
+
|
|
141
|
+
|param|type|description|
|
|
142
|
+
|-----|----|-----------|
|
|
143
|
+
|`x`|`Float32`|The first operand|
|
|
144
|
+
|`y`|`Float32`|The second operand|
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
|
|
148
|
+
|type|description|
|
|
149
|
+
|----|-----------|
|
|
150
|
+
|`Float32`|The product of the two operands|
|
|
151
|
+
|
|
152
|
+
### Float32.**div**
|
|
153
|
+
|
|
154
|
+
<details disabled>
|
|
155
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
156
|
+
No other changes yet.
|
|
157
|
+
</details>
|
|
158
|
+
|
|
159
|
+
```grain
|
|
160
|
+
div : (Float32, Float32) -> Float32
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Computes the quotient of its operands.
|
|
164
|
+
|
|
165
|
+
Parameters:
|
|
166
|
+
|
|
167
|
+
|param|type|description|
|
|
168
|
+
|-----|----|-----------|
|
|
169
|
+
|`x`|`Float32`|The first operand|
|
|
170
|
+
|`y`|`Float32`|The second operand|
|
|
171
|
+
|
|
172
|
+
Returns:
|
|
173
|
+
|
|
174
|
+
|type|description|
|
|
175
|
+
|----|-----------|
|
|
176
|
+
|`Float32`|The quotient of the two operands|
|
|
177
|
+
|
|
178
|
+
## Comparisons
|
|
179
|
+
|
|
180
|
+
Functions for comparing Float32 values.
|
|
181
|
+
|
|
182
|
+
### Float32.**lt**
|
|
183
|
+
|
|
184
|
+
<details disabled>
|
|
185
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
186
|
+
No other changes yet.
|
|
187
|
+
</details>
|
|
188
|
+
|
|
189
|
+
```grain
|
|
190
|
+
lt : (Float32, Float32) -> Bool
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Checks if the first value is less than the second value.
|
|
194
|
+
|
|
195
|
+
Parameters:
|
|
196
|
+
|
|
197
|
+
|param|type|description|
|
|
198
|
+
|-----|----|-----------|
|
|
199
|
+
|`x`|`Float32`|The first value|
|
|
200
|
+
|`y`|`Float32`|The second value|
|
|
201
|
+
|
|
202
|
+
Returns:
|
|
203
|
+
|
|
204
|
+
|type|description|
|
|
205
|
+
|----|-----------|
|
|
206
|
+
|`Bool`|`true` if the first value is less than the second value or `false` otherwise|
|
|
207
|
+
|
|
208
|
+
### Float32.**gt**
|
|
209
|
+
|
|
210
|
+
<details disabled>
|
|
211
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
212
|
+
No other changes yet.
|
|
213
|
+
</details>
|
|
214
|
+
|
|
215
|
+
```grain
|
|
216
|
+
gt : (Float32, Float32) -> Bool
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Checks if the first value is greater than the second value.
|
|
220
|
+
|
|
221
|
+
Parameters:
|
|
222
|
+
|
|
223
|
+
|param|type|description|
|
|
224
|
+
|-----|----|-----------|
|
|
225
|
+
|`x`|`Float32`|The first value|
|
|
226
|
+
|`y`|`Float32`|The second value|
|
|
227
|
+
|
|
228
|
+
Returns:
|
|
229
|
+
|
|
230
|
+
|type|description|
|
|
231
|
+
|----|-----------|
|
|
232
|
+
|`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
|
|
233
|
+
|
|
234
|
+
### Float32.**lte**
|
|
235
|
+
|
|
236
|
+
<details disabled>
|
|
237
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
238
|
+
No other changes yet.
|
|
239
|
+
</details>
|
|
240
|
+
|
|
241
|
+
```grain
|
|
242
|
+
lte : (Float32, Float32) -> Bool
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
Checks if the first value is less than or equal to the second value.
|
|
246
|
+
|
|
247
|
+
Parameters:
|
|
248
|
+
|
|
249
|
+
|param|type|description|
|
|
250
|
+
|-----|----|-----------|
|
|
251
|
+
|`x`|`Float32`|The first value|
|
|
252
|
+
|`y`|`Float32`|The second value|
|
|
253
|
+
|
|
254
|
+
Returns:
|
|
255
|
+
|
|
256
|
+
|type|description|
|
|
257
|
+
|----|-----------|
|
|
258
|
+
|`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
|
|
259
|
+
|
|
260
|
+
### Float32.**gte**
|
|
261
|
+
|
|
262
|
+
<details disabled>
|
|
263
|
+
<summary tabindex="-1">Added in <code>0.2.0</code></summary>
|
|
264
|
+
No other changes yet.
|
|
265
|
+
</details>
|
|
266
|
+
|
|
267
|
+
```grain
|
|
268
|
+
gte : (Float32, Float32) -> Bool
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Checks if the first value is greater than or equal to the second value.
|
|
272
|
+
|
|
273
|
+
Parameters:
|
|
274
|
+
|
|
275
|
+
|param|type|description|
|
|
276
|
+
|-----|----|-----------|
|
|
277
|
+
|`x`|`Float32`|The first value|
|
|
278
|
+
|`y`|`Float32`|The second value|
|
|
279
|
+
|
|
280
|
+
Returns:
|
|
281
|
+
|
|
282
|
+
|type|description|
|
|
283
|
+
|----|-----------|
|
|
284
|
+
|`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
|
|
285
|
+
|
|
286
|
+
## Constants
|
|
287
|
+
|
|
288
|
+
Float32 constant values.
|
|
289
|
+
|
|
290
|
+
### Float32.**infinity**
|
|
291
|
+
|
|
292
|
+
<details disabled>
|
|
293
|
+
<summary tabindex="-1">Added in <code>0.4.0</code></summary>
|
|
294
|
+
No other changes yet.
|
|
295
|
+
</details>
|
|
296
|
+
|
|
297
|
+
```grain
|
|
298
|
+
infinity : Float32
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
Infinity represented as a Float32 value.
|
|
302
|
+
|
|
303
|
+
### Float32.**nan**
|
|
304
|
+
|
|
305
|
+
<details disabled>
|
|
306
|
+
<summary tabindex="-1">Added in <code>0.4.0</code></summary>
|
|
307
|
+
No other changes yet.
|
|
308
|
+
</details>
|
|
309
|
+
|
|
310
|
+
```grain
|
|
311
|
+
nan : Float32
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
NaN (Not a Number) represented as a Float32 value.
|
|
315
|
+
|