anchor.diff:      let inline log2 x =
           log2Aux Unchecked.defaultof<Fun> x
   
  -    /// Returns x raised by the power of 2.
  -    let inline sqr (x : ^a) =
  -        squareAux Unchecked.defaultof<Fun> Unchecked.defaultof<Helpers.NativeInt> x
  +    /// Returns x^2
  +    let inline sqr (x : ^a) = x * x
  +        //squareAux Unchecked.defaultof<Fun> Unchecked.defaultof<Helpers.NativeInt> x
   
       /// Returns the cubic root of x.
       let inline cbrt x =
           cbrtAux Unchecked.defaultof<Fun> x
   
       /// Returns the smaller of x and y.
  -    let inline min (y : ^b) (x : ^a) : ^a =
  -        minAux Unchecked.defaultof<Fun> Unchecked.defaultof<Helpers.NativeInt> x y
  +    let inline min x y = minAux Unchecked.defaultof<Helpers.MinMaxHelpers> x y
   
       /// Returns the larger of x and y.
  -    let inline max (y : ^b) (x : ^a) : ^a =
  -        maxAux Unchecked.defaultof<Fun> Unchecked.defaultof<Helpers.NativeInt> x y
  +    let inline max x y = maxAux Unchecked.defaultof<Helpers.MinMaxHelpers> x y
   
       /// Clamps x to the interval [a, b].
  -    let inline clamp (a : ^b) (b : ^b) (x : ^a) : ^a =
  -        clampAux Unchecked.defaultof<Fun> a b x
  +    let inline clamp a b x = clampAux Unchecked.defaultof<Helpers.MinMaxHelpers> a b x
   
       /// Clamps x to the interval [0, 1].
       let inline saturate (x : ^a) =
  
positive.code:         let inline log2Aux (_ : ^z) (x : ^a) =
              ((^z or ^a) : (static member Log2 : ^a  -> ^a) x)
  
          let inline squareAux (_ : ^z) (_ : ^w) (x : ^a) =
              ((^z or ^w or ^a) : (static member Square : ^a -> ^a) x)
  
          let inline cbrtAux (_ : ^z) (x : ^a) =
              ((^z or ^a) : (static member Cbrt : ^a  -> ^a) x)
          
          let inline minAux (_ : ^z) (_ : ^w) (x : ^a) (y : ^b) =
              ((^z or ^w or ^a or ^b) : (static member Min : ^a * ^b -> ^a) (x, y))
  
          let inline maxAux (_ : ^z) (_ : ^w) (x : ^a) (y : ^b) =
              ((^z or ^w or ^a or ^b) : (static member Max : ^a * ^b -> ^a) (x, y))
  
          let inline clampAux (_ : ^z) (a : ^b) (b : ^b) (x : ^a) =
              ((^z or ^a or ^b) : (static member Clamp : ^a * ^b * ^b -> ^a) (x, a, b))
  
      /// Resolves to the zero value for any scalar or vector type.
      let inline zero< ^T when ^T : (static member Zero : ^T) > : ^T =
  
negative.code:         let two : ^b = one + one
          let three : ^b = two + one
          let t = saturate ((x - edge0) / (edge1 - edge0))
          t * t * (three - two * t)
  
      module private CompilerTests =
  
          let zeroWorking() =
              let a : int = zero
              let a : float = zero
              let a : V2d = zero
              ()
  
          let oneWorking() =
              let a : int = one
              let a : float = one
              let a : V2d = one
              ()
  
          let signumWorking() =
              let a : float = signum 1.0
              let b : int = signum 1
              let s : V2d = signum V2d.II
              let a : decimal = signum 1.0m
              ()
  
          let signumIntWorking() =
              let a : int = signumi 1.0
              let b : int = signumi 1
              let s : V2i = signumi V2d.II
              ()
  
          let powerWorking() =
              let a : float = pow 1.0 2.0
              let a : decimal = pow 1.0m 2.0m
              let a : V2d = pow V2d.II V2d.II
              ()
              
          let log2Working() =
              let a : float = log2 10.0
              let a : V2d =  log2 V2d.II
              ()
              
          let cbrtWorking() =
              let a : float = cbrt 10.0
              let a : V2d =  cbrt V2d.II
              ()
              
          let sqrWorking() =
              let a : float = sqr 10.0
              let a : V2d =  sqr V2d.II
              ()
  
  
          let clampWorking() =
              let a : int = clamp 1 2 3
              let a : Version = clamp (Version(1,2,3)) (Version(3,2,3)) (Version(4,5,6))
              let a : V2d = clamp V2d.Zero V2d.One V2d.Half
              ()
          let minWorking() =
              let a : V2d = min V2d.II V2d.OO
              let a : V2d = min V2d.II 0.0
              let a : V2d = min 0.0 V2d.II
              let a : float = min 1.0 2.0
              let a : uint32 = min 1u 2u
              let a : nativeint = min 1n 2n
              let a : Version = min (Version(1,2,3)) (Version(3,2,3))
              ()
          let maxWorking() =
              let a : V2d = max V2d.II V2d.OO
              let a : V2d = max V2d.II 0.0
              let a : V2d = max 0.0 V2d.II
              let a : float = max 1.0 2.0
              let a : uint32 = max 1u 2u
              let a : nativeint = max 1n 2n
              let a : Version = max (Version(1,2,3)) (Version(3,2,3))
              ()
  