Tag: hexadecimal

Decimal and Hexadecimal exponent in Swift
For decimal numbers with exponent value (e), the given number is multiplied by 10 to the power of exp. For hexadecimal numbers with exponent value (p), the given number is multiplied by 2 to the power of exp. Example: var decimalExponent = 25.5e3 var hexadecimalExponent = 0x345p4

Floating Point Literals in Swift
Floating point literals can be of decimal or hexadecimal type. They must always have a number on both sides of decimal point. Example: var decimalFloat = 1.23 var hexadecimalFloat = 0xE.45

Integer literals in Swift
Integer literals in Swift are of the following types: Decimal literal Binary literal Octal literal Hexa decimal literal