Math.BigMul Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
BigMul(Int32, Int32) |
Restituisce il prodotto completo di due numeri a 32 bit. |
BigMul(Int64, Int64, Int64) |
Restituisce il prodotto completo di due numeri a 64 bit. |
BigMul(UInt64, UInt64, UInt64) |
Restituisce il prodotto completo di due numeri a 64 bit senza segno. |
BigMul(Int32, Int32)
- Origine:
- Math.cs
- Origine:
- Math.cs
- Origine:
- Math.cs
Restituisce il prodotto completo di due numeri a 32 bit.
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
Parametri
- a
- Int32
Primo numero da moltiplicare.
- b
- Int32
Secondo numero da moltiplicare.
Restituisce
Numero contenente il prodotto dei numeri specificati.
Esempio
Nell'esempio BigMul seguente viene illustrato l'uso del metodo per calcolare il prodotto di due valori integer.
// This example demonstrates Math.BigMul()
using namespace System;
int main()
{
int int1 = Int32::MaxValue;
int int2 = Int32::MaxValue;
Int64 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()
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
'
Si applica a
BigMul(Int64, Int64, Int64)
- Origine:
- Math.cs
- Origine:
- Math.cs
- Origine:
- Math.cs
Restituisce il prodotto completo di due numeri a 64 bit.
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
Parametri
- a
- Int64
Primo numero da moltiplicare.
- b
- Int64
Secondo numero da moltiplicare.
- low
- Int64
Quando questo metodo restituisce, contiene il valore basso a 64 bit del prodotto dei numeri specificati.
Restituisce
Valore elevato a 64 bit del prodotto dei numeri specificati.
Si applica a
BigMul(UInt64, UInt64, UInt64)
- Origine:
- Math.cs
- Origine:
- Math.cs
- Origine:
- Math.cs
Importante
Questa API non è conforme a CLS.
Restituisce il prodotto completo di due numeri a 64 bit senza segno.
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
Parametri
- a
- UInt64
Primo numero da moltiplicare.
- b
- UInt64
Secondo numero da moltiplicare.
- low
- UInt64
Quando questo metodo restituisce, contiene il valore basso a 64 bit del prodotto dei numeri specificati.
Restituisce
Valore elevato a 64 bit del prodotto dei numeri specificati.
- Attributi
Si applica a
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per