Delphi-PRAXiS
Seite 4 von 5   « Erste     234 5      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Größte Integer-Variable? (https://www.delphipraxis.net/22676-groesste-integer-variable.html)

yankee 25. Mai 2004 19:05

Re: Größte Integer-Variable?
 
Also Int64 schafft bis 9x10^18
Extended schafft bis zu 1.1x10^4932

Nicolai1234 25. Mai 2004 19:06

Re: Größte Integer-Variable?
 
Ich brauch aber 365^365 bzw. 2^3106

yankee 25. Mai 2004 19:14

Re: Größte Integer-Variable?
 
da sagt mein Taschenrechner:
Error: Overflow. Der kann nur bis 10^99 *g*

gmarts 25. Mai 2004 19:14

Re: Größte Integer-Variable?
 
ich schaffe (1x10^2147483648)-1 ! Also etwas :-D mehr als Extended!

gmarts 25. Mai 2004 19:25

Re: Größte Integer-Variable?
 
365^365=172542277632122737559895849663573864796679 83437847939938563481785851424023385637051897539230
75035974875158775542724004233909047244752131293832 56571734521752761522455219286852015259932541676633
41514519892888904917146005801395963582625898509608 98645756592395725554379776567871434784382986995752
80824310927416454850159603351152612899693013477557 14803571488871121346614749855590486883795660824966
47493756678799211489350885733213726182153186218494 20733459386638493237148318471142878922179172279841
83930593514152586871192242700598783287017487487765 55330544492620123172981297111394462336647971055556
89165137283519246240241333680255598722713995635104 59708557216405820031273973241186180378370923425940 4
09056636287146680400467219336091320128145755998343 54950278239604949911499526940394708909106151962021 6
74790296426613120255836465655776825359869391700568 00966958628105171291336507223938563485237929534987 9
62043590670191406388767063617706298828125

Eine sehr sinnvolle Zahl.

Nicolai1234 25. Mai 2004 19:27

Re: Größte Integer-Variable?
 
Danke aber in meiner Rechnung (s.o.) brauche ich 365^n (0<n<366) also wären die Exponenten nicht schlecht!

gmarts 25. Mai 2004 19:32

Re: Größte Integer-Variable?
 
Delphi-Quellcode:
var i:integer;

uses kubmstrings;

procedure bla;
var i:integer;
  basis,exponent:string;
begin
 s:='1';
 basis:='365';
 exponent:='365'
 for i:=1 to exponent do
  begin
   s:=multstr(s,basis);
  end;
 result:=s;
end;
So schwer ist das doch nicht! :wall:

Nicolai1234 25. Mai 2004 19:35

Re: Größte Integer-Variable?
 
War mir schon klar, aber ich meine nur das dein Ergebis von oben mir nichts brachte!
O
bwohl hier ein Fehler drin ist!
Zitat:

Zitat von gmarts
Delphi-Quellcode:
var i:integer;

uses kubmstrings;

procedure bla;
var i:integer;
  basis,exponent:string;
begin
 s:='1';
 basis:='365';
 exponent:='365'
 for i:=1 to exponent do
  begin
   s:=multstr(s,basis);
  end;
 result:=s;
end;

exponent ist ein string und dann kannst du ihn nicht so einfach i zuweisen! *g*

gmarts 25. Mai 2004 19:39

Re: Größte Integer-Variable?
 
:stupid: *lacht* Stimmt, das kommt davon, wenn man auf numerische Variablen verzichten möchte und sich die ganze Zeit mit Strings rumgeschlagen hat! :-D



Mehr Rechte für STRINGS als Zählvariablen in Schleifen!

yankee 25. Mai 2004 19:52

Re: Größte Integer-Variable?
 
Kannst du nicht eingfach mit unausgerechneten Potenzen rechnen? Also mit irgendwelchen Potenzgesetzen? Das sollte doch kein Problem sein.
Ich kenne da aber jemanden, den ich mal fragen kann, wie man sowas in der Richtung realisieren könnte.


Alle Zeitangaben in WEZ +1. Es ist jetzt 16:02 Uhr.
Seite 4 von 5   « Erste     234 5      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz