... und hier ein CodeSchippsel für ln mit ner Taylor-Reihe:
Delphi-Quellcode:
function my_ln (x:real):real;
Var i,n:integer; s,ds:real;
Begin
s:=0;
for i:=1 to steps do
begin
n:=2*i-1;
ds:=(x-1)/(x+1);
ds:=my_pow(ds,n)*1/n;
s:=s+ds;
end;
my_ln:=s*2;
End;
Medium schrieb:
Zitat:
Da bin ich mal auf deine Schleife für e^-3,1415927 gespannt Wink
Was ist an der Zahl so spannend?