Math.BigMul Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Överlagringar
| Name | Description |
|---|---|
| BigMul(UInt64, UInt64, UInt64) |
Genererar den fullständiga produkten av två osignerade 64-bitarsnummer. |
| BigMul(Int64, Int64, Int64) |
Producerar den fullständiga produkten av två 64-bitarsnummer. |
| BigMul(UInt64, UInt64) |
Genererar den fullständiga produkten av två osignerade 64-bitarsnummer. |
| BigMul(Int32, Int32) |
Producerar hela produkten av två 32-bitarsnummer. |
| BigMul(Int64, Int64) |
Producerar den fullständiga produkten av två 64-bitarsnummer. |
| BigMul(UInt32, UInt32) |
Ger den fullständiga produkten av två osignerade 32-bitarsnummer. |
BigMul(UInt64, UInt64, UInt64)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Viktigt!
Detta API uppfyller inte CLS.
Genererar den fullständiga produkten av två osignerade 64-bitarsnummer.
public:
static System::UInt64 BigMul(System::UInt64 a, System::UInt64 b, [Runtime::InteropServices::Out] System::UInt64 % low);
[System.CLSCompliant(false)]
public static ulong BigMul(ulong a, ulong b, out ulong low);
[<System.CLSCompliant(false)>]
static member BigMul : uint64 * uint64 * uint64 -> uint64
Public Shared Function BigMul (a As ULong, b As ULong, ByRef low As ULong) As ULong
Parametrar
- a
- UInt64
Det första talet som ska multipliceras.
- b
- UInt64
Det andra talet som ska multipliceras.
- low
- UInt64
När den här metoden returnerar innehåller den låga 64-bitars av produkten av de angivna talen.
Returer
Den höga 64-bitars produkten av de angivna talen.
- Attribut
Gäller för
BigMul(Int64, Int64, Int64)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Producerar den fullständiga produkten av två 64-bitarsnummer.
public:
static long BigMul(long a, long b, [Runtime::InteropServices::Out] long % low);
public static long BigMul(long a, long b, out long low);
static member BigMul : int64 * int64 * int64 -> int64
Public Shared Function BigMul (a As Long, b As Long, ByRef low As Long) As Long
Parametrar
- a
- Int64
Det första talet som ska multipliceras.
- b
- Int64
Det andra talet som ska multipliceras.
- low
- Int64
När den här metoden returnerar innehåller den låga 64-bitars av produkten av de angivna talen.
Returer
Den höga 64-bitars produkten av de angivna talen.
Gäller för
BigMul(UInt64, UInt64)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Viktigt!
Detta API uppfyller inte CLS.
Genererar den fullständiga produkten av två osignerade 64-bitarsnummer.
public:
static UInt128 BigMul(System::UInt64 a, System::UInt64 b);
[System.CLSCompliant(false)]
public static UInt128 BigMul(ulong a, ulong b);
[<System.CLSCompliant(false)>]
static member BigMul : uint64 * uint64 -> UInt128
Public Shared Function BigMul (a As ULong, b As ULong) As UInt128
Parametrar
- a
- UInt64
Det första talet som ska multipliceras.
- b
- UInt64
Det andra talet som ska multipliceras.
Returer
Den fullständiga produkten av de angivna talen.
- Attribut
Gäller för
BigMul(Int32, Int32)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Producerar hela produkten av två 32-bitarsnummer.
public:
static long BigMul(int a, int b);
public static long BigMul(int a, int b);
static member BigMul : int * int -> int64
Public Shared Function BigMul (a As Integer, b As Integer) As Long
Parametrar
- a
- Int32
Det första talet som ska multipliceras.
- b
- Int32
Det andra talet som ska multipliceras.
Returer
Talet som innehåller produkten av de angivna talen.
Exempel
I följande exempel visas hur metoden används BigMul för att beräkna produkten med två heltalsvärden.
// This example demonstrates Math.BigMul()
using System;
class Sample
{
public static void Main()
{
int int1 = Int32.MaxValue;
int int2 = Int32.MaxValue;
long longResult;
//
longResult = Math.BigMul(int1, int2);
Console.WriteLine("Calculate the product of two Int32 values:");
Console.WriteLine("{0} * {1} = {2}", int1, int2, longResult);
}
}
/*
This example produces the following results:
Calculate the product of two Int32 values:
2147483647 * 2147483647 = 4611686014132420609
*/
// This example demonstrates Math.BigMul()
open System
let int1 = Int32.MaxValue
let int2 = Int32.MaxValue
let longResult = Math.BigMul(int1, int2)
printfn "Calculate the product of two Int32 values:"
printfn $"{int1} * {int2} = {longResult}"
// This example produces the following results:
// Calculate the product of two Int32 values:
// 2147483647 * 2147483647 = 4611686014132420609
' This example demonstrates Math.BigMul()
Class Sample
Public Shared Sub Main()
Dim int1 As Integer = Int32.MaxValue
Dim int2 As Integer = Int32.MaxValue
Dim longResult As Long
'
longResult = Math.BigMul(int1, int2)
Console.WriteLine("Calculate the product of two Int32 values:")
Console.WriteLine("{0} * {1} = {2}", int1, int2, longResult)
End Sub
End Class
'
'This example produces the following results:
'Calculate the product of two Int32 values:
'2147483647 * 2147483647 = 4611686014132420609
'
Gäller för
BigMul(Int64, Int64)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Producerar den fullständiga produkten av två 64-bitarsnummer.
public:
static Int128 BigMul(long a, long b);
public static Int128 BigMul(long a, long b);
static member BigMul : int64 * int64 -> Int128
Public Shared Function BigMul (a As Long, b As Long) As Int128
Parametrar
- a
- Int64
Det första talet som ska multipliceras.
- b
- Int64
Det andra talet som ska multipliceras.
Returer
Den fullständiga produkten av de angivna talen.
Gäller för
BigMul(UInt32, UInt32)
- Källa:
- Math.cs
- Källa:
- Math.cs
- Källa:
- Math.cs
Viktigt!
Detta API uppfyller inte CLS.
Ger den fullständiga produkten av två osignerade 32-bitarsnummer.
public:
static System::UInt64 BigMul(System::UInt32 a, System::UInt32 b);
[System.CLSCompliant(false)]
public static ulong BigMul(uint a, uint b);
[<System.CLSCompliant(false)>]
static member BigMul : uint32 * uint32 -> uint64
Public Shared Function BigMul (a As UInteger, b As UInteger) As ULong
Parametrar
- a
- UInt32
Det första talet som ska multipliceras.
- b
- UInt32
Det andra talet som ska multipliceras.
Returer
Talet som innehåller produkten av de angivna talen.
- Attribut