Cosine similarity adds vector lengths. Squared norms are exact, while the square-root lengths are named instead of decimalized.
highlighted = computed this step
Cosine is the named boundary
Cosine divides a dot product by the two vector lengths. The squared norms are exact, but each length introduces a square root.
cos(u,v)=∥u∥∥v∥u⋅v,∥u∥=u⋅u
Exact squared norms
The squared norms are cat dot cat = 10, kitten dot kitten = 5, and car dot car = 10. Therefore cosine(cat, kitten) is named as 7 over sqrt(10) times sqrt(5).
1057
Summary
The dot products stay exact integers. The square-root length is the named non-exact step here, so the diagram renders 7/(sqrt(10)*sqrt(5)) as a symbol and never as a decimal.