Returns the median of the domain of Var, i.e. if there are N values in the domain, the N/2'th (rounded down if N is odd) value is returned. If Var is not a GFD domain variable, it will be turned into one. Note that this is different from the definition used in IC, where the median (a float) of the interval is returned. If Var is an integer, the median is unified with that number.
[eclipse 2]: X :: 10..1000, get_median(X, M). X = X{10 .. 1000} M = 500 [eclipse 2]: A :: [2,3,100,1000], get_median(A,M). A = A{[2, 3, 100, 1000]} M = 3 [eclipse 2]: get_median(3, M). M = 3