/*
Swift's Int type is a signed 64‑bit integer on all modern Apple platforms.
Its maximum value is about 9.22 × 10^18.
A petabyte fits easily:
1 PiB = 2^50 = 1,125,899,906,842,624 bytes
1 PB = 10^15 = 1,000,000,000,000,000 bytes
Swift allows:
- bit shifting on integers
- readable numeric literals with underscores
- compile‑time constant evaluation
*/
// Binary petabyte (pebibyte), using a bit shift.
// 1 << 50 = 2^50 bytes.
let petabytePiB: Int64 = 1 << 50
// Decimal petabyte (SI petabyte), using a readable numeric literal.
let petabytePB: Int64 = 1_000_000_000_000_000
print("1 PiB = \(petabytePiB) bytes")
print("1 PB = \(petabytePB) bytes")
/*
run:
1 PiB = 1125899906842624 bytes
1 PB = 1000000000000000 bytes
*/