36 votes

Incohérences BigInt dans PowerShell et C#

Selon le documentation microsoft les [BigInt] ne semble pas avoir de valeur maximale définie et peut théoriquement contenir un nombre infiniment grand, mais j'ai constaté qu'après le 28e chiffre, des choses bizarres commencent à se produire :

PS C:\Users\Neko> [BigInt]9999999999999999999999999999
9999999999999999999999999999
PS C:\Users\Neko> [BigInt]99999999999999999999999999999
99999999999999991433150857216

Comme vous pouvez le voir, dans la première commande 1 , le BigInt fonctionne comme prévu, mais avec un chiffre de plus, il semble qu'il y ait un décalage au niveau de la traduction 99999999999999999999999999999 a 99999999999999991433150857216 Cependant, l'invite n'émet pas d'erreur et vous pouvez continuer à ajouter des chiffres jusqu'au 310ème chiffre

PS C:\Users\Neko> [BigInt]99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
100000000000000001097906362944045541740492309677311846336810682903157585404911491537163328978494688899061249669721172515611590283743140088328307009198146046031271664502933027185697489699588559043338384466165001178426897626212945177628091195786707458122783970171784415105291802893207873272974885715430223118336
PS C:\Users\Neko\> [BigInt]999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999

ce qui provoquera l'erreur suivante

At line:1 char:318
+ ... 999999999999999999999999999999999999999999999999999999999999999999999
+                                                                          ~
The numeric constant 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 is not valid.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : BadNumericConstant

Je pense qu'il s'agit d'un problème de console plutôt que d'un problème de BigInt car l'erreur ne mentionne pas le [BigInt] contrairement aux nombres trop grands pour d'autres types de données comme le

PS C:\Users\Neko> [UInt64]18446744073709551615
18446744073709551615
PS C:\Users\Neko> [UInt64]18446744073709551616
Cannot convert value "18446744073709551616" to type "System.UInt64". Error: "Value was either too large or too small
for a UInt64."
At line:1 char:1
+ [UInt64]18446744073709551616
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvalidCastIConvertible

Quant à C#, System.Numerics.BigInt commencera à générer une erreur au 20ème chiffre, 99999999999999999999 lorsqu'il est codé en dur :

namespace Test
{
    class Test
    {
        static void Main()
        {
            System.Numerics.BigInteger TestInput;
            System.Numerics.BigInteger Test = 99999999999999999999;
            System.Console.WriteLine(Test);
        }
    }
}

Lorsque j'essaie de construire dans Visual Studio, j'obtiens l'erreur suivante

Integral constant is too large

Toutefois, je peux saisir un nombre plus élevé pour ReadLine sans provoquer d'erreur

namespace Test
{
    class Test
    {
        static void Main()
        {
            System.Numerics.BigInteger TestInput;
            TestInput = System.Numerics.BigInteger.Parse(System.Console.ReadLine());
            System.Console.WriteLine(TestInput);
        }
    }
}

Ce qui semble en effet être infini. L'entrée

99999999999...

(24720 caractères au total) fonctionne correctement 2

Qu'est-ce qui est à l'origine de toute cette activité bizarre avec les [BigInt] ?


1 qui est de 28 chiffres selon <code>([Char[]]"$([BigInt]9999999999999999999999999999)").count</code>

2 Je suis trop paresseux pour compter les chiffres et essayer de les analyser dans PowerShell provoque une erreur. D'après <a href="https://www.lettercount.com/" rel="nofollow noreferrer">cette </a>il s'agit de 24720 caractères

39voto

pinkfloydx33 Points 2688

TLDR : Utilisation [BigInt]::Parse o 'literal' avant la version 7.0 de Powershell Core ; sinon, utilisez la syntaxe n suffixe.

Le problème - double littéraux

Lorsqu'il s'agit de littéraux non suffixés, Powershell utilise le premier type dans lequel la valeur s'inscrit. L'ordre des intégrale est int , long , decimal et ensuite double . De la la documentation pour Powershell 5.1 (c'est moi qui souligne ; ce paragraphe est le même pour Powershell Core) :

Pour un entier littéral sans suffixe de type :

  • Si la valeur peut être représentée par un type [int] c'est-à-dire son type.
  • Sinon, si la valeur peut être représentée par le type [long] c'est-à-dire son type.
  • Sinon, si la valeur peut être représentée par le type [decimal] c'est-à-dire son type.
  • Sinon, il est représenté par le type [double] .

Dans votre cas, la valeur dépasse celle de decimal.MaxValue donc votre littéral est par défaut un double littérale. Il s'agit d'une double n'est pas exactement représentable et est "convertie" en la valeur la plus proche. représentable double.

$h = [double]99999999999999999999999999999
"{0:G29}" -f $h

Sorties

99999999999999991000000000000

Il est évident que ce n'est pas le exactes un nombre, mais une représentation sous forme de chaîne de caractères. Mais cela vous donne une idée de ce qui se passe. Prenons maintenant ce inexact double valeur et nous moulage le à BigInt . La perte de précision initiale est transférée et aggravée par la opérateur de conversion . C'est ce qui est en fait dans Powershell (notez la fonte de BigInt ):

$h = [BigInt][double]99999999999999999999999999999
"{0:G}" -f $h

Sorties

99999999999999991433150857216

Il s'agit en fait de la représentation la plus proche de la double valeur. Si vous pouviez imprimer la valeur exacte de la double du premier exemple, voici ce qu'il imprimerait. Lorsque vous ajoutez les chiffres supplémentaires, vous dépassez la plus grande valeur d'un littéral numérique, donc l'autre exception que vous avez reçue.

Incohérences en C#

Contrairement à Powershell, C# utilise littéraux intégraux par défaut, ce qui explique l'exception pour un nombre de chiffres beaucoup plus faible. En ajoutant le D en C# vous donnera une plus grande marge de manœuvre. L'exemple suivant fonctionne bien et sera un double .

var h = 99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999D;

L'ajout d'un chiffre supplémentaire entraîne l'erreur suivante :

erreur CS0594 : La constante en virgule flottante est en dehors de la plage du type "double".

Notez qu'en Powershell, l'option D Le suffixe est utilisé pour decimal et les pas double . Il n'y a pas de suffixe explicite pour double --il est supposé être la valeur par défaut.

Solutions

Pour en revenir à votre problème initial, la solution peut varier en fonction de votre version de Powershell :

[BigInt]::Parse

Si vous utilisez Windows Powershell ou Powershell Core <= v6.2, une option consiste à utiliser BigInteger.Parse :

[bigint]::Parse("99999999999999999999999999999") 

Sorties :

99999999999999999999999999999

Litres de grande valeur

Comme indiqué dans les commentaires, une autre option qui fonctionne est de mettre le littéral entre guillemets.

[bigint]'99999999999999999999999999999' 

Sorties

99999999999999999999999999999

Malgré son apparence, il s'agit d'une pas abréviation de [bigint]::new([string]) (voir ci-dessous). Il s'agit plutôt d'un moyen de s'assurer que le littéral n'est pas traité comme un double mais plutôt comme un littéral intégral avec de nombreux chiffres, ce que l'on appelle un "littéral de grande valeur". Voir aussi cette section des documents.

N Suffixe intégral (v7.0+)

Powershell Core 6.2 a introduit de nombreux nouveaux suffixes littéraux pour les types intégraux tels que unsigned, short et byte mais n'en a pas introduit pour les bigint . Cela est apparu dans Powershell Core 7.0 via l'option n suffixe. Cela signifie que vous pouvez maintenant faire ce qui suit :

99999999999999999999999999999n 

Sorties :

99999999999999999999999999999

Voir la documentation pour plus d'informations sur les suffixes disponibles dans Powershell Core.

[BigInt]::new

Si vous deviez essayer [bigint]::new('literal') Powershell reconnaît que vous avez l'intention d'utiliser la valeur en tant que littéral . En fait, il n'y a pas de constructeur pour BigInt qui accepte un string (nous utilisons Parse pour cela) et il n'y a pas non plus de constructeur qui accepte un autre BigInt . Il existe cependant un constructeur qui prend un double . Notre litre de grande valeur commencera comme un BigInt Powershell le convertira alors implicitement en un fichier double (en perdant de la précision) et de le passer ensuite à [bigint]::new([double]) comme la meilleure correspondance, ce qui donne une fois de plus un résultat erroné :

[bigint]::new('99999999999999999999999999999') 

Sorties :

99999999999999991433150857216

10voto

Dmitry Kolchev Points 774

Malheureusement, C# n'a pas de littéral pour BigInteger. Il existe deux façons d'instancier un BigInteger :

  1. Conversion à partir d'un type primitif comme int, long (cast ou utilisation d'un constructeur)
  2. Parse à partir d'une chaîne de caractères en utilisant BigInteger.Parse

BigInteger test = BigInteger.Parse("32439845934875938475398457938457389475983475893475389457839475");
Console.WriteLine(test.ToString());
// output: 32439845934875938475398457938457389475983475893475389457839475

Voir Comment PowerShell analyse les littéraux numériques

9voto

mklement0 Points 12597

Pour compléter les réponses existantes et utiles - notamment pinkfloydx33's - avec un résumé succinct :

Par défaut, toutes les versions de PowerShell jusqu'à la version 7.0 au moins utilisent la fonction [double] comme type de données pour les nombres littéraux qui sont plus grand que [decimal]::MaxValue qui conduit invariablement à une perte de précision .

  • Jusqu'à la version 6.x (qui comprend Windows PowerShell ), la seule façon d'éviter cela est de utiliser [bigint]::Parse() le nombre étant représenté par un chaîne de caractères :

    A cast works too, as also shown in pinkfloydx33's answer:

    bigint '99999999999999999999999999999'

  • Dans la v7+ vous pouvez utiliser la fonction n suffixe pour désigner un nombre littéral en tant que [bigint] :

    99999999999999999999999999999n # v7+; parses as a bigint, due to suffix 'n'

Note : On peut argumenter que, étant donné que PowerShell est habituellement automatiquement choisit un type de numéro approprié, il doit assumer n dans ce cas, c'est-à-dire qu'il devrait analyser les mots non suffixés 99999999999999999999999999999 en tant que [bigint] et non en tant que [double] - voir cette proposition GitHub .


Pour en savoir plus :

  • Voir about_Numeric_Literals qui affiche tous les suffixes de type numérique, y compris la version de PowerShell dans laquelle ils ont été introduits.

  • Cette réponse résume la façon dont les nombres littéraux sont interprétés dans PowerShell.

    • En bref : pour entier littéraux, [int] est le plus petit type jamais choisi, avec [long] o [decimal] choisis en fonction des besoins pour tenir compte de valeurs plus importantes, avec [double] utilisé pour les valeurs supérieures à [decimal]::MaxValue .

1voto

SP Tutors Points 238

Un peu plus d'informations sur le point de vue des métadonnées,

PowerShell et C# utiliseront tous deux le même module en .NET Core pour obtenir le BigInt et vous pouvez consulter les métadonnées pour le type de données BigInteger struct en

C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1\System.Runtime.Numerics.dll

Il s'agit notamment des constructeurs de

public BigInteger(byte[] value);
public BigInteger(decimal value);
public BigInteger(double value);
public BigInteger(int value);
public BigInteger(long value);
public BigInteger(float value);
public BigInteger(uint value);
public BigInteger(ulong value);
public BigInteger(ReadOnlySpan<byte> value, bool isUnsigned = false, bool isBigEndian = false);

Ce qui signifie que la base

System.Numerics.BigInteger test = 12345;

tentera par inadvertance de convertir la valeur transmise au constructeur en l'un de ces types de données, dont la valeur la plus élevée est la valeur maximale de double Cependant, C# n'essaie pas de convertir un nombre en double à moins que cela ne soit spécifié avec l'option D suffixe La valeur maximale qui n'a pas besoin de suffixe serait donc ULong qui a la valeur maximale de 18446744073709551615 (D'après ULong.MaxValue ) qui se trouve être inférieur à 99999999999999999999 le nombre qui a provoqué l'erreur de constante intégrale, mais supérieur à 9999999999999999999 , un caractère en moins. C'est pourquoi le simple fait de faire

System.Numerics.BigInteger test = 99999999999999999999;

sera erronée. Cependant, le Parse() méthode en BigInteger peut prendre des valeurs autres que les types entiers du constructeur, il prend les chaînes de caractères :

public static BigInteger Parse(ReadOnlySpan<char> value, NumberStyles style = NumberStyles.Integer, IFormatProvider provider = null);
public static BigInteger Parse(string value);
public static BigInteger Parse(string value, NumberStyles style);
public static BigInteger Parse(string value, NumberStyles style, IFormatProvider provider);
public static BigInteger Parse(string value, IFormatProvider provider);

Comme vous pouvez le constater, le Parse() méthode pour System.Numerics.BigInteger prendra chaîne de caractères qui n'ont pas de limites puisqu'il ne s'agit pas d'entiers mais de mots. C'est pourquoi le Parse() méthode en effet volonté vous offrent un espace de valeur illimité.

Pour ce qui est de PowerShell, comme dans d'autres réponses, dites, tout ce qui dépasse le [decimal] tentera d'être convertie en valeur [double] type de données qui présente de nombreuses inexactitudes et le [double] valeur maximale du type de données es 309 chiffres et c'est pourquoi les erreurs n'apparaissent qu'après le 309e chiffre.

[double]::MaxValue
1.79769313486232E+308

Pour convertir cette valeur en valeur normale, nous déplacerons la virgule sur 308 fois, ce qui donnera environ

179769313486232000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

étant le double le plus élevé possible. Le type de données `[double] dans PowerShell a également des propriétés très étranges qui sont également très imprécises comme

[BigInt][double]9999999999999999999999
10000000000000000000000
[BigInt][double]9999999999999999999999999
10000000000000000905969664
[double]9999999999999999999
1E+19

Étant donné que PowerShell obtient le BigInt provient également de la même structure qu'en C#, les méthodes et les constructeurs sont les mêmes et les Parse() fonctionnera de la même manière en PowerShell qu'en C#. Des changements ont été apportés à PowerShell 7 pour permettre à la fonction N pour être automatiquement converti directement en BigInt .

BigInt n'utilise pas non plus la notation scientifique, de sorte qu'il obtiendra toujours la valeur exacte si un autre type de données est utilisé, de sorte que pour obtenir la valeur exacte, vous pouvez utiliser

[BigInt]([double]::MaxValue)

Ce qui vous permettra d'obtenir

179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368

étant le double le plus élevé possible.


Commandes souhaitées

PowerShell 6.x et moins

[BigInt]::Parse("99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999")

PowerShell 7.0 et supérieur

99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999N

C#

System.Numerics.Biginteger test = System.Numerics.BigInteger.Parse("999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999")

Prograide.com

Prograide est une communauté de développeurs qui cherche à élargir la connaissance de la programmation au-delà de l'anglais.
Pour cela nous avons les plus grands doutes résolus en français et vous pouvez aussi poser vos propres questions ou résoudre celles des autres.

Powered by:

X