home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Interdit
/
pc-interdit.iso
/
mathe
/
ratest.pas
< prev
Wrap
Pascal/Delphi Source File
|
1994-10-04
|
1KB
|
31 lines
Program RATEST;
{$n-} {désactive le coprocesseur}
Function Racfct(Radicande:LongInt):Integer;external;
{$l c:\edition\prog\fr\asm\racine}
{reporter ici le chemin d'accès au module assembleur racine.obj!}
var i:word; {compteur d'itérations}
n:Integer; {résultat du calcul entier }
r:Real; {résultat du calcul real }
Procedure racine_nouvo; {calcule la racine par approximations entières }
Begin
For i:=1 to 10000 do {10000 fois }
n:=Racfct(87654321); {pour pouvoir comparer la vitesse }
End;
Procedure racine_real; {calcule la racine par fonction Pascal }
Begin
For i:=1 to 10000 do {10000 fois}
r:=Sqrt(87654321); {pour pouvoir comparer la vitesse }
End;
Begin
writeLn;
WriteLn('Extraction de racine par fonction Pascal:');
Racine_Real;
WriteLn('Résultat: ',r:0:0);
WriteLn('Extraction de racine carrée par méthode d''approximations entières:');
racine_nouvo;
WriteLn('Racine: ',n);
End.