-
Notifications
You must be signed in to change notification settings - Fork 236
Expand file tree
/
Copy pathfloat.rbs
More file actions
696 lines (616 loc) · 20.2 KB
/
float.rbs
File metadata and controls
696 lines (616 loc) · 20.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
# Float objects represent inexact real numbers using the native architecture's
# double-precision floating point representation.
#
# Floating point has a different arithmetic and is an inexact number. So you
# should know its esoteric system. See following:
#
# * http://docs.sun.com/source/806-3568/ncg_goldberg.html
# * https://github.com/rdp/ruby_tutorials_core/wiki/Ruby-Talk-FAQ#floats_impre
# cise
# * http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems
#
#
class Float < Numeric
public
# Returns the modulo after division of `float` by `other`.
#
# 6543.21.modulo(137) #=> 104.21000000000004
# 6543.21.modulo(137.24) #=> 92.92999999999961
#
def %: (Integer) -> Float
| (Float) -> Float
| (Rational) -> Float
| (Numeric) -> Numeric
# Returns a new Float which is the product of `float` and `other`.
#
def *: (Complex) -> Complex
| (Numeric) -> Float
# Raises `float` to the power of `other`.
#
# 2.0**3 #=> 8.0
#
def **: (Complex) -> Complex
| (Numeric) -> Float
# Returns a new Float which is the sum of `float` and `other`.
#
def +: (Complex) -> Complex
| (Numeric) -> Float
def +@: () -> Float
# Returns a new Float which is the difference of `float` and `other`.
#
def -: (Complex) -> Complex
| (Numeric) -> Float
# Returns `float`, negated.
#
def -@: () -> Float
# Returns a new Float which is the result of dividing `float` by `other`.
#
def /: (Complex) -> Complex
| (Numeric) -> Float
# Returns `true` if `float` is less than `real`.
#
# The result of `NaN < NaN` is undefined, so an implementation-dependent value
# is returned.
#
def <: (Numeric) -> bool
# Returns `true` if `float` is less than or equal to `real`.
#
# The result of `NaN <= NaN` is undefined, so an implementation-dependent value
# is returned.
#
def <=: (Numeric) -> bool
# Returns -1, 0, or +1 depending on whether `float` is less than, equal to, or
# greater than `real`. This is the basis for the tests in the Comparable module.
#
# The result of `NaN <=> NaN` is undefined, so an implementation-dependent value
# is returned.
#
# `nil` is returned if the two values are incomparable.
#
def <=>: (Numeric) -> Integer?
# Returns `true` only if `obj` has the same value as `float`. Contrast this with
# Float#eql?, which requires `obj` to be a Float.
#
# 1.0 == 1 #=> true
#
# The result of `NaN == NaN` is undefined, so an implementation-dependent value
# is returned.
#
def ==: (untyped) -> bool
# Returns `true` only if `obj` has the same value as `float`. Contrast this with
# Float#eql?, which requires `obj` to be a Float.
#
# 1.0 == 1 #=> true
#
# The result of `NaN == NaN` is undefined, so an implementation-dependent value
# is returned.
#
def ===: (untyped) -> bool
# Returns `true` if `float` is greater than `real`.
#
# The result of `NaN > NaN` is undefined, so an implementation-dependent value
# is returned.
#
def >: (Numeric) -> bool
# Returns `true` if `float` is greater than or equal to `real`.
#
# The result of `NaN >= NaN` is undefined, so an implementation-dependent value
# is returned.
#
def >=: (Numeric) -> bool
# Returns the absolute value of `float`.
#
# (-34.56).abs #=> 34.56
# -34.56.abs #=> 34.56
# 34.56.abs #=> 34.56
#
# Float#magnitude is an alias for Float#abs.
#
def abs: () -> Float
def abs2: () -> Float
# Returns 0 if the value is positive, pi otherwise.
#
def angle: () -> (Integer | Float)
# Returns 0 if the value is positive, pi otherwise.
#
alias arg angle
# Returns the smallest number greater than or equal to `float` with a precision
# of `ndigits` decimal digits (default: 0).
#
# When the precision is negative, the returned value is an integer with at least
# `ndigits.abs` trailing zeros.
#
# Returns a floating point number when `ndigits` is positive, otherwise returns
# an integer.
#
# 1.2.ceil #=> 2
# 2.0.ceil #=> 2
# (-1.2).ceil #=> -1
# (-2.0).ceil #=> -2
#
# 1.234567.ceil(2) #=> 1.24
# 1.234567.ceil(3) #=> 1.235
# 1.234567.ceil(4) #=> 1.2346
# 1.234567.ceil(5) #=> 1.23457
#
# 34567.89.ceil(-5) #=> 100000
# 34567.89.ceil(-4) #=> 40000
# 34567.89.ceil(-3) #=> 35000
# 34567.89.ceil(-2) #=> 34600
# 34567.89.ceil(-1) #=> 34570
# 34567.89.ceil(0) #=> 34568
# 34567.89.ceil(1) #=> 34567.9
# 34567.89.ceil(2) #=> 34567.89
# 34567.89.ceil(3) #=> 34567.89
#
# Note that the limited precision of floating point arithmetic might lead to
# surprising results:
#
# (2.1 / 0.7).ceil #=> 4 (!)
#
def ceil: () -> Integer
| (int digits) -> (Integer | Float)
def clone: (?freeze: bool) -> self
# Returns an array with both `numeric` and `float` represented as Float objects.
#
# This is achieved by converting `numeric` to a Float.
#
# 1.2.coerce(3) #=> [3.0, 1.2]
# 2.5.coerce(1.1) #=> [1.1, 2.5]
#
def coerce: (Numeric) -> [Float, Float]
def conj: () -> Float
def conjugate: () -> Float
# Returns the denominator (always positive). The result is machine dependent.
#
# See also Float#numerator.
#
def denominator: () -> Integer
def div: (Numeric) -> Integer
# See Numeric#divmod.
#
# 42.0.divmod(6) #=> [7, 0.0]
# 42.0.divmod(5) #=> [8, 2.0]
#
def divmod: (Numeric) -> [Numeric, Numeric]
def dup: () -> self
# Returns `true` only if `obj` is a Float with the same value as `float`.
# Contrast this with Float#==, which performs type conversions.
#
# 1.0.eql?(1) #=> false
#
# The result of `NaN.eql?(NaN)` is undefined, so an implementation-dependent
# value is returned.
#
def eql?: (untyped) -> bool
# Returns `float / numeric`, same as Float#/.
#
def fdiv: (Complex) -> Complex
| (Numeric) -> Float
# Returns `true` if `float` is a valid IEEE floating point number, i.e. it is
# not infinite and Float#nan? is `false`.
#
def finite?: () -> bool
# Returns the largest number less than or equal to `float` with a precision of
# `ndigits` decimal digits (default: 0).
#
# When the precision is negative, the returned value is an integer with at least
# `ndigits.abs` trailing zeros.
#
# Returns a floating point number when `ndigits` is positive, otherwise returns
# an integer.
#
# 1.2.floor #=> 1
# 2.0.floor #=> 2
# (-1.2).floor #=> -2
# (-2.0).floor #=> -2
#
# 1.234567.floor(2) #=> 1.23
# 1.234567.floor(3) #=> 1.234
# 1.234567.floor(4) #=> 1.2345
# 1.234567.floor(5) #=> 1.23456
#
# 34567.89.floor(-5) #=> 0
# 34567.89.floor(-4) #=> 30000
# 34567.89.floor(-3) #=> 34000
# 34567.89.floor(-2) #=> 34500
# 34567.89.floor(-1) #=> 34560
# 34567.89.floor(0) #=> 34567
# 34567.89.floor(1) #=> 34567.8
# 34567.89.floor(2) #=> 34567.89
# 34567.89.floor(3) #=> 34567.89
#
# Note that the limited precision of floating point arithmetic might lead to
# surprising results:
#
# (0.3 / 0.1).floor #=> 2 (!)
#
def floor: () -> Integer
| (int digits) -> (Integer | Numeric)
# Returns a hash code for this float.
#
# See also Object#hash.
#
def hash: () -> Integer
def i: () -> Complex
def imag: () -> Integer
def imaginary: () -> Integer
# Returns `nil`, -1, or 1 depending on whether the value is finite, `-Infinity`,
# or `+Infinity`.
#
# (0.0).infinite? #=> nil
# (-1.0/0.0).infinite? #=> -1
# (+1.0/0.0).infinite? #=> 1
#
def infinite?: () -> Integer?
alias inspect to_s
def integer?: () -> bool
# Returns the absolute value of `float`.
#
# (-34.56).abs #=> 34.56
# -34.56.abs #=> 34.56
# 34.56.abs #=> 34.56
#
# Float#magnitude is an alias for Float#abs.
#
alias magnitude abs
# Returns the modulo after division of `float` by `other`.
#
# 6543.21.modulo(137) #=> 104.21000000000004
# 6543.21.modulo(137.24) #=> 92.92999999999961
#
def modulo: (Numeric) -> Float
# Returns `true` if `float` is an invalid IEEE floating point number.
#
# a = -1.0 #=> -1.0
# a.nan? #=> false
# a = 0.0/0.0 #=> NaN
# a.nan? #=> true
#
def nan?: () -> bool
# Returns `true` if `float` is less than 0.
#
def negative?: () -> bool
# Returns the next representable floating point number.
#
# Float::MAX.next_float and Float::INFINITY.next_float is Float::INFINITY.
#
# Float::NAN.next_float is Float::NAN.
#
# For example:
#
# 0.01.next_float #=> 0.010000000000000002
# 1.0.next_float #=> 1.0000000000000002
# 100.0.next_float #=> 100.00000000000001
#
# 0.01.next_float - 0.01 #=> 1.734723475976807e-18
# 1.0.next_float - 1.0 #=> 2.220446049250313e-16
# 100.0.next_float - 100.0 #=> 1.4210854715202004e-14
#
# f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.next_float }
# #=> 0x1.47ae147ae147bp-7 0.01
# # 0x1.47ae147ae147cp-7 0.010000000000000002
# # 0x1.47ae147ae147dp-7 0.010000000000000004
# # 0x1.47ae147ae147ep-7 0.010000000000000005
# # 0x1.47ae147ae147fp-7 0.010000000000000007
# # 0x1.47ae147ae148p-7 0.010000000000000009
# # 0x1.47ae147ae1481p-7 0.01000000000000001
# # 0x1.47ae147ae1482p-7 0.010000000000000012
# # 0x1.47ae147ae1483p-7 0.010000000000000014
# # 0x1.47ae147ae1484p-7 0.010000000000000016
# # 0x1.47ae147ae1485p-7 0.010000000000000018
# # 0x1.47ae147ae1486p-7 0.01000000000000002
# # 0x1.47ae147ae1487p-7 0.010000000000000021
# # 0x1.47ae147ae1488p-7 0.010000000000000023
# # 0x1.47ae147ae1489p-7 0.010000000000000024
# # 0x1.47ae147ae148ap-7 0.010000000000000026
# # 0x1.47ae147ae148bp-7 0.010000000000000028
# # 0x1.47ae147ae148cp-7 0.01000000000000003
# # 0x1.47ae147ae148dp-7 0.010000000000000031
# # 0x1.47ae147ae148ep-7 0.010000000000000033
#
# f = 0.0
# 100.times { f += 0.1 }
# f #=> 9.99999999999998 # should be 10.0 in the ideal world.
# 10-f #=> 1.9539925233402755e-14 # the floating point error.
# 10.0.next_float-10 #=> 1.7763568394002505e-15 # 1 ulp (unit in the last place).
# (10-f)/(10.0.next_float-10) #=> 11.0 # the error is 11 ulp.
# (10-f)/(10*Float::EPSILON) #=> 8.8 # approximation of the above.
# "%a" % 10 #=> "0x1.4p+3"
# "%a" % f #=> "0x1.3fffffffffff5p+3" # the last hex digit is 5. 16 - 5 = 11 ulp.
#
def next_float: () -> Float
def nonzero?: () -> self?
# Returns the numerator. The result is machine dependent.
#
# n = 0.3.numerator #=> 5404319552844595
# d = 0.3.denominator #=> 18014398509481984
# n.fdiv(d) #=> 0.3
#
# See also Float#denominator.
#
def numerator: () -> Integer
# Returns 0 if the value is positive, pi otherwise.
#
alias phase angle
def polar: () -> [ Float, Integer | Float ]
# Returns `true` if `float` is greater than 0.
#
def positive?: () -> bool
# Returns the previous representable floating point number.
#
# (-Float::MAX).prev_float and (-Float::INFINITY).prev_float is
# -Float::INFINITY.
#
# Float::NAN.prev_float is Float::NAN.
#
# For example:
#
# 0.01.prev_float #=> 0.009999999999999998
# 1.0.prev_float #=> 0.9999999999999999
# 100.0.prev_float #=> 99.99999999999999
#
# 0.01 - 0.01.prev_float #=> 1.734723475976807e-18
# 1.0 - 1.0.prev_float #=> 1.1102230246251565e-16
# 100.0 - 100.0.prev_float #=> 1.4210854715202004e-14
#
# f = 0.01; 20.times { printf "%-20a %s\n", f, f.to_s; f = f.prev_float }
# #=> 0x1.47ae147ae147bp-7 0.01
# # 0x1.47ae147ae147ap-7 0.009999999999999998
# # 0x1.47ae147ae1479p-7 0.009999999999999997
# # 0x1.47ae147ae1478p-7 0.009999999999999995
# # 0x1.47ae147ae1477p-7 0.009999999999999993
# # 0x1.47ae147ae1476p-7 0.009999999999999992
# # 0x1.47ae147ae1475p-7 0.00999999999999999
# # 0x1.47ae147ae1474p-7 0.009999999999999988
# # 0x1.47ae147ae1473p-7 0.009999999999999986
# # 0x1.47ae147ae1472p-7 0.009999999999999985
# # 0x1.47ae147ae1471p-7 0.009999999999999983
# # 0x1.47ae147ae147p-7 0.009999999999999981
# # 0x1.47ae147ae146fp-7 0.00999999999999998
# # 0x1.47ae147ae146ep-7 0.009999999999999978
# # 0x1.47ae147ae146dp-7 0.009999999999999976
# # 0x1.47ae147ae146cp-7 0.009999999999999974
# # 0x1.47ae147ae146bp-7 0.009999999999999972
# # 0x1.47ae147ae146ap-7 0.00999999999999997
# # 0x1.47ae147ae1469p-7 0.009999999999999969
# # 0x1.47ae147ae1468p-7 0.009999999999999967
#
def prev_float: () -> Float
# Returns `float / numeric`, same as Float#/.
#
def quo: (Complex) -> Complex
| (Numeric) -> Float
# Returns a simpler approximation of the value (flt-|eps| <= result <=
# flt+|eps|). If the optional argument `eps` is not given, it will be chosen
# automatically.
#
# 0.3.rationalize #=> (3/10)
# 1.333.rationalize #=> (1333/1000)
# 1.333.rationalize(0.01) #=> (4/3)
#
# See also Float#to_r.
#
def rationalize: (?Numeric eps) -> Rational
def real: () -> Float
def real?: () -> true
def rect: () -> [ Float, Numeric ]
alias rectangular rect
def remainder: (Numeric) -> Float
# Returns `float` rounded to the nearest value with a precision of `ndigits`
# decimal digits (default: 0).
#
# When the precision is negative, the returned value is an integer with at least
# `ndigits.abs` trailing zeros.
#
# Returns a floating point number when `ndigits` is positive, otherwise returns
# an integer.
#
# 1.4.round #=> 1
# 1.5.round #=> 2
# 1.6.round #=> 2
# (-1.5).round #=> -2
#
# 1.234567.round(2) #=> 1.23
# 1.234567.round(3) #=> 1.235
# 1.234567.round(4) #=> 1.2346
# 1.234567.round(5) #=> 1.23457
#
# 34567.89.round(-5) #=> 0
# 34567.89.round(-4) #=> 30000
# 34567.89.round(-3) #=> 35000
# 34567.89.round(-2) #=> 34600
# 34567.89.round(-1) #=> 34570
# 34567.89.round(0) #=> 34568
# 34567.89.round(1) #=> 34567.9
# 34567.89.round(2) #=> 34567.89
# 34567.89.round(3) #=> 34567.89
#
# If the optional `half` keyword argument is given, numbers that are half-way
# between two possible rounded values will be rounded according to the specified
# tie-breaking `mode`:
#
# * `:up` or `nil`: round half away from zero (default)
# * `:down`: round half toward zero
# * `:even`: round half toward the nearest even number
#
# 2.5.round(half: :up) #=> 3
# 2.5.round(half: :down) #=> 2
# 2.5.round(half: :even) #=> 2
# 3.5.round(half: :up) #=> 4
# 3.5.round(half: :down) #=> 3
# 3.5.round(half: :even) #=> 4
# (-2.5).round(half: :up) #=> -3
# (-2.5).round(half: :down) #=> -2
# (-2.5).round(half: :even) #=> -2
#
def round: (?half: :up | :down | :even) -> Integer
| (int digits, ?half: :up | :down | :even) -> (Integer | Float)
def step: (?Numeric limit, ?Numeric step) { (Float) -> void } -> self
| (?Numeric limit, ?Numeric step) -> Enumerator[Float, self]
| (?by: Numeric, ?to: Numeric) { (Float) -> void } -> self
| (?by: Numeric, ?to: Numeric) -> Enumerator[Float, self]
def to_c: () -> Complex
# Since `float` is already a Float, returns `self`.
#
def to_f: () -> Float
# Returns the `float` truncated to an Integer.
#
# 1.2.to_i #=> 1
# (-1.2).to_i #=> -1
#
# Note that the limited precision of floating point arithmetic might lead to
# surprising results:
#
# (0.3 / 0.1).to_i #=> 2 (!)
#
# #to_int is an alias for #to_i.
#
def to_i: () -> Integer
# Returns the `float` truncated to an Integer.
#
# 1.2.to_i #=> 1
# (-1.2).to_i #=> -1
#
# Note that the limited precision of floating point arithmetic might lead to
# surprising results:
#
# (0.3 / 0.1).to_i #=> 2 (!)
#
# #to_int is an alias for #to_i.
#
alias to_int to_i
# Returns the value as a rational.
#
# 2.0.to_r #=> (2/1)
# 2.5.to_r #=> (5/2)
# -0.75.to_r #=> (-3/4)
# 0.0.to_r #=> (0/1)
# 0.3.to_r #=> (5404319552844595/18014398509481984)
#
# NOTE: 0.3.to_r isn't the same as "0.3".to_r. The latter is equivalent to
# "3/10".to_r, but the former isn't so.
#
# 0.3.to_r == 3/10r #=> false
# "0.3".to_r == 3/10r #=> true
#
# See also Float#rationalize.
#
def to_r: () -> Rational
# Returns a string containing a representation of `self`. As well as a fixed or
# exponential form of the `float`, the call may return `NaN`, `Infinity`, and
# `-Infinity`.
#
def to_s: () -> String
# Returns `float` truncated (toward zero) to a precision of `ndigits` decimal
# digits (default: 0).
#
# When the precision is negative, the returned value is an integer with at least
# `ndigits.abs` trailing zeros.
#
# Returns a floating point number when `ndigits` is positive, otherwise returns
# an integer.
#
# 2.8.truncate #=> 2
# (-2.8).truncate #=> -2
# 1.234567.truncate(2) #=> 1.23
# 34567.89.truncate(-2) #=> 34500
#
# Note that the limited precision of floating point arithmetic might lead to
# surprising results:
#
# (0.3 / 0.1).truncate #=> 2 (!)
#
def truncate: () -> Integer
| (Integer ndigits) -> (Integer | Float)
# Returns `true` if `float` is 0.0.
#
def zero?: () -> bool
end
# The minimum number of significant decimal digits in a double-precision
# floating point.
#
# Usually defaults to 15.
#
Float::DIG: Integer
# The difference between 1 and the smallest double-precision floating point
# number greater than 1.
#
# Usually defaults to 2.2204460492503131e-16.
#
Float::EPSILON: Float
# An expression representing positive infinity.
#
Float::INFINITY: Float
# The number of base digits for the `double` data type.
#
# Usually defaults to 53.
#
Float::MANT_DIG: Integer
# The largest possible integer in a double-precision floating point number.
#
# Usually defaults to 1.7976931348623157e+308.
#
Float::MAX: Float
# The largest positive exponent in a double-precision floating point where 10
# raised to this power minus 1.
#
# Usually defaults to 308.
#
Float::MAX_10_EXP: Integer
# The largest possible exponent value in a double-precision floating point.
#
# Usually defaults to 1024.
#
Float::MAX_EXP: Integer
# The smallest positive normalized number in a double-precision floating point.
#
# Usually defaults to 2.2250738585072014e-308.
#
# If the platform supports denormalized numbers, there are numbers between zero
# and Float::MIN. 0.0.next_float returns the smallest positive floating point
# number including denormalized numbers.
#
Float::MIN: Float
# The smallest negative exponent in a double-precision floating point where 10
# raised to this power minus 1.
#
# Usually defaults to -307.
#
Float::MIN_10_EXP: Integer
# The smallest possible exponent value in a double-precision floating point.
#
# Usually defaults to -1021.
#
Float::MIN_EXP: Integer
# An expression representing a value which is "not a number".
#
Float::NAN: Float
# The base of the floating point, or number of unique digits used to represent
# the number.
#
# Usually defaults to 2 on most systems, which would represent a base-10
# decimal.
#
Float::RADIX: Integer
# Deprecated, do not use.
#
# Represents the rounding mode for floating point addition at the start time.
#
# Usually defaults to 1, rounding to the nearest number.
#
# Other modes include:
#
# -1
# : Indeterminable
# 0
# : Rounding towards zero
# 1
# : Rounding to the nearest number
# 2
# : Rounding towards positive infinity
# 3
# : Rounding towards negative infinity
#
#
Float::ROUNDS: Integer