High Precision Sort code for GRIFFIN