RosettaCodeData/Task/Literals-Integer/Frink/literals-integer.frink

16 lines
1.1 KiB
Plaintext

123456789123456789 // (a number in base 10)
123_456_789_123_456_789 // (the same number in base 10 with underscores for readability)
1 quadrillion // (named numbers are fine in Frink.)
1ee39 // (exact exponent, an integer with exact value 10^39)
100001000101111111101101\\2 // (a number in base 2)
1000_0100_0101_1111_1110_1101\\2 // (a number in base 2 with underscores for readability)
845FED\\16 // (a number in base 16... bases from 2 to 36 are allowed)
845fed\\16 // (The same number in base 16... upper or lowercase are allowed.)
845_fed\\16 // (a number in base 16 with underscores for readability)
FrinkRulesYou\\36 // (a number in base 36)
0x845fed // (Common hexadecimal notation)
0x845FED // (Common hexadecimal notation)
0xFEED_FACE // (Hexadecimal with underscores for readability)
0b100001000101111111101101 // (Common binary notation)
0b1000_0100_0101_1111_1110_1101 // (Binary with underscores for readability)