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  An 8-bit unsigned integer.
  11  ===
  12  class UInt8 : Value, HashKey<UInt8>, Comparable<UInt8>, Formattable {
  13      @private
  14      class Bits : ListView<Bit> {
  15          def value:UInt8
  16          init(value:UInt8) {
  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 8.
  28          ===
  29          @override
  30          function get_count():Int {
  31              return 8
  32          }
  33  
  34          @override
  35          function get_iterator():Iterator<Bit> {
  36              return org.frostlang.frost.IntBitIterator(value.toUInt64, 1 << (8->builtin_uint64 - 1))
  37          }
  38      }
  39      ===
  40      The smallest value this type can hold (0).
  41      ===
  42      constant MIN:UInt8 := 0
  43  
  44      ===
  45      The largest value this type can hold (255).
  46      ===
  47      constant MAX:UInt8 := 255
  48  
  49      @package
  50      def value:builtin_uint8
  51  
  52      ===@hidden===
  53      @implicit
  54      init(value:builtin_uint8) {
  55          self.value := value
  56      }
  57  
  58      ===Adds another number to this number.===
  59      @priority(1)
  60      function +(other:Int8):Int32 {
  61          return value->builtin_int32 + other.value->builtin_int32
  62      }
  63  
  64      ===Adds another number to this number.===
  65      @priority(3)
  66      function +(other:Int16):Int32 {
  67          return value->builtin_int32 + other.value->builtin_int32
  68      }
  69  
  70      ===Adds another number to this number.===
  71      @priority(5)
  72      function +(other:Int32):Int64 {
  73          return value->builtin_int64 + other.value->builtin_int64
  74      }
  75  
  76      ===Adds another number to this number.===
  77      @priority(9)
  78      function +(other:Int):Int64 {
  79          return value->builtin_int64 + other.value->builtin_int64
  80      }
  81  
  82      ===Adds another number to this number.===
  83      @priority(20)
  84      function +(other:UInt8):UInt32 {
  85          return value->builtin_uint32 + other.value->builtin_uint32
  86      }
  87      ===Adds another number to this number.===
  88      @priority(-1)
  89      function +(other:UInt8):UInt8 {
  90          return value + other.value
  91      }
  92  
  93      ===Adds another number to this number.===
  94      @priority(2)
  95      function +(other:UInt16):UInt32 {
  96          return value->builtin_uint32 + other.value->builtin_uint32
  97      }
  98  
  99      ===Adds another number to this number.===
 100      @priority(4)
 101      function +(other:UInt32):UInt32 {
 102          return value->builtin_uint32 + other.value
 103      }
 104  
 105      ===Adds another number to this number.===
 106      @priority(6)
 107      function +(other:UInt64):UInt64 {
 108          return value->builtin_uint64 + other.value
 109      }
 110  
 111      ===Adds another number to this number.===
 112      @priority(8)
 113      function +(other:UInt):UInt {
 114          return value->builtin_uint + other.value
 115      }
 116  
 117      ===Adds another number to this number without checking for overflow.===
 118      @priority(1)
 119      function +&(other:Int8):Int32 {
 120          return value->builtin_int32 +& other.value->builtin_int32
 121      }
 122  
 123      ===Adds another number to this number without checking for overflow.===
 124      @priority(3)
 125      function +&(other:Int16):Int32 {
 126          return value->builtin_int32 +& other.value->builtin_int32
 127      }
 128  
 129      ===Adds another number to this number without checking for overflow.===
 130      @priority(5)
 131      function +&(other:Int32):Int64 {
 132          return value->builtin_int64 +& other.value->builtin_int64
 133      }
 134  
 135      ===Adds another number to this number without checking for overflow.===
 136      @priority(9)
 137      function +&(other:Int):Int64 {
 138          return value->builtin_int64 +& other.value->builtin_int64
 139      }
 140  
 141      ===Adds another number to this number without checking for overflow.===
 142      @priority(20)
 143      function +&(other:UInt8):UInt32 {
 144          return value->builtin_uint32 +& other.value->builtin_uint32
 145      }
 146      ===Adds another number to this number without checking for overflow.===
 147      @priority(-1)
 148      function +&(other:UInt8):UInt8 {
 149          return value +& other.value
 150      }
 151  
 152      ===Adds another number to this number without checking for overflow.===
 153      @priority(2)
 154      function +&(other:UInt16):UInt32 {
 155          return value->builtin_uint32 +& other.value->builtin_uint32
 156      }
 157  
 158      ===Adds another number to this number without checking for overflow.===
 159      @priority(4)
 160      function +&(other:UInt32):UInt32 {
 161          return value->builtin_uint32 +& other.value
 162      }
 163  
 164      ===Adds another number to this number without checking for overflow.===
 165      @priority(6)
 166      function +&(other:UInt64):UInt64 {
 167          return value->builtin_uint64 +& other.value
 168      }
 169  
 170      ===Adds another number to this number without checking for overflow.===
 171      @priority(8)
 172      function +&(other:UInt):UInt {
 173          return value->builtin_uint +& other.value
 174      }
 175  
 176      ===Subtracts another number from this number.===
 177      @priority(1)
 178      function -(other:Int8):Int32 {
 179          return value->builtin_int32 - other.value->builtin_int32
 180      }
 181  
 182      ===Subtracts another number from this number.===
 183      @priority(3)
 184      function -(other:Int16):Int32 {
 185          return value->builtin_int32 - other.value->builtin_int32
 186      }
 187  
 188      ===Subtracts another number from this number.===
 189      @priority(5)
 190      function -(other:Int32):Int64 {
 191          return value->builtin_int64 - other.value->builtin_int64
 192      }
 193  
 194      ===Subtracts another number from this number.===
 195      @priority(9)
 196      function -(other:Int):Int64 {
 197          return value->builtin_int64 - other.value->builtin_int64
 198      }
 199  
 200      ===Subtracts another number from this number.===
 201      @priority(20)
 202      function -(other:UInt8):UInt32 {
 203          return value->builtin_uint32 - other.value->builtin_uint32
 204      }
 205      ===Subtracts another number from this number.===
 206      @priority(-1)
 207      function -(other:UInt8):UInt8 {
 208          return value - other.value
 209      }
 210  
 211      ===Subtracts another number from this number.===
 212      @priority(2)
 213      function -(other:UInt16):UInt32 {
 214          return value->builtin_uint32 - other.value->builtin_uint32
 215      }
 216  
 217      ===Subtracts another number from this number.===
 218      @priority(4)
 219      function -(other:UInt32):UInt32 {
 220          return value->builtin_uint32 - other.value
 221      }
 222  
 223      ===Subtracts another number from this number.===
 224      @priority(6)
 225      function -(other:UInt64):UInt64 {
 226          return value->builtin_uint64 - other.value
 227      }
 228  
 229      ===Subtracts another number from this number.===
 230      @priority(8)
 231      function -(other:UInt):UInt {
 232          return value->builtin_uint - other.value
 233      }
 234  
 235      ===Subtracts another number from this number without checking for overflow.===
 236      @priority(1)
 237      function -&(other:Int8):Int32 {
 238          return value->builtin_int32 -& other.value->builtin_int32
 239      }
 240  
 241      ===Subtracts another number from this number without checking for overflow.===
 242      @priority(3)
 243      function -&(other:Int16):Int32 {
 244          return value->builtin_int32 -& other.value->builtin_int32
 245      }
 246  
 247      ===Subtracts another number from this number without checking for overflow.===
 248      @priority(5)
 249      function -&(other:Int32):Int64 {
 250          return value->builtin_int64 -& other.value->builtin_int64
 251      }
 252  
 253      ===Subtracts another number from this number without checking for overflow.===
 254      @priority(9)
 255      function -&(other:Int):Int64 {
 256          return value->builtin_int64 -& other.value->builtin_int64
 257      }
 258  
 259      ===Subtracts another number from this number without checking for overflow.===
 260      @priority(20)
 261      function -&(other:UInt8):UInt32 {
 262          return value->builtin_uint32 -& other.value->builtin_uint32
 263      }
 264      ===Subtracts another number from this number without checking for overflow.===
 265      @priority(-1)
 266      function -&(other:UInt8):UInt8 {
 267          return value -& other.value
 268      }
 269  
 270      ===Subtracts another number from this number without checking for overflow.===
 271      @priority(2)
 272      function -&(other:UInt16):UInt32 {
 273          return value->builtin_uint32 -& other.value->builtin_uint32
 274      }
 275  
 276      ===Subtracts another number from this number without checking for overflow.===
 277      @priority(4)
 278      function -&(other:UInt32):UInt32 {
 279          return value->builtin_uint32 -& other.value
 280      }
 281  
 282      ===Subtracts another number from this number without checking for overflow.===
 283      @priority(6)
 284      function -&(other:UInt64):UInt64 {
 285          return value->builtin_uint64 -& other.value
 286      }
 287  
 288      ===Subtracts another number from this number without checking for overflow.===
 289      @priority(8)
 290      function -&(other:UInt):UInt {
 291          return value->builtin_uint -& other.value
 292      }
 293  
 294      ===Returns the negation (additive inverse) of this number===
 295      function -():UInt8 {
 296          return UInt8(-value)
 297      }
 298  
 299      ===Multiplies this number by another number.===
 300      @priority(1)
 301      function *(other:Int8):Int32 {
 302          return value->builtin_int32 * other.value->builtin_int32
 303      }
 304  
 305      ===Multiplies this number by another number.===
 306      @priority(3)
 307      function *(other:Int16):Int32 {
 308          return value->builtin_int32 * other.value->builtin_int32
 309      }
 310  
 311      ===Multiplies this number by another number.===
 312      @priority(5)
 313      function *(other:Int32):Int64 {
 314          return value->builtin_int64 * other.value->builtin_int64
 315      }
 316  
 317      ===Multiplies this number by another number.===
 318      @priority(9)
 319      function *(other:Int):Int64 {
 320          return value->builtin_int64 * other.value->builtin_int64
 321      }
 322  
 323      ===Multiplies this number by another number.===
 324      @priority(20)
 325      function *(other:UInt8):UInt32 {
 326          return value->builtin_uint32 * other.value->builtin_uint32
 327      }
 328      ===Multiplies this number by another number.===
 329      @priority(-1)
 330      function *(other:UInt8):UInt8 {
 331          return value * other.value
 332      }
 333  
 334      ===Multiplies this number by another number.===
 335      @priority(2)
 336      function *(other:UInt16):UInt32 {
 337          return value->builtin_uint32 * other.value->builtin_uint32
 338      }
 339  
 340      ===Multiplies this number by another number.===
 341      @priority(4)
 342      function *(other:UInt32):UInt32 {
 343          return value->builtin_uint32 * other.value
 344      }
 345  
 346      ===Multiplies this number by another number.===
 347      @priority(6)
 348      function *(other:UInt64):UInt64 {
 349          return value->builtin_uint64 * other.value
 350      }
 351  
 352      ===Multiplies this number by another number.===
 353      @priority(8)
 354      function *(other:UInt):UInt {
 355          return value->builtin_uint * other.value
 356      }
 357  
 358      ===Multiplies this number by another number without checking for overflow.===
 359      @priority(1)
 360      function *&(other:Int8):Int32 {
 361          return value->builtin_int32 *& other.value->builtin_int32
 362      }
 363  
 364      ===Multiplies this number by another number without checking for overflow.===
 365      @priority(3)
 366      function *&(other:Int16):Int32 {
 367          return value->builtin_int32 *& other.value->builtin_int32
 368      }
 369  
 370      ===Multiplies this number by another number without checking for overflow.===
 371      @priority(5)
 372      function *&(other:Int32):Int64 {
 373          return value->builtin_int64 *& other.value->builtin_int64
 374      }
 375  
 376      ===Multiplies this number by another number without checking for overflow.===
 377      @priority(9)
 378      function *&(other:Int):Int64 {
 379          return value->builtin_int64 *& other.value->builtin_int64
 380      }
 381  
 382      ===Multiplies this number by another number without checking for overflow.===
 383      @priority(20)
 384      function *&(other:UInt8):UInt32 {
 385          return value->builtin_uint32 *& other.value->builtin_uint32
 386      }
 387      ===Multiplies this number by another number without checking for overflow.===
 388      @priority(-1)
 389      function *&(other:UInt8):UInt8 {
 390          return value *& other.value
 391      }
 392  
 393      ===Multiplies this number by another number without checking for overflow.===
 394      @priority(2)
 395      function *&(other:UInt16):UInt32 {
 396          return value->builtin_uint32 *& other.value->builtin_uint32
 397      }
 398  
 399      ===Multiplies this number by another number without checking for overflow.===
 400      @priority(4)
 401      function *&(other:UInt32):UInt32 {
 402          return value->builtin_uint32 *& other.value
 403      }
 404  
 405      ===Multiplies this number by another number without checking for overflow.===
 406      @priority(6)
 407      function *&(other:UInt64):UInt64 {
 408          return value->builtin_uint64 *& other.value
 409      }
 410  
 411      ===Multiplies this number by another number without checking for overflow.===
 412      @priority(8)
 413      function *&(other:UInt):UInt {
 414          return value->builtin_uint *& other.value
 415      }
 416  
 417      ===Divides this number by another number, returning the whole number portion.===
 418      @priority(1)
 419      function //(other:Int8):Int32 {
 420          return value->builtin_int32 // other.value->builtin_int32
 421      }
 422  
 423      ===Divides this number by another number, returning the whole number portion.===
 424      @priority(3)
 425      function //(other:Int16):Int32 {
 426          return value->builtin_int32 // other.value->builtin_int32
 427      }
 428  
 429      ===Divides this number by another number, returning the whole number portion.===
 430      @priority(5)
 431      function //(other:Int32):Int64 {
 432          return value->builtin_int64 // other.value->builtin_int64
 433      }
 434  
 435      ===Divides this number by another number, returning the whole number portion.===
 436      @priority(9)
 437      function //(other:Int):Int64 {
 438          return value->builtin_int64 // other.value->builtin_int64
 439      }
 440  
 441      ===Divides this number by another number, returning the whole number portion.===
 442      @priority(20)
 443      function //(other:UInt8):UInt32 {
 444          return value->builtin_uint32 // other.value->builtin_uint32
 445      }
 446      ===Divides this number by another number, returning the whole number portion.===
 447      @priority(-1)
 448      function //(other:UInt8):UInt8 {
 449          return value // other.value
 450      }
 451  
 452      ===Divides this number by another number, returning the whole number portion.===
 453      @priority(2)
 454      function //(other:UInt16):UInt32 {
 455          return value->builtin_uint32 // other.value->builtin_uint32
 456      }
 457  
 458      ===Divides this number by another number, returning the whole number portion.===
 459      @priority(4)
 460      function //(other:UInt32):UInt32 {
 461          return value->builtin_uint32 // other.value
 462      }
 463  
 464      ===Divides this number by another number, returning the whole number portion.===
 465      @priority(6)
 466      function //(other:UInt64):UInt64 {
 467          return value->builtin_uint64 // other.value
 468      }
 469  
 470      ===Divides this number by another number, returning the whole number portion.===
 471      @priority(8)
 472      function //(other:UInt):UInt {
 473          return value->builtin_uint // other.value
 474      }
 475  
 476      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 477      @priority(1)
 478      function //&(other:Int8):Int32 {
 479          return value->builtin_int32 //& other.value->builtin_int32
 480      }
 481  
 482      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 483      @priority(3)
 484      function //&(other:Int16):Int32 {
 485          return value->builtin_int32 //& other.value->builtin_int32
 486      }
 487  
 488      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 489      @priority(5)
 490      function //&(other:Int32):Int64 {
 491          return value->builtin_int64 //& other.value->builtin_int64
 492      }
 493  
 494      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 495      @priority(9)
 496      function //&(other:Int):Int64 {
 497          return value->builtin_int64 //& other.value->builtin_int64
 498      }
 499  
 500      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 501      @priority(20)
 502      function //&(other:UInt8):UInt32 {
 503          return value->builtin_uint32 //& other.value->builtin_uint32
 504      }
 505      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 506      @priority(-1)
 507      function //&(other:UInt8):UInt8 {
 508          return value //& other.value
 509      }
 510  
 511      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 512      @priority(2)
 513      function //&(other:UInt16):UInt32 {
 514          return value->builtin_uint32 //& other.value->builtin_uint32
 515      }
 516  
 517      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 518      @priority(4)
 519      function //&(other:UInt32):UInt32 {
 520          return value->builtin_uint32 //& other.value
 521      }
 522  
 523      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 524      @priority(6)
 525      function //&(other:UInt64):UInt64 {
 526          return value->builtin_uint64 //& other.value
 527      }
 528  
 529      ===Divides this number by another number, returning the whole number portion, without checking for overflow.===
 530      @priority(8)
 531      function //&(other:UInt):UInt {
 532          return value->builtin_uint //& other.value
 533      }
 534  
 535      ===Returns the remainder of dividing this number by another number.===
 536      @priority(1)
 537      function %(other:Int8):Int32 {
 538          return value->builtin_int32 % other.value->builtin_int32
 539      }
 540  
 541      ===Returns the remainder of dividing this number by another number.===
 542      @priority(3)
 543      function %(other:Int16):Int32 {
 544          return value->builtin_int32 % other.value->builtin_int32
 545      }
 546  
 547      ===Returns the remainder of dividing this number by another number.===
 548      @priority(5)
 549      function %(other:Int32):Int64 {
 550          return value->builtin_int64 % other.value->builtin_int64
 551      }
 552  
 553      ===Returns the remainder of dividing this number by another number.===
 554      @priority(9)
 555      function %(other:Int):Int64 {
 556          return value->builtin_int64 % other.value->builtin_int64
 557      }
 558  
 559      ===Returns the remainder of dividing this number by another number.===
 560      @priority(20)
 561      function %(other:UInt8):UInt32 {
 562          return value->builtin_uint32 % other.value->builtin_uint32
 563      }
 564      ===Returns the remainder of dividing this number by another number.===
 565      @priority(-1)
 566      function %(other:UInt8):UInt8 {
 567          return value % other.value
 568      }
 569  
 570      ===Returns the remainder of dividing this number by another number.===
 571      @priority(2)
 572      function %(other:UInt16):UInt32 {
 573          return value->builtin_uint32 % other.value->builtin_uint32
 574      }
 575  
 576      ===Returns the remainder of dividing this number by another number.===
 577      @priority(4)
 578      function %(other:UInt32):UInt32 {
 579          return value->builtin_uint32 % other.value
 580      }
 581  
 582      ===Returns the remainder of dividing this number by another number.===
 583      @priority(6)
 584      function %(other:UInt64):UInt64 {
 585          return value->builtin_uint64 % other.value
 586      }
 587  
 588      ===Returns the remainder of dividing this number by another number.===
 589      @priority(8)
 590      function %(other:UInt):UInt {
 591          return value->builtin_uint % other.value
 592      }
 593  
 594      ===Divides this number by another number.===
 595      @priority(1)
 596      function /(other:Int8):Real32 {
 597          return value->builtin_float32 / other.value->builtin_float32
 598      }
 599  
 600      ===Divides this number by another number.===
 601      @priority(3)
 602      function /(other:Int16):Real32 {
 603          return value->builtin_float32 / other.value->builtin_float32
 604      }
 605  
 606      ===Divides this number by another number.===
 607      @priority(5)
 608      function /(other:Int32):Real32 {
 609          return value->builtin_float32 / other.value->builtin_float32
 610      }
 611  
 612      ===Divides this number by another number.===
 613      @priority(7)
 614      function /(other:Int64):Real64 {
 615          return value->builtin_float64 / other.value->builtin_float64
 616      }
 617  
 618      ===Divides this number by another number.===
 619      @priority(20)
 620      function /(other:UInt8):Real32 {
 621          return value->builtin_float32 / other.value->builtin_float32
 622      }
 623  
 624      ===Divides this number by another number.===
 625      @priority(2)
 626      function /(other:UInt16):Real32 {
 627          return value->builtin_float32 / other.value->builtin_float32
 628      }
 629  
 630      ===Divides this number by another number.===
 631      @priority(4)
 632      function /(other:UInt32):Real32 {
 633          return value->builtin_float32 / other.value->builtin_float32
 634      }
 635  
 636      ===Divides this number by another number.===
 637      @priority(6)
 638      function /(other:UInt64):Real64 {
 639          return value->builtin_float64 / other.value->builtin_float64
 640      }
 641  
 642      ===Divides this number by another number.===
 643      @priority(10)
 644      function /(other:Real32):Real32 {
 645          return value->builtin_float32 / other.value
 646      }
 647  
 648      ===Divides this number by another number.===
 649      @priority(11)
 650      function /(other:Real64):Real64 {
 651          return value->builtin_float64 / other.value
 652      }
 653  
 654      ===Returns the bitwise NOT of this number.===
 655      function !!():UInt8 {
 656          return UInt8(!!value)
 657      }
 658  
 659      ===Returns the bitwise AND of this number with another number.===
 660      @priority(1)
 661      function &&(other:Int8):Int32 {
 662          return value->builtin_int32 && other.value->builtin_int32
 663      }
 664  
 665      ===Returns the bitwise AND of this number with another number.===
 666      @priority(3)
 667      function &&(other:Int16):Int32 {
 668          return value->builtin_int32 && other.value->builtin_int32
 669      }
 670  
 671      ===Returns the bitwise AND of this number with another number.===
 672      @priority(5)
 673      function &&(other:Int32):Int32 {
 674          return value->builtin_int32 && other.value
 675      }
 676  
 677      ===Returns the bitwise AND of this number with another number.===
 678      @priority(7)
 679      function &&(other:Int64):Int64 {
 680          return value->builtin_int64 && other.value
 681      }
 682  
 683      ===Returns the bitwise AND of this number with another number.===
 684      @priority(9)
 685      function &&(other:Int):Int {
 686          return value->builtin_int && other.value
 687      }
 688  
 689      ===Returns the bitwise AND of this number with another number.===
 690      @priority(20)
 691      function &&(other:UInt8):UInt32 {
 692          return value->builtin_uint32 && other.value->builtin_uint32
 693      }
 694      ===Returns the bitwise AND of this number with another number.===
 695      @priority(-1)
 696      function &&(other:UInt8):UInt8 {
 697          return value && other.value
 698      }
 699  
 700      ===Returns the bitwise AND of this number with another number.===
 701      @priority(2)
 702      function &&(other:UInt16):UInt32 {
 703          return value->builtin_uint32 && other.value->builtin_uint32
 704      }
 705  
 706      ===Returns the bitwise AND of this number with another number.===
 707      @priority(4)
 708      function &&(other:UInt32):UInt32 {
 709          return value->builtin_uint32 && other.value
 710      }
 711  
 712      ===Returns the bitwise AND of this number with another number.===
 713      @priority(6)
 714      function &&(other:UInt64):UInt64 {
 715          return value->builtin_uint64 && other.value
 716      }
 717  
 718      ===Returns the bitwise AND of this number with another number.===
 719      @priority(8)
 720      function &&(other:UInt):UInt {
 721          return value->builtin_uint && other.value
 722      }
 723  
 724      ===Returns the bitwise OR of this number with another number.===
 725      @priority(1)
 726      function ||(other:Int8):Int32 {
 727          return value->builtin_int32 || other.value->builtin_int32
 728      }
 729  
 730      ===Returns the bitwise OR of this number with another number.===
 731      @priority(3)
 732      function ||(other:Int16):Int32 {
 733          return value->builtin_int32 || other.value->builtin_int32
 734      }
 735  
 736      ===Returns the bitwise OR of this number with another number.===
 737      @priority(5)
 738      function ||(other:Int32):Int32 {
 739          return value->builtin_int32 || other.value
 740      }
 741  
 742      ===Returns the bitwise OR of this number with another number.===
 743      @priority(7)
 744      function ||(other:Int64):Int64 {
 745          return value->builtin_int64 || other.value
 746      }
 747  
 748      ===Returns the bitwise OR of this number with another number.===
 749      @priority(9)
 750      function ||(other:Int):Int {
 751          return value->builtin_int || other.value
 752      }
 753  
 754      ===Returns the bitwise OR of this number with another number.===
 755      @priority(20)
 756      function ||(other:UInt8):UInt32 {
 757          return value->builtin_uint32 || other.value->builtin_uint32
 758      }
 759      ===Returns the bitwise OR of this number with another number.===
 760      @priority(-1)
 761      function ||(other:UInt8):UInt8 {
 762          return value || other.value
 763      }
 764  
 765      ===Returns the bitwise OR of this number with another number.===
 766      @priority(2)
 767      function ||(other:UInt16):UInt32 {
 768          return value->builtin_uint32 || other.value->builtin_uint32
 769      }
 770  
 771      ===Returns the bitwise OR of this number with another number.===
 772      @priority(4)
 773      function ||(other:UInt32):UInt32 {
 774          return value->builtin_uint32 || other.value
 775      }
 776  
 777      ===Returns the bitwise OR of this number with another number.===
 778      @priority(6)
 779      function ||(other:UInt64):UInt64 {
 780          return value->builtin_uint64 || other.value
 781      }
 782  
 783      ===Returns the bitwise OR of this number with another number.===
 784      @priority(8)
 785      function ||(other:UInt):UInt {
 786          return value->builtin_uint || other.value
 787      }
 788  
 789      ===Returns the bitwise XOR of this number with another number.===
 790      @priority(1)
 791      function ~~(other:Int8):Int32 {
 792          return value->builtin_int32 ~~ other.value->builtin_int32
 793      }
 794  
 795      ===Returns the bitwise XOR of this number with another number.===
 796      @priority(3)
 797      function ~~(other:Int16):Int32 {
 798          return value->builtin_int32 ~~ other.value->builtin_int32
 799      }
 800  
 801      ===Returns the bitwise XOR of this number with another number.===
 802      @priority(5)
 803      function ~~(other:Int32):Int32 {
 804          return value->builtin_int32 ~~ other.value
 805      }
 806  
 807      ===Returns the bitwise XOR of this number with another number.===
 808      @priority(7)
 809      function ~~(other:Int64):Int64 {
 810          return value->builtin_int64 ~~ other.value
 811      }
 812  
 813      ===Returns the bitwise XOR of this number with another number.===
 814      @priority(9)
 815      function ~~(other:Int):Int {
 816          return value->builtin_int ~~ other.value
 817      }
 818  
 819      ===Returns the bitwise XOR of this number with another number.===
 820      @priority(20)
 821      function ~~(other:UInt8):UInt32 {
 822          return value->builtin_uint32 ~~ other.value->builtin_uint32
 823      }
 824      ===Returns the bitwise XOR of this number with another number.===
 825      @priority(-1)
 826      function ~~(other:UInt8):UInt8 {
 827          return value ~~ other.value
 828      }
 829  
 830      ===Returns the bitwise XOR of this number with another number.===
 831      @priority(2)
 832      function ~~(other:UInt16):UInt32 {
 833          return value->builtin_uint32 ~~ other.value->builtin_uint32
 834      }
 835  
 836      ===Returns the bitwise XOR of this number with another number.===
 837      @priority(4)
 838      function ~~(other:UInt32):UInt32 {
 839          return value->builtin_uint32 ~~ other.value
 840      }
 841  
 842      ===Returns the bitwise XOR of this number with another number.===
 843      @priority(6)
 844      function ~~(other:UInt64):UInt64 {
 845          return value->builtin_uint64 ~~ other.value
 846      }
 847  
 848      ===Returns the bitwise XOR of this number with another number.===
 849      @priority(8)
 850      function ~~(other:UInt):UInt {
 851          return value->builtin_uint ~~ other.value
 852      }
 853  
 854      ===Returns this number shifted left by the specified number of bits.===
 855      @priority(20)
 856      function <<(other:UInt8):UInt32 {
 857          return value->builtin_uint32 << other.value->builtin_uint32
 858      }
 859      ===Returns this number shifted left by the specified number of bits.===
 860      @priority(-1)
 861      function <<(other:UInt8):UInt8 {
 862          return value << other.value
 863      }
 864  
 865      ===Returns this number shifted left by the specified number of bits, without checking for overflow.===
 866      @priority(20)
 867      function <<&(other:UInt8):UInt32 {
 868          return value->builtin_uint32 <<& other.value->builtin_uint32
 869      }
 870      ===Returns this number shifted left by the specified number of bits, without checking for overflow.===
 871      @priority(-1)
 872      function <<&(other:UInt8):UInt8 {
 873          return value <<& other.value
 874      }
 875  
 876      ===Returns this number logical shifted right by the specified number of bits.===
 877      @priority(20)
 878      function >>(other:UInt8):UInt32 {
 879          return value->builtin_uint32 >> other.value->builtin_uint32
 880      }
 881      ===Returns this number logical shifted right by the specified number of bits.===
 882      @priority(-1)
 883      function >>(other:UInt8):UInt8 {
 884          return value >> other.value
 885      }
 886  
 887      ===Returns `true` if this number is equal to the given number.===
 888      @priority(1)
 889      function =(other:Int8):Bit {
 890          return value->builtin_int16 = other.value->builtin_int16
 891      }
 892  
 893      ===Returns `true` if this number is equal to the given number.===
 894      @priority(3)
 895      function =(other:Int16):Bit {
 896          return value->builtin_int32 = other.value->builtin_int32
 897      }
 898  
 899      ===Returns `true` if this number is equal to the given number.===
 900      @priority(5)
 901      function =(other:Int32):Bit {
 902          return value->builtin_int64 = other.value->builtin_int64
 903      }
 904  
 905      ===Returns `true` if this number is equal to the given number.===
 906      @priority(9)
 907      function =(other:Int):Bit {
 908          return value->builtin_int64 = other.value->builtin_int64
 909      }
 910  
 911      ===Returns `true` if this number is equal to the given number.===
 912      @override
 913      @priority(20)
 914      function =(other:UInt8):Bit {
 915          return value = other.value
 916      }
 917  
 918      ===Returns `true` if this number is equal to the given number.===
 919      @priority(2)
 920      function =(other:UInt16):Bit {
 921          return value->builtin_uint16 = other.value
 922      }
 923  
 924      ===Returns `true` if this number is equal to the given number.===
 925      @priority(4)
 926      function =(other:UInt32):Bit {
 927          return value->builtin_uint32 = other.value
 928      }
 929  
 930      ===Returns `true` if this number is equal to the given number.===
 931      @priority(6)
 932      function =(other:UInt64):Bit {
 933          return value->builtin_uint64 = other.value
 934      }
 935  
 936      ===Returns `true` if this number is equal to the given number.===
 937      @priority(8)
 938      function =(other:UInt):Bit {
 939          return value->builtin_uint = other.value
 940      }
 941  
 942      ===Returns `true` if this number is not equal to the given number.===
 943      @priority(1)
 944      function !=(other:Int8):Bit {
 945          return value->builtin_int16 != other.value->builtin_int16
 946      }
 947  
 948      ===Returns `true` if this number is not equal to the given number.===
 949      @priority(3)
 950      function !=(other:Int16):Bit {
 951          return value->builtin_int32 != other.value->builtin_int32
 952      }
 953  
 954      ===Returns `true` if this number is not equal to the given number.===
 955      @priority(5)
 956      function !=(other:Int32):Bit {
 957          return value->builtin_int64 != other.value->builtin_int64
 958      }
 959  
 960      ===Returns `true` if this number is not equal to the given number.===
 961      @priority(9)
 962      function !=(other:Int):Bit {
 963          return value->builtin_int64 != other.value->builtin_int64
 964      }
 965  
 966      ===Returns `true` if this number is not equal to the given number.===
 967      @override
 968      @priority(20)
 969      function !=(other:UInt8):Bit {
 970          return value != other.value
 971      }
 972  
 973      ===Returns `true` if this number is not equal to the given number.===
 974      @priority(2)
 975      function !=(other:UInt16):Bit {
 976          return value->builtin_uint16 != other.value
 977      }
 978  
 979      ===Returns `true` if this number is not equal to the given number.===
 980      @priority(4)
 981      function !=(other:UInt32):Bit {
 982          return value->builtin_uint32 != other.value
 983      }
 984  
 985      ===Returns `true` if this number is not equal to the given number.===
 986      @priority(6)
 987      function !=(other:UInt64):Bit {
 988          return value->builtin_uint64 != other.value
 989      }
 990  
 991      ===Returns `true` if this number is not equal to the given number.===
 992      @priority(8)
 993      function !=(other:UInt):Bit {
 994          return value->builtin_uint != other.value
 995      }
 996  
 997      ===Returns `true` if this number is less than the given number.===
 998      @priority(1)
 999      function <(other:Int8):Bit {
1000          return value->builtin_int16 < other.value->< other.value->builtin_int16
1001      }
1002  
1003      ===Returns `true` if this number is less than the given number.===
1004      @priority(3)
1005      function <(other:Int16):Bit {
1006          return value->builtin_int32 < other.value->< other.value->builtin_int32
1007      }
1008  
1009      ===Returns `true` if this number is less than the given number.===
1010      @priority(5)
1011      function <(other:Int32):Bit {
1012          return value->builtin_int64 < other.value->< other.value->builtin_int64
1013      }
1014  
1015      ===Returns `true` if this number is less than the given number.===
1016      @priority(9)
1017      function <(other:Int):Bit {
1018          return value->builtin_int64 < other.value->< other.value->builtin_int64
1019      }
1020  
1021      ===Returns `true` if this number is less than the given number.===
1022      @override
1023      @priority(20)
1024      function <(other:UInt8):Bit {
1025          return value < other.value
1026      }< other.value
1027      }
1028  
1029      ===Returns `true` if this number is less than the given number.===
1030      @priority(2)
1031      function <(other:UInt16):Bit {
1032          return value->builtin_uint16 < other.value
1033      }< other.value
1034      }
1035  
1036      ===Returns `true` if this number is less than the given number.===
1037      @priority(4)
1038      function <(other:UInt32):Bit {
1039          return value->builtin_uint32 < other.value
1040      }< other.value
1041      }
1042  
1043      ===Returns `true` if this number is less than the given number.===
1044      @priority(6)
1045      function <(other:UInt64):Bit {
1046          return value->builtin_uint64 < other.value
1047      }< other.value
1048      }
1049  
1050      ===Returns `true` if this number is less than the given number.===
1051      @priority(8)
1052      function <(other:UInt):Bit {
1053          return value->builtin_uint < other.value
1054      }< other.value
1055      }
1056  
1057      ===Returns `true` if this number is greater than the given number.===
1058      @priority(1)
1059      function >(other:Int8):Bit {
1060          return value->builtin_int16 > other.value->builtin_int16
1061      }
1062  
1063      ===Returns `true` if this number is greater than the given number.===
1064      @priority(3)
1065      function >(other:Int16):Bit {
1066          return value->builtin_int32 > other.value->builtin_int32
1067      }
1068  
1069      ===Returns `true` if this number is greater than the given number.===
1070      @priority(5)
1071      function >(other:Int32):Bit {
1072          return value->builtin_int64 > other.value->builtin_int64
1073      }
1074  
1075      ===Returns `true` if this number is greater than the given number.===
1076      @priority(9)
1077      function >(other:Int):Bit {
1078          return value->builtin_int64 > other.value->builtin_int64
1079      }
1080  
1081      ===Returns `true` if this number is greater than the given number.===
1082      @override
1083      @priority(20)
1084      function >(other:UInt8):Bit {
1085          return value > other.value
1086      }
1087  
1088      ===Returns `true` if this number is greater than the given number.===
1089      @priority(2)
1090      function >(other:UInt16):Bit {
1091          return value->builtin_uint16 > other.value
1092      }
1093  
1094      ===Returns `true` if this number is greater than the given number.===
1095      @priority(4)
1096      function >(other:UInt32):Bit {
1097          return value->builtin_uint32 > other.value
1098      }
1099  
1100      ===Returns `true` if this number is greater than the given number.===
1101      @priority(6)
1102      function >(other:UInt64):Bit {
1103          return value->builtin_uint64 > other.value
1104      }
1105  
1106      ===Returns `true` if this number is greater than the given number.===
1107      @priority(8)
1108      function >(other:UInt):Bit {
1109          return value->builtin_uint > other.value
1110      }
1111  
1112      ===Returns `true` if this number is greater than or equal to the given number.===
1113      @priority(1)
1114      function >=(other:Int8):Bit {
1115          return value->builtin_int16 >= other.value->builtin_int16
1116      }
1117  
1118      ===Returns `true` if this number is greater than or equal to the given number.===
1119      @priority(3)
1120      function >=(other:Int16):Bit {
1121          return value->builtin_int32 >= other.value->builtin_int32
1122      }
1123  
1124      ===Returns `true` if this number is greater than or equal to the given number.===
1125      @priority(5)
1126      function >=(other:Int32):Bit {
1127          return value->builtin_int64 >= other.value->builtin_int64
1128      }
1129  
1130      ===Returns `true` if this number is greater than or equal to the given number.===
1131      @priority(9)
1132      function >=(other:Int):Bit {
1133          return value->builtin_int64 >= other.value->builtin_int64
1134      }
1135  
1136      ===Returns `true` if this number is greater than or equal to the given number.===
1137      @override
1138      @priority(20)
1139      function >=(other:UInt8):Bit {
1140          return value >= other.value
1141      }
1142  
1143      ===Returns `true` if this number is greater than or equal to the given number.===
1144      @priority(2)
1145      function >=(other:UInt16):Bit {
1146          return value->builtin_uint16 >= other.value
1147      }
1148  
1149      ===Returns `true` if this number is greater than or equal to the given number.===
1150      @priority(4)
1151      function >=(other:UInt32):Bit {
1152          return value->builtin_uint32 >= other.value
1153      }
1154  
1155      ===Returns `true` if this number is greater than or equal to the given number.===
1156      @priority(6)
1157      function >=(other:UInt64):Bit {
1158          return value->builtin_uint64 >= other.value
1159      }
1160  
1161      ===Returns `true` if this number is greater than or equal to the given number.===
1162      @priority(8)
1163      function >=(other:UInt):Bit {
1164          return value->builtin_uint >= other.value
1165      }
1166  
1167      ===Returns `true` if this number is less than or equal to the given number.===
1168      @priority(1)
1169      function <=(other:Int8):Bit {
1170          return value->builtin_int16 <= other.value->builtin_int16
1171      }
1172  
1173      ===Returns `true` if this number is less than or equal to the given number.===
1174      @priority(3)
1175      function <=(other:Int16):Bit {
1176          return value->builtin_int32 <= other.value->builtin_int32
1177      }
1178  
1179      ===Returns `true` if this number is less than or equal to the given number.===
1180      @priority(5)
1181      function <=(other:Int32):Bit {
1182          return value->builtin_int64 <= other.value->builtin_int64
1183      }
1184  
1185      ===Returns `true` if this number is less than or equal to the given number.===
1186      @priority(9)
1187      function <=(other:Int):Bit {
1188          return value->builtin_int64 <= other.value->builtin_int64
1189      }
1190  
1191      ===Returns `true` if this number is less than or equal to the given number.===
1192      @override
1193      @priority(20)
1194      function <=(other:UInt8):Bit {
1195          return value <= other.value
1196      }
1197  
1198      ===Returns `true` if this number is less than or equal to the given number.===
1199      @priority(2)
1200      function <=(other:UInt16):Bit {
1201          return value->builtin_uint16 <= other.value
1202      }
1203  
1204      ===Returns `true` if this number is less than or equal to the given number.===
1205      @priority(4)
1206      function <=(other:UInt32):Bit {
1207          return value->builtin_uint32 <= other.value
1208      }
1209  
1210      ===Returns `true` if this number is less than or equal to the given number.===
1211      @priority(6)
1212      function <=(other:UInt64):Bit {
1213          return value->builtin_uint64 <= other.value
1214      }
1215  
1216      ===Returns `true` if this number is less than or equal to the given number.===
1217      @priority(8)
1218      function <=(other:UInt):Bit {
1219          return value->builtin_uint <= other.value
1220      }
1221      ===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.===
1222      @class
1223      function [](range:Range<UInt8>):ListView<UInt8> {
1224          return org.frostlang.frost.UInt8List(SteppedRange<UInt8, UInt8>(range.min, range.max, 1, range.inclusive))
1225      }
1226      ===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.===
1227      @class
1228      function [](range:SteppedRange<UInt8, UInt8>):ListView<UInt8> {
1229          return org.frostlang.frost.UInt8List(range)
1230      }
1231      ===
1232      A view of this number as a collection of bits, with `bits[0]` as the least significant bit.
1233      ===
1234      property bits:ListView<Bit>
1235      function get_bits():ListView<Bit> { return Bits(self) }
1236  
1237      ===The square root of this number.===
1238      property sqrt:Real32
1239      function get_sqrt():Real32 {
1240          return toReal32.sqrt
1241      }
1242  
1243      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1244      @priority(1)
1245      function min(other:Int8):Int16 {
1246          if value->builtin_int16 < other.value->< other.value->builtin_int16 {
1247              return value->builtin_int16
1248          }
1249          return other.value->builtin_int16
1250      }
1251  
1252      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1253      @priority(3)
1254      function min(other:Int16):Int32 {
1255          if value->builtin_int32 < other.value->< other.value->builtin_int32 {
1256              return value->builtin_int32
1257          }
1258          return other.value->builtin_int32
1259      }
1260  
1261      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1262      @priority(5)
1263      function min(other:Int32):Int64 {
1264          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
1265              return value->builtin_int64
1266          }
1267          return other.value->builtin_int64
1268      }
1269  
1270  
1271      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1272      @priority(9)
1273      function min(other:Int):Int64 {
1274          if value->builtin_int64 < other.value->< other.value->builtin_int64 {
1275              return value->builtin_int64
1276          }
1277          return other.value->builtin_int64
1278      }
1279  
1280      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1281      @priority(20)
1282      function min(other:UInt8):UInt8 {
1283          if value < other.value {< other.value {
1284              return value
1285          }
1286          return other.value
1287      }
1288  
1289      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1290      @priority(2)
1291      function min(other:UInt16):UInt16 {
1292          if value->builtin_uint16 < other.value {< other.value {
1293              return value->builtin_uint16
1294          }
1295          return other.value
1296      }
1297  
1298      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1299      @priority(4)
1300      function min(other:UInt32):UInt32 {
1301          if value->builtin_uint32 < other.value {< other.value {
1302              return value->builtin_uint32
1303          }
1304          return other.value
1305      }
1306  
1307      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1308      @priority(6)
1309      function min(other:UInt64):UInt64 {
1310          if value->builtin_uint64 < other.value {< other.value {
1311              return value->builtin_uint64
1312          }
1313          return other.value
1314      }
1315  
1316      ===Returns the smaller (closest to negative infinity) of this number and another number.===
1317      @priority(8)
1318      function min(other:UInt):UInt {
1319          if value->builtin_uint < other.value {< other.value {
1320              return value->builtin_uint
1321          }
1322          return other.value
1323      }
1324  
1325      ===Returns the larger (closest to positive infinity) of this number and another number.===
1326      @priority(1)
1327      function max(other:Int8):Int16 {
1328          if value->builtin_int16 > other.value->builtin_int16 {
1329              return value->builtin_int16
1330          }
1331          return other.value->builtin_int16
1332      }
1333  
1334      ===Returns the larger (closest to positive infinity) of this number and another number.===
1335      @priority(3)
1336      function max(other:Int16):Int32 {
1337          if value->builtin_int32 > other.value->builtin_int32 {
1338              return value->builtin_int32
1339          }
1340          return other.value->builtin_int32
1341      }
1342  
1343      ===Returns the larger (closest to positive infinity) of this number and another number.===
1344      @priority(5)
1345      function max(other:Int32):Int64 {
1346          if value->builtin_int64 > other.value->builtin_int64 {
1347              return value->builtin_int64
1348          }
1349          return other.value->builtin_int64
1350      }
1351  
1352  
1353      ===Returns the larger (closest to positive infinity) of this number and another number.===
1354      @priority(9)
1355      function max(other:Int):Int64 {
1356          if value->builtin_int64 > other.value->builtin_int64 {
1357              return value->builtin_int64
1358          }
1359          return other.value->builtin_int64
1360      }
1361  
1362      ===Returns the larger (closest to positive infinity) of this number and another number.===
1363      @priority(20)
1364      function max(other:UInt8):UInt8 {
1365          if value > other.value {
1366              return value
1367          }
1368          return other.value
1369      }
1370  
1371      ===Returns the larger (closest to positive infinity) of this number and another number.===
1372      @priority(2)
1373      function max(other:UInt16):UInt16 {
1374          if value->builtin_uint16 > other.value {
1375              return value->builtin_uint16
1376          }
1377          return other.value
1378      }
1379  
1380      ===Returns the larger (closest to positive infinity) of this number and another number.===
1381      @priority(4)
1382      function max(other:UInt32):UInt32 {
1383          if value->builtin_uint32 > other.value {
1384              return value->builtin_uint32
1385          }
1386          return other.value
1387      }
1388  
1389      ===Returns the larger (closest to positive infinity) of this number and another number.===
1390      @priority(6)
1391      function max(other:UInt64):UInt64 {
1392          if value->builtin_uint64 > other.value {
1393              return value->builtin_uint64
1394          }
1395          return other.value
1396      }
1397  
1398      ===Returns the larger (closest to positive infinity) of this number and another number.===
1399      @priority(8)
1400      function max(other:UInt):UInt {
1401          if value->builtin_uint > other.value {
1402              return value->builtin_uint
1403          }
1404          return other.value
1405      }
1406  
1407      @override
1408      function get_hash():Int {
1409          return Int(value->builtin_int)
1410      }
1411  
1412      ===The number of `1` bits in this number's binary representation.===
1413      property bitCount:UInt8
1414      @external(frostUInt8_get_bitCount)
1415      function get_bitCount():UInt8
1416  
1417      ===Parses a string as a number in the specified radix. Returns `null` if the parse fails.===
1418      @class
1419      @pre(radix >= 2 & radix <= 36)
1420      function parse(str:String, radix:Int):UInt8? {
1421          def result := Frost.parse(str, radix)
1422          if result == null {
1423              return null
1424          }
1425          return result.asUInt8
1426      }
1427  
1428      ===
1429      This number converted to an Int.
1430      ===
1431      property asInt:Int
1432      function get_asInt():Int {
1433          return Int(value->builtin_int)
1434      }
1435  
1436      ===
1437      This number converted to an Int.
1438      ===
1439      property toInt:Int
1440      function get_toInt():Int {
1441          return Int(value->builtin_int)
1442      }
1443  
1444      ===
1445      This number reinterpreted as an 8 bit signed number.
1446      If this number is not in the range of an 8 bit signed number, a safety violation occurs.
1447      ===
1448      property asInt8:Int8
1449      function get_asInt8():Int8 {
1450      assert self <= Int8.MAX.toUInt8, "UInt8(\{self}) cannot be safely converted to Int8"
1451          return Int8(value->builtin_int8)
1452      }
1453  
1454      ===
1455      This number reinterpreted as an 8 bit signed number.
1456      This function never fails, even if the number is not in the range of an 8 bit signed number.
1457      ===
1458      property toInt8:Int8
1459      function get_toInt8():Int8 {
1460          return Int8(value->builtin_int8)
1461      }
1462  
1463      ===
1464      This number zero extended to a 16 bit signed number.
1465      ===
1466      property asInt16:Int16
1467      function get_asInt16():Int16 {
1468          return Int16(value->builtin_int16)
1469      }
1470  
1471      ===
1472      This number zero extended to a 16 bit signed number.
1473      ===
1474      property toInt16:Int16
1475      function get_toInt16():Int16 {
1476          return Int16(value->builtin_int16)
1477      }
1478  
1479      ===
1480      This number zero extended to a 32 bit signed number.
1481      ===
1482      property asInt32:Int32
1483      function get_asInt32():Int32 {
1484          return Int32(value->builtin_int32)
1485      }
1486  
1487      ===
1488      This number zero extended to a 32 bit signed number.
1489      ===
1490      property toInt32:Int32
1491      function get_toInt32():Int32 {
1492          return Int32(value->builtin_int32)
1493      }
1494  
1495      ===
1496      This number zero extended to a 64 bit signed number.
1497      ===
1498      property asInt64:Int64
1499      function get_asInt64():Int64 {
1500          return Int64(value->builtin_int64)
1501      }
1502  
1503      ===
1504      This number zero extended to a 64 bit signed number.
1505      ===
1506      property toInt64:Int64
1507      function get_toInt64():Int64 {
1508          return Int64(value->builtin_int64)
1509      }
1510  
1511      ===
1512      This number converted to a UInt.
1513      ===
1514      property asUInt:UInt
1515      function get_asUInt():UInt {
1516          return UInt(value->builtin_uint)
1517      }
1518  
1519      ===
1520      This number converted to a UInt.
1521      ===
1522      property toUInt:UInt
1523      function get_toUInt():UInt {
1524          return UInt(value->builtin_uint)
1525      }
1526  
1527      ===
1528      This number zero extended to a 16 bit unsigned number.
1529      ===
1530      property asUInt16:UInt16
1531      function get_asUInt16():UInt16 {
1532          return UInt16(value->builtin_uint16)
1533      }
1534  
1535      ===
1536      This number zero extended to a 16 bit unsigned number.
1537      ===
1538      property toUInt16:UInt16
1539      function get_toUInt16():UInt16 {
1540          return UInt16(value->builtin_uint16)
1541      }
1542  
1543      ===
1544      This number zero extended to a 32 bit unsigned number.
1545      ===
1546      property asUInt32:UInt32
1547      function get_asUInt32():UInt32 {
1548          return UInt32(value->builtin_uint32)
1549      }
1550  
1551      ===
1552      This number zero extended to a 32 bit unsigned number.
1553      ===
1554      property toUInt32:UInt32
1555      function get_toUInt32():UInt32 {
1556          return UInt32(value->builtin_uint32)
1557      }
1558  
1559      ===
1560      This number zero extended to a 64 bit unsigned number.
1561      ===
1562      property asUInt64:UInt64
1563      function get_asUInt64():UInt64 {
1564          return UInt64(value->builtin_uint64)
1565      }
1566  
1567      ===
1568      This number zero extended to a 64 bit unsigned number.
1569      ===
1570      property toUInt64:UInt64
1571      function get_toUInt64():UInt64 {
1572          return UInt64(value->builtin_uint64)
1573      }
1574  
1575      ===
1576      This number converted to a 32 bit floating point number.
1577      ===
1578      property asReal32:Real32
1579      function get_asReal32():Real32 {
1580          return Real32(value->builtin_float32)
1581      }
1582  
1583      ===
1584      This number converted to a 32 bit floating point number.
1585      ===
1586      property toReal32:Real32
1587      function get_toReal32():Real32 {
1588          return Real32(value->builtin_float32)
1589      }
1590  
1591      ===
1592      This number converted to a 64 bit floating point number.
1593      ===
1594      property asReal64:Real64
1595      function get_asReal64():Real64 {
1596          return Real64(value->builtin_float64)
1597      }
1598  
1599      ===
1600      This number converted to a 64 bit floating point number.
1601      ===
1602      property toReal64:Real64
1603      function get_toReal64():Real64 {
1604          return Real64(value->builtin_float64)
1605      }
1606  
1607      ===Returns this number converted to a decimal string.===
1608      @override
1609      function get_toString():String {
1610          constant max := 3
1611          def chars := Pointer<Char8>.alloc(max)
1612          var index := max - 1
1613          var value := self
1614          if value >= 0 {
1615              do {
1616                  chars[index] := Char8((value % 10 + 48).asUInt8)
1617                  value := (value // 10).asUInt8
1618                  index -= 1
1619              }
1620              while value > 0
1621              index += 1
1622          }
1623          else {
1624              do {
1625                  chars[index] := Char8((48 - value % 10).asUInt8)
1626                  value := (value // 10).asUInt8
1627                  index -= 1
1628              }
1629              while value < 0< 0
1630              chars[index] := "-"
1631          }
1632          def size := max - index
1633          for i in 0 .. size {
1634              chars[i] := chars[i + index]
1635          }
1636          return String(chars, size)
1637      }
1638  
1639      === 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. ===
1640      @override
1641      function format(fmt:String):String {
1642          return Frost.format(false, self.toUInt64, 0xFF, fmt)
1643      }
1644  }
1645