anchor.diff:                     | (:? IStructuralComparable as x),_ ->
                          x.CompareTo(yobj,comp)
                      // Check for IComparable
  -                   | (:? System.IComparable as x),_ -> 
  -                       if comp.ThrowsOnPER then 
  -                           match xobj,yobj with 
  -                           | (:? float as x),(:? float as y) -> 
  -                                if (System.Double.IsNaN x || System.Double.IsNaN y) then 
  -                                    raise NaNException
  -                           | (:? float32 as x),(:? float32 as y) -> 
  -                                if (System.Single.IsNaN x || System.Single.IsNaN y) then 
  -                                    raise NaNException
  -                           | _ -> ()
  -                       x.CompareTo(yobj)
  +                   | (:? System.IComparable as x),_ ->
  +                        if comp.ComparerType.Equals ComparerType.ER then
  +                            x.CompareTo yobj
  +                        else 
  +                            let getNaNResult () =
  +                                match comp.ComparerType with
  +                                | ComparerType.PER_gt -> 2
  +                                | ComparerType.PER_lt -> -2
  +                                | _ -> raise (Exception "Invalid logic")
  +
  +                            match xobj, yobj with
  +                            | (:? float as x), (:? float as y) -> 
  +                                if System.Double.IsNaN x || System.Double.IsNaN y
  +                                    then getNaNResult ()
  +                                    else x.CompareTo y
  +                            | (:? float32 as x), (:? float32 as y) -> 
  +                                if System.Single.IsNaN x || System.Single.IsNaN y
  +                                    then getNaNResult ()
  +                                    else x.CompareTo y
  +                            | _ -> x.CompareTo yobj
  +
                      | (:? nativeint as x),(:? nativeint as y) -> if (# "clt" x y : bool #) then (-1) else (# "cgt" x y : int #)
                      | (:? unativeint as x),(:? unativeint as y) -> if (# "clt.un" x y : bool #) then (-1) else (# "cgt.un" x y : int #)
                      | _,(:? IStructuralComparable as yc) ->
  
positive.code:                         | _ -> raise (Exception "invalid logic")
  
                      let pass1 =
                          // These do not require seperate versions based on equivalence relations, so defer to helper object
                          match pass0 with
                          | null -> standardTypes ty
                          | f -> f
  
negative.code:                         | f -> f
  
                      let pass3 =
                          // These do not require seperate versions based on equivalence relations, defer to helper
                          match pass2 with
                          | null -> equalityInterfaces ty
                          | f -> f
  