"Best Practice" for calculating 4 expressions based on 6 values would be to just do it by hand.
Please provide an actual use case, not a theoretical question that looks like it could be part of a weird interview.
If this is a serious requirement, please provide more context. What are the X values? What is this table/view about?