![]() |
Re: Hochzahl ?
Weil das nahezu identisch mit der Funktion "Power" ist (bei gebrochenen Exponenten) ;)
|
Re: Hochzahl ?
Hallo Dax,
Zitat:
Für alle die es interessiert: 100.000.000 Zyklen 5 hoch 10: mypow 21s rekursiv 20s nonrek 18s negative Basen gehen mit MyPow nicht. Grüße vom marabu |
Re: Hochzahl ?
Okay, so gehts mit negativen Basen ;)
Delphi-Quellcode:
function MyPow(Base, Exponent: Integer): Int64;
var i: Integer; begin i := 1 - 2 * (Base shr (sizeof(Base)-1)); Result := i*Round(Exp(Exponent * Ln(i*Base))); end; |
Re: Hochzahl ?
Zitat:
aber ich hab mal noch ne frage ... y=b*a(hoch)x wie kann ich die formel nach a auflösen ?? also aufm papier ?? ich bekomm das nich hin mit dem hoch x edit: bzw wie zieh ich die x-te wurzel in delhi ?? weil die formel is ja eigentlich a = ((x-te wurzel)y/a) |
Re: Hochzahl ?
Zitat:
Ich empfehle dir eine Neuinstallation von Delphi, wenn du keine Math-Unit hast :gruebel: |
Re: Hochzahl ?
ne ich hab 7 und 2k5 personal und in denn is math nich drin
|
Re: Hochzahl ?
Zitat:
Sowohl mit Delphi 7 Personal als auch mti Delphi 2005 Personal. |
Re: Hochzahl ?
Zur x-ten Wurzel: Das sollte doch
Delphi-Quellcode:
sein?
a := (y / b, 1 / x);
|
Re: Hochzahl ?
n-te Wurzel(x) = power(x, 1/n)
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 17:05 Uhr. |
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