%------------------------------------------------------------------------------ % Generalized Root function % % Author: David Lester, Manchester University & NIA % % Version 1.0 19/08/08 Initial version (DRL) % % (We can take nth-roots of negative numbers provided n is odd. % I could believe that the type-constraints make this unusable; % feedback appreciated.) %------------------------------------------------------------------------------
root: THEORY
BEGIN
IMPORTING reals@sign,
nn_root
x,y,z: VAR real
epsilon,
delta: VAR posreal
pm,pn: VAR posnat
nx: VAR nnreal
root(x:real,pn:{pm | x >= 0OR odd?(pm)}):real = nn_root(abs(x),pn)*sign(x)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.