Skip to content

Commit a15b071

Browse files
dashvlasegonSchiele
authored andcommitted
Fix typos (egonSchiele#77)
* Fix typo * Update 01_price_of_groceries.swift
1 parent c550364 commit a15b071

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

05_hash_tables/swift/01_price_of_groceries.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ book["milk"] = 1.49
88
book["avacado"] = 1.49
99
print(book) // => ["avacado": 1.49, "apple": 0.67000000000000004, "milk": 1.49]
1010

11-
// Qustion: Why is "apple" is 0.67000000000000004 intsted of 0.67?
11+
// Qustion: Why is "apple" is 0.67000000000000004 instead of 0.67?
1212
// Answer: Double cannot store the value 0.67 exactly. Swift uses (like many other languages) binary floating point numbers according to the IEEE 754 standard.
13-
// This topic is not related with Algorithms, but you can play with .description and .debugDescription for making workarrounds
13+
// This topic is not related to Algorithms, but you can play with .description and .debugDescription for making workarounds
1414
print(book["apple"]?.description ?? "Not exist") // => 0.67
1515
print(book["apple"]?.debugDescription ?? "Not exist") // => 0.67000000000000004
1616

0 commit comments

Comments
 (0)