/src/fsharp/FSharp.Core/math/z.fsi

http://github.com/fsharp/fsharp · F# · 108 lines · 54 code · 15 blank · 39 comment · 0 complexity · b642bdb934c15017dd8ca72df9495fb8 MD5 · raw file

  1. // Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
  2. namespace System.Numerics
  3. #if FX_NO_BIGINT
  4. open System
  5. open Microsoft.FSharp.Collections
  6. open Microsoft.FSharp.Core
  7. /// The type of arbitrary-sized integers
  8. [<Struct>]
  9. [<CustomEquality; CustomComparison>]
  10. type BigInteger =
  11. /// Return the sum of two big integers
  12. static member ( + ) : x:BigInteger * y:BigInteger -> BigInteger
  13. /// Return the modulus of big integers
  14. static member ( % ) : x:BigInteger * y:BigInteger -> BigInteger
  15. /// Return the product of big integers
  16. static member ( * ) : x:BigInteger * y:BigInteger -> BigInteger
  17. /// Return the difference of two big integers
  18. static member ( - ) : x:BigInteger * y:BigInteger -> BigInteger
  19. /// Return the ratio of two big integers
  20. static member ( / ) : x:BigInteger * y:BigInteger -> BigInteger
  21. /// Return the negation of a big integer
  22. static member (~-) : x:BigInteger -> BigInteger
  23. /// Return the given big integer
  24. static member (~+) : x:BigInteger -> BigInteger
  25. /// Convert a big integer to a floating point number
  26. static member op_Explicit : x:BigInteger -> float
  27. /// Convert a big integer to a 64-bit signed integer
  28. static member op_Explicit : x:BigInteger -> int64
  29. /// Convert a big integer to a 32-bit signed integer
  30. static member op_Explicit : x:BigInteger -> int32
  31. /// Parse a big integer from a string format
  32. static member Parse : text:string -> BigInteger
  33. /// Return the sign of a big integer: 0, +1 or -1
  34. member Sign : int
  35. /// Compute the ratio and remainder of two big integers
  36. static member DivRem : x:BigInteger * y:BigInteger * [<System.Runtime.InteropServices.Out>]rem:BigInteger byref -> BigInteger
  37. /// This operator is for consistency when this type be used from other CLI languages
  38. static member op_LessThan : x:BigInteger * y:BigInteger -> bool
  39. /// This operator is for consistency when this type be used from other CLI languages
  40. static member op_LessThanOrEqual : x:BigInteger * y:BigInteger -> bool
  41. /// This operator is for consistency when this type be used from other CLI languages
  42. static member op_GreaterThan : x:BigInteger * y:BigInteger -> bool
  43. /// This operator is for consistency when this type be used from other CLI languages
  44. static member op_GreaterThanOrEqual : x:BigInteger * y:BigInteger -> bool
  45. /// This operator is for consistency when this type be used from other CLI languages
  46. static member op_Equality : x:BigInteger * y:BigInteger -> bool
  47. /// This operator is for consistency when this type be used from other CLI languages
  48. static member op_Inequality : x:BigInteger * y:BigInteger -> bool
  49. /// Return the greatest common divisor of two big integers
  50. static member GreatestCommonDivisor : x:BigInteger * y:BigInteger -> BigInteger
  51. /// Return n^m for two big integers
  52. static member Pow : x:BigInteger * y:int32 -> BigInteger
  53. /// Compute the absolute value of a big integer
  54. static member Abs : x:BigInteger -> BigInteger
  55. /// Get the big integer for zero
  56. static member Zero : BigInteger
  57. /// Get the big integer for one
  58. static member One : BigInteger
  59. /// Return true if a big integer is 'zero'
  60. member IsZero : bool
  61. /// Return true if a big integer is 'one'
  62. member IsOne : bool
  63. interface System.IComparable
  64. override Equals : obj -> bool
  65. override GetHashCode : unit -> int
  66. override ToString : unit -> string
  67. /// Construct a BigInteger value for the given integer
  68. new : x:int -> BigInteger
  69. /// Construct a BigInteger value for the given 64-bit integer
  70. new : x:int64 -> BigInteger
  71. #endif
  72. namespace Microsoft.FSharp.Core
  73. type bigint = System.Numerics.BigInteger
  74. [<AutoOpen>]
  75. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  76. module NumericLiterals =
  77. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  78. module NumericLiteralI =
  79. open System.Numerics
  80. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  81. val FromZero : value:unit -> 'T
  82. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  83. val FromOne : value:unit -> 'T
  84. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  85. val FromInt32 : value:int32 -> 'T
  86. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  87. val FromInt64 : value:int64 -> 'T
  88. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  89. val FromString : text:string -> 'T
  90. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  91. val FromInt64Dynamic : value:int64 -> obj
  92. /// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
  93. val FromStringDynamic : text:string -> obj