未验证 提交 8413dac8 编写于 作者: K Kevin Ransom (msft) 提交者: GitHub

Remove Dead code --- BigInteger (#7511)

* Remove Dead code --- BigInteger

* Put back FSharp.Math namespace ... even though it's empty

* Improve empty namespace comment
上级 5e2a5639
......@@ -122,12 +122,6 @@
<Compile Include="reflect.fs">
<Link>Reflection/reflect.fs</Link>
</Compile>
<Compile Include="math\n.fsi">
<Link>Numerics/n.fsi</Link>
</Compile>
<Compile Include="math\n.fs">
<Link>Numerics/n.fs</Link>
</Compile>
<Compile Include="math\z.fsi">
<Link>Numerics/z.fsi</Link>
</Compile>
......
......@@ -11,7 +11,6 @@ module ExtraTopLevelOperators =
open Microsoft.FSharp.Control
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Text
open Microsoft.FSharp.Math
#if !FX_NO_SYSTEM_CONSOLE
/// <summary>Print to <c>stdout</c> using the given format.</summary>
......
此差异已折叠。
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace Microsoft.FSharp.Math
#if FX_NO_BIGINT
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Core
/// Abstract internal type
[<NoEquality; NoComparison>]
type internal BigNat
module internal BigNatModule =
val zero : BigNat
val one : BigNat
val two : BigNat
val add : BigNat -> BigNat -> BigNat
val sub : BigNat -> BigNat -> BigNat
val mul : BigNat -> BigNat -> BigNat
val divmod : BigNat -> BigNat -> BigNat * BigNat
val div : BigNat -> BigNat -> BigNat
val rem : BigNat -> BigNat -> BigNat
val hcf : BigNat -> BigNat -> BigNat
val min : BigNat -> BigNat -> BigNat
val max : BigNat -> BigNat -> BigNat
val scale : int -> BigNat -> BigNat
val powi : BigNat -> int -> BigNat
val pow : BigNat -> BigNat -> BigNat
val IsZero : BigNat -> bool
val isZero : BigNat -> bool
val isOne : BigNat -> bool
val equal : BigNat -> BigNat -> bool
val compare : BigNat -> BigNat -> int
val lt : BigNat -> BigNat -> bool
val gt : BigNat -> BigNat -> bool
val lte : BigNat -> BigNat -> bool
val gte : BigNat -> BigNat -> bool
val hash : BigNat -> int
val toFloat : BigNat -> float
val ofInt32 : int -> BigNat
val ofInt64 : int64 -> BigNat
val toString : BigNat -> string
val ofString : string -> BigNat
val toUInt32 : BigNat -> uint32
val toUInt64 : BigNat -> uint64
val factorial : BigNat -> BigNat
// val randomBits : int -> BigNat
val bits : BigNat -> int
val isSmall : BigNat -> bool (* will fit in int32 (but not nec all int32) *)
val getSmall : BigNat -> int32 (* get the value, if it satisfies isSmall *)
#endif
此差异已折叠。
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace System.Numerics
#if FX_NO_BIGINT
open System
open Microsoft.FSharp.Collections
open Microsoft.FSharp.Core
/// The type of arbitrary-sized integers
[<Struct>]
[<CustomEquality; CustomComparison>]
type BigInteger =
/// Return the sum of two big integers
static member ( + ) : x:BigInteger * y:BigInteger -> BigInteger
/// Return the modulus of big integers
static member ( % ) : x:BigInteger * y:BigInteger -> BigInteger
/// Return the product of big integers
static member ( * ) : x:BigInteger * y:BigInteger -> BigInteger
/// Return the difference of two big integers
static member ( - ) : x:BigInteger * y:BigInteger -> BigInteger
/// Return the ratio of two big integers
static member ( / ) : x:BigInteger * y:BigInteger -> BigInteger
/// Return the negation of a big integer
static member (~-) : x:BigInteger -> BigInteger
/// Return the given big integer
static member (~+) : x:BigInteger -> BigInteger
/// Convert a big integer to a floating point number
static member op_Explicit : x:BigInteger -> float
/// Convert a big integer to a 64-bit signed integer
static member op_Explicit : x:BigInteger -> int64
/// Convert a big integer to a 32-bit signed integer
static member op_Explicit : x:BigInteger -> int32
/// Parse a big integer from a string format
static member Parse : text:string -> BigInteger
/// Return the sign of a big integer: 0, +1 or -1
member Sign : int
/// Compute the ratio and remainder of two big integers
static member DivRem : x:BigInteger * y:BigInteger * [<System.Runtime.InteropServices.Out>]rem:BigInteger byref -> BigInteger
/// This operator is for consistency when this type be used from other CLI languages
static member op_LessThan : x:BigInteger * y:BigInteger -> bool
/// This operator is for consistency when this type be used from other CLI languages
static member op_LessThanOrEqual : x:BigInteger * y:BigInteger -> bool
/// This operator is for consistency when this type be used from other CLI languages
static member op_GreaterThan : x:BigInteger * y:BigInteger -> bool
/// This operator is for consistency when this type be used from other CLI languages
static member op_GreaterThanOrEqual : x:BigInteger * y:BigInteger -> bool
/// This operator is for consistency when this type be used from other CLI languages
static member op_Equality : x:BigInteger * y:BigInteger -> bool
/// This operator is for consistency when this type be used from other CLI languages
static member op_Inequality : x:BigInteger * y:BigInteger -> bool
/// Return the greatest common divisor of two big integers
static member GreatestCommonDivisor : x:BigInteger * y:BigInteger -> BigInteger
/// Return n^m for two big integers
static member Pow : x:BigInteger * y:int32 -> BigInteger
/// Compute the absolute value of a big integer
static member Abs : x:BigInteger -> BigInteger
/// Get the big integer for zero
static member Zero : BigInteger
/// Get the big integer for one
static member One : BigInteger
/// Return true if a big integer is 'zero'
member IsZero : bool
/// Return true if a big integer is 'one'
member IsOne : bool
interface System.IComparable
override Equals : obj -> bool
override GetHashCode : unit -> int
override ToString : unit -> string
/// Construct a BigInteger value for the given integer
new : x:int -> BigInteger
/// Construct a BigInteger value for the given 64-bit integer
new : x:int64 -> BigInteger
#endif
namespace Microsoft.FSharp.Math
// Deliberately left empty
//
// FSharp.Core previously exposed the namespace Microsoft.FSharp.Math even though there were no types in it.
// This retains that.
// Existing programs could, and did contain the line:
// open FSharp.Math
//
namespace Microsoft.FSharp.Core
......@@ -104,5 +36,3 @@ namespace Microsoft.FSharp.Core
val FromInt64Dynamic : value:int64 -> obj
/// Provides a default implementations of F# numeric literal syntax for literals of the form 'dddI'
val FromStringDynamic : text:string -> obj
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册