I compute an array position as n / 2 and then use it as an index, and Julia refuses with an error about an invalid index of type Float64. Wrapping it in Int(...) works for even n but throws InexactError for odd n. In C the same code simply truncates.
What is the intended way to go from a floating-point value to an integer in Julia, and which rounding does each option use?




