Autor Beitrag
GothicSoldier
Hält's aus hier
Beiträge: 15



BeitragVerfasst: Mi 15.09.04 20:22 
Huhu

ich will nen rechenprogramm proggen, nun weiß ich aber nicht , wie ich die Zahl PI in delphi quelltext einzugeben hab.

bitte um hilfe
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Mi 15.09.04 20:27 
Einfach "pi" hinschreiben. Das Leben kann so einfach sein. ;-)

Gruß,
Jörg

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Do 16.09.04 11:10 
oder 3,1415926535897932385 :twisted:

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
matze.de
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 576

Win95, Win98 SE, WinXp Prof SP2
D7P, D8P, FPC2.0
BeitragVerfasst: Do 16.09.04 13:43 
ich könnte Pi hier auch mit bis zu 32 000 000 Stellen posten :twisted: .

mfg matze

_________________
si tacuisses, philosophus mansisses.
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Do 16.09.04 13:46 
Viel interessanter wäre der Algorithmus, mit dem du die Zweiundreißigmillionen Stellen berechnest. ;-)

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 16.09.04 13:48 
Wenn Ihr ernsthaft Interesse habt, dann suche ich den Algorithmus mal raus. Irngendwo habe ich den zu hause noch rumliegen.
rstaeker
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 94

WIN 2000
D6 Prof
BeitragVerfasst: Do 16.09.04 13:58 
jasocul hat folgendes geschrieben:
Wenn Ihr ernsthaft Interesse habt, dann suche ich den Algorithmus mal raus. Irngendwo habe ich den zu hause noch rumliegen.


Also ich hätte ersnthaft Interesse an dem Algorithmus.
Es gibt ja verschiedene Möglichkeiten, PI zu berechnen, soweit mir bekannt ist.

MfG Rene
highhatcompy
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 190

Win2000,Win XP,Linux(SuSE9.2)
Delphi 5 Prof.
BeitragVerfasst: Do 16.09.04 13:58 
Hallo,

versuche es mal so:

ausblenden Delphi-Quelltext
1:
2:
3:
...
const PI = 3.141592;
...

Die Genauigkeit sollte reichen und wenn nicht, dann wende Dich vertrauensvoll an matze.de :lol: !

Highhatcompy

_________________
Bist Du ein Programmierer, so wirst Du gegen Computer, Hardwarehersteller und Anwender verlieren. (Quelle: Murphy's Computer-Gesetz)
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Do 16.09.04 13:59 
Denn schau ich mal nach. Kann aber evtl. übers Wochenende dauern.
Physikerpepe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Do 16.09.04 23:02 
So Jungs, um das Ganze nicht zu spannen zu machen: EINE mögliche Formel zur berechnung von Pi ist die unendliche Reihe:

1 + 1/4 + 1/9 +1/16 + ... + 1/(n*n) = (pi*pi)/6

kurz: pi = sqrt{6*(Sum[1/(n*n)])}

Es gibt jedoch noch minedtens 1000 weitere solcher (und weitaus eleganterer) Formeln.

Aber ganz nebenbei:

Mite dieser Unendlichen Reihe ein Programm schreiben und Pi auf 200000 Stellen genau berechen kann man ganz schnell und es gibt dazu schon etliche Weltrekorde ABER:

Man benötigt nur 40 Nachkommastellen, um den Umfang eines Kreises vom Durchmesser des Universums (ca. 10^26 Meter) auf 10^(-14) Meter genau zu berechnen! :lol:

In diesem Sinne: EINFACH "pi" in Delphi eingeben und alles wird gut!

Pepe
.Chef
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1112



BeitragVerfasst: Fr 17.09.04 08:22 
Physikerpepe hat folgendes geschrieben:
Man benötigt nur 40 Nachkommastellen, um den Umfang eines Kreises vom Durchmesser des Universums (ca. 10^26 Meter) auf 10^(-14) Meter genau zu berechnen! :lol:

Wie immer ist der praktische Aspekt allenfalls nebensächlich, wenn nicht sogar völlig uninteressant. Es geht vielmehr um die Herausforderung, z.B. wie verwaltet man ein paar Millionen Stellen, wenn man damit rechnet. Und vor allem, wie macht man es _schnell_. ;-)

_________________
Die Antworten auf die 5 häufigsten Fragen:
1. Copy(), Pos(), Length() --- 2. DoubleBuffered:=True; --- 3. Application.ProcessMessages bzw. TThread --- 4. ShellExecute() --- 5. Keine Vergleiche von Real-Typen mit "="!
GSE
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 740

Win 2k, Win XP Pro
D5 Prof, D6 Ent, D2k5 PE
BeitragVerfasst: So 19.09.04 14:12 
alternati vkanns t du auch dieses file beilegen und beim programmstart laden :wink:

mfg
GSE

_________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs
and the universe trying to produce bigger and better idiots. So far, the universe is winning. (Richard Cook)
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: So 19.09.04 21:44 
Wäre ne Idee :D Oder die File für alle Modem-Besitzer beim Starten ausm Internet laden :D

_________________
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.