anchor.diff:      elif number = PosInf then "Infinity"
       else failwith "Number is not NaN, Infinity or -Infinity"
   
  -  let internal toString (f:FunctionObject) (this:CommonObject) (radix:double) =
  +  let internal toString (f:FunctionObject) (this:CommonObject) (radix:BoxedValue) =
       this.CheckType<NO>()
       let number = (this |> ValueObject.GetValue).Number
  +
  +    let radix = if radix.IsUndefined then 10 else TC.ToInteger(radix)
  +    if radix < 2 || radix > 36 then
  +      f.Env.RaiseRangeError("radix must be between 2 and 36 inclusive")
   
       if FSharp.Utils.isNaNOrInf number then nanToString number
       else
         match radix with
  -      | 0.0 | 10.0 -> TypeConverter.ToString(number)
  -      | 2.0 -> Convert.ToString(int64 number, 2)
  -      | 8.0 -> Convert.ToString(int64 number, 8)
  -      | 16.0 -> Convert.ToString(int64 number, 16)
  -      | _ -> "Radix must be 0, 2, 8, 10 or 16"
  -      
  +      | 0 | 10 -> TypeConverter.ToString(number)
  +      | _ ->
  +        let digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  +        let mutable result = ""
  +        let mutable number = bigint number
  +        if number < bigint.Zero then
  +          result <- "-"
  +          number <- -number
  +        if number = bigint.Zero then "0"
  +        else
  +          let radix = bigint radix
  +          while number > bigint.Zero do
  +            let digit = int (number % radix)
  +            number <- number / radix
  +            result <- result + digits.[digit].ToString()
  +          result
  +
     //----------------------------------------------------------------------------
     let internal toLocaleString (f:FunctionObject) (this:CommonObject) = 
  -    toString f this 10.0
  -    
  +    toString f this (10.0 |> BV.Box)
  +
     //----------------------------------------------------------------------------
     let internal valueOf (f:FunctionObject) (this:CommonObject) =
       this.CheckType<NO>()
  
positive.code: 
      proto.Put("constructor", env.Constructors.Number, DontEnum)
  
      let toString = new Func<FunctionObject, CommonObject, double, string>(toString)
      let toString = Utils.createHostFunction env toString
      proto.Put("toString", toString, DontEnum)
  
  
negative.code:     let number = (this |> ValueObject.GetValue).Number
  
      if precision.IsUndefined then 
        toString f this (10.0 |> BV.Box)
  
      elif number |> FSharp.Utils.isNaNOrInf then 
        nanToString number
  