1  ------------------------------------------------------------------
   2  -- This file was autogenerated by 'writeNumbers', do not modify --
   3  ------------------------------------------------------------------
   4  
   5  package frost.core
   6  
   7  uses frost.unsafe.Pointer
   8  
   9  ===
  10  A 32-bit unsigned integer.
  11  ===
  12  class UInt32 : Value, HashKey<UInt32>, Comparable<UInt32>, Formattable {
  13      @private
  14      class Bits : ListView<Bit> {
  15          def value:UInt32
  16          init(value:UInt32) {
  17              self.value := value
  18          }
  19  
  20          ===Returns a single bit from this number, where index 0 is the least significant bit.===
  21          @override
  22          function [](index:Int):Bit {
  23              return value && (1 << index) != 0
  24          }
  25  
  26          ===
  27          Returns the number of bits in this integer, which is always 32.
  28          ===
  29          @override
  30          function get_count():Int {
  31              return 32
  32          }
  33  
  34          @override
  35          function get_iterator():Iterator<Bit> {
  36              return org.frostlang.frost.IntBitIterator(value.toUInt64, 1 << (32->builtin_uint64 - 1))
  37          }
  38      }
  39      ===
  40      The smallest value this type can hold (0).
  41      ===
  42      constant MIN:UInt32 := 0
  43  
  44      ===
  45      The largest value this type can hold (4,294,967,295).
  46      ===
  47      constant MAX:UInt32 := 4294967295
  48  
  49      @package
  50      def value:builtin_uint32
  51  
  52      ===@hidden===
  53      @implicit
  54      init(value:builtin_uint32) {
  55          self.value := value
  56      }
  57  
  58      ===@hidden===
  59      @implicit
  60      @priority(-5)
  61      init(value:UInt8) {
  62          self.value := value.value->builtin_uint32
  63      }
  64  
  65      ===@hidden===
  66      @implicit
  67      @priority(-4)
  68      init(value:UInt16) {
  69          self.value := value.value->builtin_uint32
  70      }
  71  
  72      ===Adds another number to this number.===
  73      @priority(9)
  74      function +(other:Int32):Int64 {
  75          return value->builtin_int64 + other.value->builtin_int64
  76      }
  77  
  78      ===Adds another number to this number.===
  79      @priority(13)
  80      function +(other:Int):Int64 {
  81          return value->builtin_int64 + other.value->builtin_int64
  82      }
  83  
  84      ===Adds another number to this number.===
  85      @priority(20)
  86      function +(other:UInt32):UInt32 {
  87          return value + other.value
  88      }
  89  
  90      ===Adds another number to this number.===
  91      @priority(10)
  92      function +(other:UInt64):UInt64 {
  93          return value->builtin_uint64 + other.value
  94      }
  95  
  96      ===Adds another number to this number.===
  97      @priority(12)
  98      function +(other:UInt):UInt {
  99          return value->builtin_uint + other.value
 100      }
 101  
 102      ===Adds another number to this number without checking for overflow.===
 103      @priority(9)
 104      function +&(other:Int32):Int64 {
 105          return value->builtin_int64 +& other.value->builtin_int64
 106      }
 107  
 108      ===Adds another number to this number without checking for overflow.===
 109      @priority(13)
 110      function +&(other:Int):Int64 {
 111          return value->builtin_int64 +& other.value->builtin_int64
 112      }
 113  
 114      ===Adds another number to this number without checking for overflow.===
 115      @priority(20)
 116      function +&(other:UInt32):UInt32 {
 117          return value +& other.value
 118      }
 119  
 120      ===Adds another number to this number without checking for overflow.===
 121      @priority(10)
 122      function +&(other:UInt64):UInt64 {
 123          return value->builtin_uint64 +& other.value
 124      }
 125  
 126      ===Adds another number to this number without checking for overflow.===
 127      @priority(12)
 128      function +&(other:UInt):UInt {
 129          return value->builtin_uint +& other.value
 130      }
 131  
 132      ===Subtracts another number from this number.===
 133      @priority(9)
 134      function -(other:Int32):Int64 {
 135          return value->builtin_int64 - other.value->builtin_int64
 136      }
 137  
 138      ===Subtracts another number from this number.===
 139      @priority(13)
 140      function -(other:Int):Int64 {
 141          return value->builtin_int64 - other.value->builtin_int64
 142      }
 143  
 144      ===Subtracts another number from this number.===
 145      @priority(20)
 146      function -(other:UInt32):UInt32 {
 147          return value - other.value
 148      }
 149  
 150      ===Subtracts another number from this number.===
 151      @priority(10)
 152      function -(other:UInt64):UInt64 {
 153          return value->builtin_uint64 - other.value
 154      }
 155  
 156      ===Subtracts another number from this number.===
 157      @priority(12)
 158      function -(other:UInt):UInt {
 159          return value->builtin_uint - other.value
 160      }
 161  
 162      ===Subtracts another number from this number without checking for overflow.===
 163      @priority(9)
 164      function -&(other:Int32):Int64 {
 165          return value->builtin_int64 -& other.value->builtin_int64
 166      }
 167  
 168      ===Subtracts another number from this number without checking for overflow.===
 169      @priority(13)
 170      function -&(other:Int):Int64 {
 171          return value->builtin_int64 -& other.value->builtin_int64
 172      }
 173  
 174      ===Subtracts another number from this number without checking for overflow.===
 175      @priority(20)
 176      function -&(other:UInt32):UInt32 {
 177          return value -& other.value
 178      }
 179  
 180      ===Subtracts another number from this number without checking for overflow.===
 181      @priority(10)
 182      function -&(other:UInt64):UInt64 {
 183          return value->builtin_uint64 -& other.value
 184      }
 185  
 186      ===Subtracts another number from this number without checking for overflow.===
 187      @priority(12)
 188      function -&(other:UInt):UInt {
 189          return value->builtin_uint -& other.value
 190      }
 191  
 192      ===Returns the negation (additive inverse) of this number===
 193      function -():UInt32 {
 194          return UInt32(-value)
 195      }
 196  
 197      ===Multiplies this number by another number.===
 198      @priority(9)
 199      function *(other:Int32):Int64 {
 200          return value->builtin_int64 * other.value->builtin_int64
 201      }
 202  
 203      ===Multiplies this number by another number.===
 204      @priority(13)
 205      function *(other:Int):Int64 {
 206          return value->builtin_int64 * other.value->builtin_int64
 207      }
 208  
 209      ===Multiplies this number by another number.===
 210      @priority(20)
 211      function *(other:UInt32):UInt32 {
 212          return value * other.value
 213      }
 214  
 215      ===Multiplies this number by another number.===
 216      @priority(10)
 217      function *(other:UInt64):UInt64 {
 218          return value->builtin_uint64 * other.value
 219      }
 220  
 221      ===Multiplies this number by another number.===
 222      @priority(12)
 223      function *(other:UInt):UInt {
 224          return value->builtin_uint * other.value
 225      }
 226  
 227      ===Multiplies this number by another number without checking for overflow.===
 228      @priority(9)
 229      function *&(other:Int32):Int64 {
 230          return value->builtin_int64 *& other.value->builtin_int64
 231      }
 232  
 233      ===Multiplies this number by another number without checking for overflow.===
 234      @priority(13)
 235      function *&(other:Int):Int64 {
 236          return value->builtin_int64 *& other.value->builtin_int64
 237      }
 238  
 239      ===Multiplies this number by another number without checking for overflow.===
 240      @priority(20)
 241      function *&(other:UInt32):UInt32 {
 242          return value *& other.value
 243      }
 244  
 245      ===Multiplies this number by another number without checking for overflow.===
 246      @priority(10)
 247      function *&(other:UInt64):UInt64 {
 248          return value->builtin_uint64 *& other.value
 249      }
 250  
 251      ===Multiplies this number by another number without checking for overflow.===
 252      @priority(12)
 253      function *&(other:UInt):UInt {
 254          return value->builtin_uint *& other.value
 255      }
 256  
 257      ===Divides this number by another number, returning the whole number portion.===
 258      @priority(9)
 259      function //(other:Int32):Int64 {
 260          return value->builtin_int64 // other.value->builtin_int64
 261      }
 262  
 263      ===Divides this number by another number, returning the whole number portion.===
 264      @priority(13)
 265      function //(other:Int):Int64 {
 266          return value->builtin_int64 // other.value->builtin_int64
 267      }
 268  
 269      ===Divides this number by another number, returning the whole number portion.===
 270      @priority(20)
 271      function //(other:UInt32):UInt32 {
 272          return value // other.value
 273      }
 274  
 275      ===Divides this number by another number, returning the whole number portion.===
 276      @priority(10)
 277      function //(other:UInt64):UInt64 {
 278          return value->builtin_uint64 // other.value
 279      }
 280  
 281      ===Divides this number by another number, returning the whole number portion.===
 282      @priority(12)
 283      function //(other:UInt):UInt {
 284          return value->builtin_uint // other.value
 285      }
 286  
 287      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 288      @priority(9)
 289      function //&(other:Int32):Int64 {
 290          return value->builtin_int64 //& other.value->builtin_int64
 291      }
 292  
 293      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 294      @priority(13)
 295      function //&(other:Int):Int64 {
 296          return value->builtin_int64 //& other.value->builtin_int64
 297      }
 298  
 299      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 300      @priority(20)
 301      function //&(other:UInt32):UInt32 {
 302          return value //& other.value
 303      }
 304  
 305      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 306      @priority(10)
 307      function //&(other:UInt64):UInt64 {
 308          return value->builtin_uint64 //& other.value
 309      }
 310  
 311      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 312      @priority(12)
 313      function //&(other:UInt):UInt {
 314          return value->builtin_uint //& other.value
 315      }
 316  
 317      ===Returns the remainder of dividing this number by another number.===
 318      @priority(9)
 319      function %(other:Int32):Int64 {
 320          return value->builtin_int64 % other.value->builtin_int64
 321      }
 322  
 323      ===Returns the remainder of dividing this number by another number.===
 324      @priority(13)
 325      function %(other:Int):Int64 {
 326          return value->builtin_int64 % other.value->builtin_int64
 327      }
 328  
 329      ===Returns the remainder of dividing this number by another number.===
 330      @priority(20)
 331      function %(other:UInt32):UInt32 {
 332          return value % other.value
 333      }
 334  
 335      ===Returns the remainder of dividing this number by another number.===
 336      @priority(10)
 337      function %(other:UInt64):UInt64 {
 338          return value->builtin_uint64 % other.value
 339      }
 340  
 341      ===Returns the remainder of dividing this number by another number.===
 342      @priority(12)
 343      function %(other:UInt):UInt {
 344          return value->builtin_uint % other.value
 345      }
 346  
 347      ===Divides this number by another number.===
 348      @priority(5)
 349      function /(other:Int8):Real32 {
 350          return value->builtin_float32 / other.value->builtin_float32
 351      }
 352  
 353      ===Divides this number by another number.===
 354      @priority(7)
 355      function /(other:Int16):Real32 {
 356          return value->builtin_float32 / other.value->builtin_float32
 357      }
 358  
 359      ===Divides this number by another number.===
 360      @priority(9)
 361      function /(other:Int32):Real32 {
 362          return value->builtin_float32 / other.value->builtin_float32
 363      }
 364  
 365      ===Divides this number by another number.===
 366      @priority(11)
 367      function /(other:Int64):Real64 {
 368          return value->builtin_float64 / other.value->builtin_float64
 369      }
 370  
 371      ===Divides this number by another number.===
 372      @priority(4)
 373      function /(other:UInt8):Real32 {
 374          return value->builtin_float32 / other.value->builtin_float32
 375      }
 376  
 377      ===Divides this number by another number.===
 378      @priority(6)
 379      function /(other:UInt16):Real32 {
 380          return value->builtin_float32 / other.value->builtin_float32
 381      }
 382  
 383      ===Divides this number by another number.===
 384      @priority(20)
 385      function /(other:UInt32):Real32 {
 386          return value->builtin_float32 / other.value->builtin_float32
 387      }
 388  
 389      ===Divides this number by another number.===
 390      @priority(10)
 391      function /(other:UInt64):Real64 {
 392          return value->builtin_float64 / other.value->builtin_float64
 393      }
 394  
 395      ===Divides this number by another number.===
 396      @priority(14)
 397      function /(other:Real32):Real32 {
 398          return value->builtin_float32 / other.value
 399      }
 400  
 401      ===Divides this number by another number.===
 402      @priority(15)
 403      function /(other:Real64):Real64 {
 404          return value->builtin_float64 / other.value
 405      }
 406  
 407      ===Returns the bitwise NOT of this number.===
 408      function !!():UInt32 {
 409          return UInt32(!!value)
 410      }
 411  
 412      ===Returns the bitwise AND of this number with another number.===
 413      @priority(9)
 414      function &&(other:Int32):Int32 {
 415          return value->builtin_int32 && other.value
 416      }
 417  
 418      ===Returns the bitwise AND of this number with another number.===
 419      @priority(11)
 420      function &&(other:Int64):Int64 {
 421          return value->builtin_int64 && other.value
 422      }
 423  
 424      ===Returns the bitwise AND of this number with another number.===
 425      @priority(13)
 426      function &&(other:Int):Int {
 427          return value->builtin_int && other.value
 428      }
 429  
 430      ===Returns the bitwise AND of this number with another number.===
 431      @priority(20)
 432      function &&(other:UInt32):UInt32 {
 433          return value && other.value
 434      }
 435  
 436      ===Returns the bitwise AND of this number with another number.===
 437      @priority(10)
 438      function &&(other:UInt64):UInt64 {
 439          return value->builtin_uint64 && other.value
 440      }
 441  
 442      ===Returns the bitwise AND of this number with another number.===
 443      @priority(12)
 444      function &&(other:UInt):UInt {
 445          return value->builtin_uint && other.value
 446      }
 447  
 448      ===Returns the bitwise OR of this number with another number.===
 449      @priority(9)
 450      function ||(other:Int32):Int32 {
 451          return value->builtin_int32 || other.value
 452      }
 453  
 454      ===Returns the bitwise OR of this number with another number.===
 455      @priority(11)
 456      function ||(other:Int64):Int64 {
 457          return value->builtin_int64 || other.value
 458      }
 459  
 460      ===Returns the bitwise OR of this number with another number.===
 461      @priority(13)
 462      function ||(other:Int):Int {
 463          return value->builtin_int || other.value
 464      }
 465  
 466      ===Returns the bitwise OR of this number with another number.===
 467      @priority(20)
 468      function ||(other:UInt32):UInt32 {
 469          return value || other.value
 470      }
 471  
 472      ===Returns the bitwise OR of this number with another number.===
 473      @priority(10)
 474      function ||(other:UInt64):UInt64 {
 475          return value->builtin_uint64 || other.value
 476      }
 477  
 478      ===Returns the bitwise OR of this number with another number.===
 479      @priority(12)
 480      function ||(other:UInt):UInt {
 481          return value->builtin_uint || other.value
 482      }
 483  
 484      ===Returns the bitwise XOR of this number with another number.===
 485      @priority(9)
 486      function ~~(other:Int32):Int32 {
 487          return value->builtin_int32 ~~ other.value
 488      }
 489  
 490      ===Returns the bitwise XOR of this number with another number.===
 491      @priority(11)
 492      function ~~(other:Int64):Int64 {
 493          return value->builtin_int64 ~~ other.value
 494      }
 495  
 496      ===Returns the bitwise XOR of this number with another number.===
 497      @priority(13)
 498      function ~~(other:Int):Int {
 499          return value->builtin_int ~~ other.value
 500      }
 501  
 502      ===Returns the bitwise XOR of this number with another number.===
 503      @priority(20)
 504      function ~~(other:UInt32):UInt32 {
 505          return value ~~ other.value
 506      }
 507  
 508      ===Returns the bitwise XOR of this number with another number.===
 509      @priority(10)
 510      function ~~(other:UInt64):UInt64 {
 511          return value->builtin_uint64 ~~ other.value
 512      }
 513  
 514      ===Returns the bitwise XOR of this number with another number.===
 515      @priority(12)
 516      function ~~(other:UInt):UInt {
 517          return value->builtin_uint ~~ other.value
 518      }
 519  
 520      ===Returns this number shifted left by the specified number of bits.===
 521      @priority(20)
 522      function <<(other:UInt32):UInt32 {
 523          return value << other.value
 524      }
 525  
 526      ===Returns this number shifted left by the specified number of bits, without checking for overflow.===
 527      @priority(20)
 528      function <<&(other:UInt32):UInt32 {
 529          return value <<& other.value
 530      }
 531  
 532      ===Returns this number logical shifted right by the specified number of bits.===
 533      @priority(20)
 534      function >>(other:UInt32):UInt32 {
 535          return value >> other.value
 536      }
 537  
 538      ===Returns `true` if this number is equal to the given number.===
 539      @priority(5)
 540      function =(other:Int8):Bit {
 541          return value->builtin_int64 = other.value->builtin_int64
 542      }
 543  
 544      ===Returns `true` if this number is equal to the given number.===
 545      @priority(7)
 546      function =(other:Int16):Bit {
 547          return value->builtin_int64 = other.value->builtin_int64
 548      }
 549  
 550      ===Returns `true` if this number is equal to the given number.===
 551      @priority(9)
 552      function =(other:Int32):Bit {
 553          return value->builtin_int64 = other.value->builtin_int64
 554      }
 555  
 556      ===Returns `true` if this number is equal to the given number.===
 557      @priority(13)
 558      function =(other:Int):Bit {
 559          return value->builtin_int64 = other.value->builtin_int64
 560      }
 561  
 562      ===Returns `true` if this number is equal to the given number.===
 563      @priority(4)
 564      function =(other:UInt8):Bit {
 565          return value = other.value->builtin_uint32
 566      }
 567  
 568      ===Returns `true` if this number is equal to the given number.===
 569      @priority(6)
 570      function =(other:UInt16):Bit {
 571          return value = other.value->builtin_uint32
 572      }
 573  
 574      ===Returns `true` if this number is equal to the given number.===
 575      @override
 576      @priority(20)
 577      function =(other:UInt32):Bit {
 578          return value = other.value
 579      }
 580  
 581      ===Returns `true` if this number is equal to the given number.===
 582      @priority(10)
 583      function =(other:UInt64):Bit {
 584          return value->builtin_uint64 = other.value
 585      }
 586  
 587      ===Returns `true` if this number is equal to the given number.===
 588      @priority(12)
 589      function =(other:UInt):Bit {
 590          return value->builtin_uint = other.value
 591      }
 592  
 593      ===Returns `true` if this number is not equal to the given number.===
 594      @priority(5)
 595      function !=(other:Int8):Bit {
 596          return value->builtin_int64 != other.value->builtin_int64
 597      }
 598  
 599      ===Returns `true` if this number is not equal to the given number.===
 600      @priority(7)
 601      function !=(other:Int16):Bit {
 602          return value->builtin_int64 != other.value->builtin_int64
 603      }
 604  
 605      ===Returns `true` if this number is not equal to the given number.===
 606      @priority(9)
 607      function !=(other:Int32):Bit {
 608          return value->builtin_int64 != other.value->builtin_int64
 609      }
 610  
 611      ===Returns `true` if this number is not equal to the given number.===
 612      @priority(13)
 613      function !=(other:Int):Bit {
 614          return value->builtin_int64 != other.value->builtin_int64
 615      }
 616  
 617      ===Returns `true` if this number is not equal to the given number.===
 618      @priority(4)
 619      function !=(other:UInt8):Bit {
 620          return value != other.value->builtin_uint32
 621      }
 622  
 623      ===Returns `true` if this number is not equal to the given number.===
 624      @priority(6)
 625      function !=(other:UInt16):Bit {
 626          return value != other.value->builtin_uint32
 627      }
 628  
 629      ===Returns `true` if this number is not equal to the given number.===
 630      @override
 631      @priority(20)
 632      function !=(other:UInt32):Bit {
 633          return value != other.value
 634      }
 635  
 636      ===Returns `true` if this number is not equal to the given number.===
 637      @priority(10)
 638      function !=(other:UInt64):Bit {
 639          return value->builtin_uint64 != other.value
 640      }
 641  
 642      ===Returns `true` if this number is not equal to the given number.===
 643      @priority(12)
 644      function !=(other:UInt):Bit {
 645          return value->builtin_uint != other.value
 646      }
 647  
 648      ===Returns `true` if this number is less than the given number.===
 649      @priority(5)
 650      function <(other:Int8):Bit {
 651          return value->builtin_int64 < other.value->< other.value->builtin_int64
 652      }
 653  
 654      ===Returns `true` if this number is less than the given number.===
 655      @priority(7)
 656      function <(other:Int16):Bit {
 657          return value->builtin_int64 < other.value->< other.value->builtin_int64
 658      }
 659  
 660      ===Returns `true` if this number is less than the given number.===
 661      @priority(9)
 662      function <(other:Int32):Bit {
 663          return value->builtin_int64 < other.value->< other.value->builtin_int64
 664      }
 665  
 666      ===Returns `true` if this number is less than the given number.===
 667      @priority(13)
 668      function <(other:Int):Bit {
 669          return value->builtin_int64 < other.value->< other.value->builtin_int64
 670      }
 671  
 672      ===Returns `true` if this number is less than the given number.===
 673      @priority(4)
 674      function <(other:UInt8):Bit {
 675          return value < other.value->< other.value->builtin_uint32
 676      }
 677  
 678      ===Returns `true` if this number is less than the given number.===
 679      @priority(6)
 680      function <(other:UInt16):Bit {
 681          return value < other.value->< other.value->builtin_uint32
 682      }
 683  
 684      ===Returns `true` if this number is less than the given number.===
 685      @override
 686      @priority(20)
 687      function <(other:UInt32):Bit {
 688          return value < other.value
 689      }< other.value
 690      }
 691  
 692      ===Returns `true` if this number is less than the given number.===
 693      @priority(10)
 694      function <(other:UInt64):Bit {
 695          return value->builtin_uint64 < other.value
 696      }< other.value
 697      }
 698  
 699      ===Returns `true` if this number is less than the given number.===
 700      @priority(12)
 701      function <(other:UInt):Bit {
 702          return value->builtin_uint < other.value
 703      }< other.value
 704      }
 705  
 706      ===Returns `true` if this number is greater than the given number.===
 707      @priority(5)
 708      function >(other:Int8):Bit {
 709          return value->builtin_int64 > other.value->builtin_int64
 710      }
 711  
 712      ===Returns `true` if this number is greater than the given number.===
 713      @priority(7)
 714      function >(other:Int16):Bit {
 715          return value->builtin_int64 > other.value->builtin_int64
 716      }
 717  
 718      ===Returns `true` if this number is greater than the given number.===
 719      @priority(9)
 720      function >(other:Int32):Bit {
 721          return value->builtin_int64 > other.value->builtin_int64
 722      }
 723  
 724      ===Returns `true` if this number is greater than the given number.===
 725      @priority(13)
 726      function >(other:Int):Bit {
 727          return value->builtin_int64 > other.value->builtin_int64
 728      }
 729  
 730      ===Returns `true` if this number is greater than the given number.===
 731      @priority(4)
 732      function >(other:UInt8):Bit {
 733          return value > other.value->builtin_uint32
 734      }
 735  
 736      ===Returns `true` if this number is greater than the given number.===
 737      @priority(6)
 738      function >(other:UInt16):Bit {
 739          return value > other.value->builtin_uint32
 740      }
 741  
 742      ===Returns `true` if this number is greater than the given number.===
 743      @override
 744      @priority(20)
 745      function >(other:UInt32):Bit {
 746          return value > other.value
 747      }
 748  
 749      ===Returns `true` if this number is greater than the given number.===
 750      @priority(10)
 751      function >(other:UInt64):Bit {
 752          return value->builtin_uint64 > other.value
 753      }
 754  
 755      ===Returns `true` if this number is greater than the given number.===
 756      @priority(12)
 757      function >(other:UInt):Bit {
 758          return value->builtin_uint > other.value
 759      }
 760  
 761      ===Returns `true` if this number is greater than or equal to the given number.===
 762      @priority(5)
 763      function >=(other:Int8):Bit {
 764          return value->builtin_int64 >= other.value->builtin_int64
 765      }
 766  
 767      ===Returns `true` if this number is greater than or equal to the given number.===
 768      @priority(7)
 769      function >=(other:Int16):Bit {
 770          return value->builtin_int64 >= other.value->builtin_int64
 771      }
 772  
 773      ===Returns `true` if this number is greater than or equal to the given number.===
 774      @priority(9)
 775      function >=(other:Int32):Bit {
 776          return value->builtin_int64 >= other.value->builtin_int64
 777      }
 778  
 779      ===Returns `true` if this number is greater than or equal to the given number.===
 780      @priority(13)
 781      function >=(other:Int):Bit {
 782          return value->builtin_int64 >= other.value->builtin_int64
 783      }
 784  
 785      ===Returns `true` if this number is greater than or equal to the given number.===
 786      @priority(4)
 787      function >=(other:UInt8):Bit {
 788          return value >= other.value->builtin_uint32
 789      }
 790  
 791      ===Returns `true` if this number is greater than or equal to the given number.===
 792      @priority(6)
 793      function >=(other:UInt16):Bit {
 794          return value >= other.value->builtin_uint32
 795      }
 796  
 797      ===Returns `true` if this number is greater than or equal to the given number.===
 798      @override
 799      @priority(20)
 800      function >=(other:UInt32):Bit {
 801          return value >= other.value
 802      }
 803  
 804      ===Returns `true` if this number is greater than or equal to the given number.===
 805      @priority(10)
 806      function >=(other:UInt64):Bit {
 807          return value->builtin_uint64 >= other.value
 808      }
 809  
 810      ===Returns `true` if this number is greater than or equal to the given number.===
 811      @priority(12)
 812      function >=(other:UInt):Bit {
 813          return value->builtin_uint >= other.value
 814      }
 815  
 816      ===Returns `true` if this number is less than or equal to the given number.===
 817      @priority(5)
 818      function <=(other:Int8):Bit {
 819          return value->builtin_int64 <= other.value->builtin_int64
 820      }
 821  
 822      ===Returns `true` if this number is less than or equal to the given number.===
 823      @priority(7)
 824      function <=(other:Int16):Bit {
 825          return value->builtin_int64 <= other.value->builtin_int64
 826      }
 827  
 828      ===Returns `true` if this number is less than or equal to the given number.===
 829      @priority(9)
 830      function <=(other:Int32):Bit {
 831          return value->builtin_int64 <= other.value->builtin_int64
 832      }
 833  
 834      ===Returns `true` if this number is less than or equal to the given number.===
 835      @priority(13)
 836      function <=(other:Int):Bit {
 837          return value->builtin_int64 <= other.value->builtin_int64
 838      }
 839  
 840      ===Returns `true` if this number is less than or equal to the given number.===
 841      @priority(4)
 842      function <=(other:UInt8):Bit {
 843          return value <= other.value->builtin_uint32
 844      }
 845  
 846      ===Returns `true` if this number is less than or equal to the given number.===
 847      @priority(6)
 848      function <=(other:UInt16):Bit {
 849          return value <= other.value->builtin_uint32
 850      }
 851  
 852      ===Returns `true` if this number is less than or equal to the given number.===
 853      @override
 854      @priority(20)
 855      function <=(other:UInt32):Bit {
 856          return value <= other.value
 857      }
 858  
 859      ===Returns `true` if this number is less than or equal to the given number.===
 860      @priority(10)
 861      function <=(other:UInt64):Bit {
 862          return value->builtin_uint64 <= other.value
 863      }
 864  
 865      ===Returns `true` if this number is less than or equal to the given number.===
 866      @priority(12)
 867      function <=(other:UInt):Bit {
 868          return value->builtin_uint <= other.value
 869      }
 870      ===Returns a list of all integers in the given range. The list is 'lazy', meaning that it does not actually allocate memory to hold the entire list.===
 871      @class
 872      function [](range:Range<UInt32>):ListView<UInt32> {
 873          return org.frostlang.frost.UInt32List(SteppedRange<UInt32, UInt32>(range.min, range.max, 1, range.inclusive))
 874      }
 875      ===Returns a list of all integers in the given stepped range. The list is 'lazy', meaning that it does not actually allocate memory to hold the entire list.===
 876      @class
 877      function [](range:SteppedRange<UInt32, UInt32>):ListView<UInt32> {
 878          return org.frostlang.frost.UInt32List(range)
 879      }
 880      ===
 881      A view of this number as a collection of bits, with `bits[0]` as the least significant bit.
 882      ===
 883      property bits:ListView<Bit>
 884      function get_bits():ListView<Bit> { return Bits(self) }
 885  
 886      ===The square root of this number.===
 887      property sqrt:Real32
 888      function get_sqrt():Real32 {
 889          return toReal32.sqrt
 890      }
 891  
 892      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 893      @priority(5)
 894      function min(other:Int8):Int64 {
 895          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
 896              return value->builtin_int64
 897          }
 898          return other.value->builtin_int64
 899      }
 900  
 901      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 902      @priority(7)
 903      function min(other:Int16):Int64 {
 904          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
 905              return value->builtin_int64
 906          }
 907          return other.value->builtin_int64
 908      }
 909  
 910      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 911      @priority(9)
 912      function min(other:Int32):Int64 {
 913          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
 914              return value->builtin_int64
 915          }
 916          return other.value->builtin_int64
 917      }
 918  
 919  
 920      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 921      @priority(13)
 922      function min(other:Int):Int64 {
 923          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
 924              return value->builtin_int64
 925          }
 926          return other.value->builtin_int64
 927      }
 928  
 929      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 930      @priority(4)
 931      function min(other:UInt8):UInt32 {
 932          if value < other.value->< other.value->builtin_uint32 {
 933              return value
 934          }
 935          return other.value->builtin_uint32
 936      }
 937  
 938      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 939      @priority(6)
 940      function min(other:UInt16):UInt32 {
 941          if value < other.value->< other.value->builtin_uint32 {
 942              return value
 943          }
 944          return other.value->builtin_uint32
 945      }
 946  
 947      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 948      @priority(20)
 949      function min(other:UInt32):UInt32 {
 950          if value < other.value {< other.value {
 951              return value
 952          }
 953          return other.value
 954      }
 955  
 956      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 957      @priority(10)
 958      function min(other:UInt64):UInt64 {
 959          if value->builtin_uint64 < other.value {< other.value {
 960              return value->builtin_uint64
 961          }
 962          return other.value
 963      }
 964  
 965      ===Returns the smaller (closest to negative infinity) of this number and another number.===
 966      @priority(12)
 967      function min(other:UInt):UInt {
 968          if value->builtin_uint < other.value {< other.value {
 969              return value->builtin_uint
 970          }
 971          return other.value
 972      }
 973  
 974      ===Returns the larger (closest to positive infinity) of this number and another number.===
 975      @priority(5)
 976      function max(other:Int8):Int64 {
 977          if value->builtin_int64 > other.value->builtin_int64 {
 978              return value->builtin_int64
 979          }
 980          return other.value->builtin_int64
 981      }
 982  
 983      ===Returns the larger (closest to positive infinity) of this number and another number.===
 984      @priority(7)
 985      function max(other:Int16):Int64 {
 986          if value->builtin_int64 > other.value->builtin_int64 {
 987              return value->builtin_int64
 988          }
 989          return other.value->builtin_int64
 990      }
 991  
 992      ===Returns the larger (closest to positive infinity) of this number and another number.===
 993      @priority(9)
 994      function max(other:Int32):Int64 {
 995          if value->builtin_int64 > other.value->builtin_int64 {
 996              return value->builtin_int64
 997          }
 998          return other.value->builtin_int64
 999      }
1000  
1001  
1002      ===Returns the larger (closest to positive infinity) of this number and another number.===
1003      @priority(13)
1004      function max(other:Int):Int64 {
1005          if value->builtin_int64 > other.value->builtin_int64 {
1006              return value->builtin_int64
1007          }
1008          return other.value->builtin_int64
1009      }
1010  
1011      ===Returns the larger (closest to positive infinity) of this number and another number.===
1012      @priority(4)
1013      function max(other:UInt8):UInt32 {
1014          if value > other.value->builtin_uint32 {
1015              return value
1016          }
1017          return other.value->builtin_uint32
1018      }
1019  
1020      ===Returns the larger (closest to positive infinity) of this number and another number.===
1021      @priority(6)
1022      function max(other:UInt16):UInt32 {
1023          if value > other.value->builtin_uint32 {
1024              return value
1025          }
1026          return other.value->builtin_uint32
1027      }
1028  
1029      ===Returns the larger (closest to positive infinity) of this number and another number.===
1030      @priority(20)
1031      function max(other:UInt32):UInt32 {
1032          if value > other.value {
1033              return value
1034          }
1035          return other.value
1036      }
1037  
1038      ===Returns the larger (closest to positive infinity) of this number and another number.===
1039      @priority(10)
1040      function max(other:UInt64):UInt64 {
1041          if value->builtin_uint64 > other.value {
1042              return value->builtin_uint64
1043          }
1044          return other.value
1045      }
1046  
1047      ===Returns the larger (closest to positive infinity) of this number and another number.===
1048      @priority(12)
1049      function max(other:UInt):UInt {
1050          if value->builtin_uint > other.value {
1051              return value->builtin_uint
1052          }
1053          return other.value
1054      }
1055  
1056      @override
1057      function get_hash():Int {
1058          return Int(value->builtin_int)
1059      }
1060  
1061      ===The number of `1` bits in this number's binary representation.===
1062      property bitCount:UInt32
1063      @external(frostUInt32_get_bitCount)
1064      function get_bitCount():UInt32
1065  
1066      ===Parses a string as a number in the specified radix. Returns `null` if the parse fails.===
1067      @class
1068      @pre(radix >= 2 & radix <= 36)
1069      function parse(str:String, radix:Int):UInt32? {
1070          def result := Frost.parse(str, radix)
1071          if result == null {
1072              return null
1073          }
1074          return result.asUInt32
1075      }
1076  
1077      ===
1078      This number converted to an Int.
1079      If this number is not in the range of an Int, a safety violation occurs.
1080      ===
1081      property asInt:Int
1082      function get_asInt():Int {
1083      assert self.toUInt64 <= Int.MAX.toUInt64, "UInt32(\{self}) cannot be safely converted to Int"
1084          return Int(value->builtin_int)
1085      }
1086  
1087      ===
1088      This number converted to an Int.
1089      This function never fails, even if the number is not in the range of an Int.
1090      ===
1091      property toInt:Int
1092      function get_toInt():Int {
1093          return Int(value->builtin_int)
1094      }
1095  
1096      ===
1097      This number truncated to an 8 bit signed number.
1098      If this number is not in the range of an 8 bit signed number, a safety violation occurs.
1099      ===
1100      property asInt8:Int8
1101      function get_asInt8():Int8 {
1102      assert self <= Int8.MAX.toUInt32, "UInt32(\{self}) cannot be safely converted to Int8"
1103          return Int8(value->builtin_int8)
1104      }
1105  
1106      ===
1107      This number truncated to an 8 bit signed number.
1108      This function never fails, even if the number is not in the range of an 8 bit signed number.
1109      ===
1110      property toInt8:Int8
1111      function get_toInt8():Int8 {
1112          return Int8(value->builtin_int8)
1113      }
1114  
1115      ===
1116      This number truncated to a 16 bit signed number.
1117      If this number is not in the range of a 16 bit signed number, a safety violation occurs.
1118      ===
1119      property asInt16:Int16
1120      function get_asInt16():Int16 {
1121      assert self <= Int16.MAX.toUInt32, "UInt32(\{self}) cannot be safely converted to Int16"
1122          return Int16(value->builtin_int16)
1123      }
1124  
1125      ===
1126      This number truncated to a 16 bit signed number.
1127      This function never fails, even if the number is not in the range of a 16 bit signed number.
1128      ===
1129      property toInt16:Int16
1130      function get_toInt16():Int16 {
1131          return Int16(value->builtin_int16)
1132      }
1133  
1134      ===
1135      This number reinterpreted as a 32 bit signed number.
1136      If this number is not in the range of a 32 bit signed number, a safety violation occurs.
1137      ===
1138      property asInt32:Int32
1139      function get_asInt32():Int32 {
1140      assert self <= Int32.MAX.toUInt32, "UInt32(\{self}) cannot be safely converted to Int32"
1141          return Int32(value->builtin_int32)
1142      }
1143  
1144      ===
1145      This number reinterpreted as a 32 bit signed number.
1146      This function never fails, even if the number is not in the range of a 32 bit signed number.
1147      ===
1148      property toInt32:Int32
1149      function get_toInt32():Int32 {
1150          return Int32(value->builtin_int32)
1151      }
1152  
1153      ===
1154      This number zero extended to a 64 bit signed number.
1155      ===
1156      property asInt64:Int64
1157      function get_asInt64():Int64 {
1158          return Int64(value->builtin_int64)
1159      }
1160  
1161      ===
1162      This number zero extended to a 64 bit signed number.
1163      ===
1164      property toInt64:Int64
1165      function get_toInt64():Int64 {
1166          return Int64(value->builtin_int64)
1167      }
1168  
1169      ===
1170      This number converted to a UInt.
1171      ===
1172      property asUInt:UInt
1173      function get_asUInt():UInt {
1174          return UInt(value->builtin_uint)
1175      }
1176  
1177      ===
1178      This number converted to a UInt.
1179      ===
1180      property toUInt:UInt
1181      function get_toUInt():UInt {
1182          return UInt(value->builtin_uint)
1183      }
1184  
1185      ===
1186      This number truncated to an 8 bit unsigned number.
1187      If this number is not in the range of an 8 bit unsigned number, a safety violation occurs.
1188      ===
1189      property asUInt8:UInt8
1190      function get_asUInt8():UInt8 {
1191      assert self <= UInt8.MAX.toUInt32, "UInt32(\{self}) cannot be safely converted to UInt8"
1192          return UInt8(value->builtin_uint8)
1193      }
1194  
1195      ===
1196      This number truncated to an 8 bit unsigned number.
1197      This function never fails, even if the number is not in the range of an 8 bit unsigned number.
1198      ===
1199      property toUInt8:UInt8
1200      function get_toUInt8():UInt8 {
1201          return UInt8(value->builtin_uint8)
1202      }
1203  
1204      ===
1205      This number truncated to a 16 bit unsigned number.
1206      If this number is not in the range of a 16 bit unsigned number, a safety violation occurs.
1207      ===
1208      property asUInt16:UInt16
1209      function get_asUInt16():UInt16 {
1210      assert self <= UInt16.MAX.toUInt32, "UInt32(\{self}) cannot be safely converted to UInt16"
1211          return UInt16(value->builtin_uint16)
1212      }
1213  
1214      ===
1215      This number truncated to a 16 bit unsigned number.
1216      This function never fails, even if the number is not in the range of a 16 bit unsigned number.
1217      ===
1218      property toUInt16:UInt16
1219      function get_toUInt16():UInt16 {
1220          return UInt16(value->builtin_uint16)
1221      }
1222  
1223      ===
1224      This number zero extended to a 64 bit unsigned number.
1225      ===
1226      property asUInt64:UInt64
1227      function get_asUInt64():UInt64 {
1228          return UInt64(value->builtin_uint64)
1229      }
1230  
1231      ===
1232      This number zero extended to a 64 bit unsigned number.
1233      ===
1234      property toUInt64:UInt64
1235      function get_toUInt64():UInt64 {
1236          return UInt64(value->builtin_uint64)
1237      }
1238  
1239      ===
1240      This number converted to a 32 bit floating point number.
1241      ===
1242      property asReal32:Real32
1243      function get_asReal32():Real32 {
1244          return Real32(value->builtin_float32)
1245      }
1246  
1247      ===
1248      This number converted to a 32 bit floating point number.
1249      ===
1250      property toReal32:Real32
1251      function get_toReal32():Real32 {
1252          return Real32(value->builtin_float32)
1253      }
1254  
1255      ===
1256      This number converted to a 64 bit floating point number.
1257      ===
1258      property asReal64:Real64
1259      function get_asReal64():Real64 {
1260          return Real64(value->builtin_float64)
1261      }
1262  
1263      ===
1264      This number converted to a 64 bit floating point number.
1265      ===
1266      property toReal64:Real64
1267      function get_toReal64():Real64 {
1268          return Real64(value->builtin_float64)
1269      }
1270  
1271      ===Returns this number converted to a decimal string.===
1272      @override
1273      function get_toString():String {
1274          constant max := 10
1275          def chars := Pointer<Char8>.alloc(max)
1276          var index := max - 1
1277          var value := self
1278          if value >= 0 {
1279              do {
1280                  chars[index] := Char8((value % 10 + 48).asUInt8)
1281                  value := (value // 10)
1282                  index -= 1
1283              }
1284              while value > 0
1285              index += 1
1286          }
1287          else {
1288              do {
1289                  chars[index] := Char8((48 - value % 10).asUInt8)
1290                  value := (value // 10)
1291                  index -= 1
1292              }
1293              while value < 0< 0
1294              chars[index] := "-"
1295          }
1296          def size := max - index
1297          for i in 0 .. size {
1298              chars[i] := chars[i + index]
1299          }
1300          return String(chars, size)
1301      }
1302  
1303      === Returns a formatted representation of this number. Supported format strings are `""`, `"d"`, or `"D"` for decimal, `"b"` or `"B"` for binary, `"o"` or `"O"` for octal, `"x"` for lowercase hexadecimal, and `"X"` for uppercase hexadecimal. ===
1304      @override
1305      function format(fmt:String):String {
1306          return Frost.format(false, self.toUInt64, 0xFFFFFFFF, fmt)
1307      }
1308  }
1309