@@ -158,9 +158,9 @@ See [`isFinite`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen
158
158
## Examples
159
159
160
160
```rescript
161
- Float.isFinite(1.0) // true
162
- Float.isFinite(Float.Constants.nan) // false
163
- Float.isFinite(Float.Constants.positiveInfinity) // false
161
+ Float.isFinite(1.0) == true
162
+ Float.isFinite(Float.Constants.nan) == false
163
+ Float.isFinite(Float.Constants.positiveInfinity) == false
164
164
```
165
165
*/
166
166
@val
@@ -175,11 +175,11 @@ See [`parseFloat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refer
175
175
## Examples
176
176
177
177
```rescript
178
- Float.parseFloat("1.0") // 1.0
179
- Float.parseFloat(" 3.14 ") // 3.14
180
- Float.parseFloat("3.0") // 3.0
181
- Float.parseFloat("3.14some non-digit characters") // 3.14
182
- Float.parseFloat("error")->Float.isNaN // true
178
+ Float.parseFloat("1.0") == 1.0
179
+ Float.parseFloat(" 3.14 ") == 3.14
180
+ Float.parseFloat("3.0") == 3.0
181
+ Float.parseFloat("3.14some non-digit characters") == 3.14
182
+ Float.parseFloat("error")->Float.isNaN == true
183
183
```
184
184
*/
185
185
@val
@@ -196,15 +196,15 @@ See [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen
196
196
## Examples
197
197
198
198
```rescript
199
- Float.parseInt("1.0") // 1.0
200
- Float.parseInt(" 3.14 ") // 3.0
201
- Float.parseInt(3) // 3.0
202
- Float.parseInt("3.14some non-digit characters") // 3.0
203
- Float.parseInt("error")->Float.isNaN // true
204
- Float.parseInt("10.0", ~radix=2) // 2.0
205
- Float.parseInt("15 * 3", ~radix=10) // 15.0
206
- Float.parseInt("12", ~radix=13) // 15.0
207
- Float.parseInt("17", ~radix=40)->Float.isNaN // true
199
+ Float.parseInt("1.0") == 1.0
200
+ Float.parseInt(" 3.14 ") == 3.0
201
+ Float.parseInt(3) == 3.0
202
+ Float.parseInt("3.14some non-digit characters") == 3.0
203
+ Float.parseInt("error")->Float.isNaN == true
204
+ Float.parseInt("10.0", ~radix=2) == 2.0
205
+ Float.parseInt("15 * 3", ~radix=10) == 15.0
206
+ Float.parseInt("12", ~radix=13) == 15.0
207
+ Float.parseInt("17", ~radix=40)->Float.isNaN == true
208
208
```
209
209
*/
210
210
@val
@@ -221,10 +221,10 @@ See [`parseInt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Referen
221
221
## Examples
222
222
223
223
```rescript
224
- Float.parseIntWithRadix("10.0", ~radix=2) // 2.0
225
- Float.parseIntWithRadix("15 * 3", ~radix=10) // 15.0
226
- Float.parseIntWithRadix("12", ~radix=13) // 15.0
227
- Float.parseIntWithRadix("17", ~radix=40)->Float.isNaN // true
224
+ Float.parseIntWithRadix("10.0", ~radix=2) == 2.0
225
+ Float.parseIntWithRadix("15 * 3", ~radix=10) == 15.0
226
+ Float.parseIntWithRadix("12", ~radix=13) == 15.0
227
+ Float.parseIntWithRadix("17", ~radix=40)->Float.isNaN == true
228
228
```
229
229
*/
230
230
@deprecated ("Use `parseInt` instead" ) @val
@@ -239,10 +239,10 @@ See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaSc
239
239
## Examples
240
240
241
241
```rescript
242
- Float.toExponential(1000.0) // "1e+3"
243
- Float.toExponential(-1000.0) // "-1e+3"
244
- Float.toExponential(77.0, ~digits=2) // "7.70e+1"
245
- Float.toExponential(5678.0, ~digits=2) // "5.68e+3"
242
+ Float.toExponential(1000.0) == "1e+3"
243
+ Float.toExponential(-1000.0) == "-1e+3"
244
+ Float.toExponential(77.0, ~digits=2) == "7.70e+1"
245
+ Float.toExponential(5678.0, ~digits=2) == "5.68e+3"
246
246
```
247
247
248
248
## Exceptions
@@ -261,8 +261,8 @@ See [`Number.toExponential`](https://developer.mozilla.org/en-US/docs/Web/JavaSc
261
261
## Examples
262
262
263
263
```rescript
264
- Float.toExponentialWithPrecision(77.0, ~digits=2) // "7.70e+1"
265
- Float.toExponentialWithPrecision(5678.0, ~digits=2) // "5.68e+3"
264
+ Float.toExponentialWithPrecision(77.0, ~digits=2) == "7.70e+1"
265
+ Float.toExponentialWithPrecision(5678.0, ~digits=2) == "5.68e+3"
266
266
```
267
267
268
268
## Exceptions
@@ -281,10 +281,10 @@ See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R
281
281
## Examples
282
282
283
283
```rescript
284
- Float.toFixed(123456.0) // "123456.00 "
285
- Float.toFixed(10.0) // "10.00 "
286
- Float.toFixed(300.0, ~digits=4) // "300.0000"
287
- Float.toFixed(300.0, ~digits=1) // "300.0"
284
+ Float.toFixed(123456.0) == "123456"
285
+ Float.toFixed(10.0) == "10"
286
+ Float.toFixed(300.0, ~digits=4) == "300.0000"
287
+ Float.toFixed(300.0, ~digits=1) == "300.0"
288
288
```
289
289
290
290
## Exceptions
@@ -303,8 +303,8 @@ See [`Number.toFixed`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/R
303
303
## Examples
304
304
305
305
```rescript
306
- Float.toFixedWithPrecision(300.0, ~digits=4) // "300.0000"
307
- Float.toFixedWithPrecision(300.0, ~digits=1) // "300.0"
306
+ Float.toFixedWithPrecision(300.0, ~digits=4) == "300.0000"
307
+ Float.toFixedWithPrecision(300.0, ~digits=1) == "300.0"
308
308
```
309
309
310
310
## Exceptions
@@ -322,10 +322,10 @@ See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScri
322
322
## Examples
323
323
324
324
```rescript
325
- Float.toPrecision(100.0) // "100"
326
- Float.toPrecision(1.0) // "1"
327
- Float.toPrecision(100.0, ~digits=2) // "1.0e+2"
328
- Float.toPrecision(1.0, ~digits=1) // "1"
325
+ Float.toPrecision(100.0) == "100"
326
+ Float.toPrecision(1.0) == "1"
327
+ Float.toPrecision(100.0, ~digits=2) == "1.0e+2"
328
+ Float.toPrecision(1.0, ~digits=1) == "1"
329
329
```
330
330
331
331
## Exceptions
@@ -345,8 +345,8 @@ See [`Number.toPrecision`](https://developer.mozilla.org/en-US/docs/Web/JavaScri
345
345
## Examples
346
346
347
347
```rescript
348
- Float.toPrecisionWithPrecision(100.0, ~digits=2) // "1.0e+2"
349
- Float.toPrecisionWithPrecision(1.0, ~digits=1) // "1"
348
+ Float.toPrecisionWithPrecision(100.0, ~digits=2) == "1.0e+2"
349
+ Float.toPrecisionWithPrecision(1.0, ~digits=1) == "1"
350
350
```
351
351
352
352
## Exceptions
@@ -366,8 +366,8 @@ See [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/
366
366
## Examples
367
367
368
368
```rescript
369
- Float.toString(1000.0) // "1000"
370
- Float.toString(-1000.0) // "-1000"
369
+ Float.toString(1000.0) == "1000"
370
+ Float.toString(-1000.0) == "-1000"
371
371
```
372
372
*/
373
373
@send
@@ -381,9 +381,9 @@ See [`Number.toString`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/
381
381
## Examples
382
382
383
383
```rescript
384
- Float.toStringWithRadix(6.0, ~radix=2) // "110"
385
- Float.toStringWithRadix(3735928559.0, ~radix=16) // "deadbeef"
386
- Float.toStringWithRadix(123456.0, ~radix=36) // "2n9c"
384
+ Float.toStringWithRadix(6.0, ~radix=2) == "110"
385
+ Float.toStringWithRadix(3735928559.0, ~radix=16) == "deadbeef"
386
+ Float.toStringWithRadix(123456.0, ~radix=36) == "2n9c"
387
387
```
388
388
389
389
## Exceptions
0 commit comments