Autor Beitrag
Comp-Freak
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89



BeitragVerfasst: Di 22.05.07 10:17 
Ich bastel gerade an einem pi algorithmus rum und moechte das delphi mehr als 18 stellen (extended) speichern kann. Gibts nicht irgendeine unendlichnummer? Hab keine lust das irgendwie mit strings und extendeds hinzuhauhen.

Sag Schon mahl danke.
elundril
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3747
Erhaltene Danke: 123

Windows Vista, Ubuntu
Delphi 7 PE "Codename: Aurora", Eclipse Ganymede
BeitragVerfasst: Di 22.05.07 10:19 
mach ein array von mehreren extended die du dann später richtig zusammenfügst!

lg el

P.S: auf den Speicherplatz aufpassen!!

_________________
This Signature-Space is intentionally left blank.
Bei Beschwerden, bitte den Beschwerdebutton (gekennzeichnet mit PN) verwenden.
Comp-Freak Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89



BeitragVerfasst: Di 22.05.07 10:27 
aber ich kann doch nicht richtig kalkulieren so oder? wie wuerde ich dan zwei 'supernummern' addieren? Wie machen es denn all die anderen programme?
arj
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 378

Win XP/Vista, Debian, (K)Ubuntu
Delphi 5 Prof, Delphi 7 Prof, C# (#Develop, VS 2005), Java (Eclipse), C++, QT, PHP, Python
BeitragVerfasst: Di 22.05.07 10:37 
Such mal nach TBigNumber oder sowas ähnliches.
Eine reelle Zahl kann man ja auch als Zahl ohne Komma darstellen und somit als Ganzzahl.
Weiterhin würde ich mal im Forum nach Berechnung von PI suchen, da gabs schon mal was.
Comp-Freak Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89



BeitragVerfasst: Di 22.05.07 11:22 
danke fuer die schnelle antwort. ich hab jezt bignum v2 runtergeholt und sizte gerade fest beim zuweisen einer bignum:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var
 bla : tbignum;
begin
 bla := Wass Hier?;
end;


p.s. pi wurde hier diskutiert mit extendets...

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 22.05.07 11:41 
Welche der zahlreichen Bibliotheken ;-)

Bei meiner nennt sich die Funktion BM_Assign bzw. BM_StrToBigNum ...

Im Allgemeinen weist Du aber solche Dinge nicht mit := zu, sondern über die von der Bibliothek bereitgestellten Funktionen ...

Hinweis zu meiner Lib (ist aber bei anderen nicht anders): Es werden häufig nur Integers supported. Wenn Du hohe Genauigkeit haben willst, solltest Du auch nur Integer verwenden und nur abschließend die Konvertierung von Integer nach Float machen. Nachteil daran ist, dass Du extrem Bruchrechnung ggf. drin hast ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Comp-Freak Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89



BeitragVerfasst: Di 22.05.07 12:55 
habs jezt mit .assign probiert aber klappt immer noch nicht :(, kent keiner hier bignums?
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Di 22.05.07 13:14 
Ich fühle mich ignoriert ...

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
Comp-Freak Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 89



BeitragVerfasst: Di 22.05.07 13:23 
Oops, Spates DANKE :).
ich benuezte jezt bignum.fromstring('5'); oder fromlong(5);
nach dem zuweisen kommt einen schoenen windows error der schliessen oder details button hat :(. Ich hab probiert bignumbers.create davor zu machen aber dan haengt sich mein computer voellig auf :(

Edit:
habs jezt rauss wies geht:
mann muss alle proceduren in der unit BIGNUM auf public sezten und dan diesen code benuezten fuer standard zeug:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.Button1Click(Sender: TObject);
var
 bignum : tbignum;
begin
 bignum := tbignum.Create;
 bignum.FromLong(5);
 form1.Caption := bignum.AsString;
 bignum.Destroy;
end;


Moderiert von user profile iconChristian S.: Code- durch Delphi-Tags ersetzt