{{ number($user.reaction_score/$user.message_count, 2) }}
The second argument denotes the number of decimal places.
You can also do: {{ ($user.reaction_score/$user.message_count)|number }}
-- that would round to whole numbers.
This would give 2 decimal places: {{ ($user.reaction_score/$user.message_count)|number(2) }}
You likely want to be using $user rather than $visitor.
The former is the account the function is being applied to, the latter is the account viewing the page.