Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,33 @@
program Calculating_the_value_of_e;
{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}
{$IFDEF WINDOWS}
{$APPTYPE CONSOLE}
{$ENDIF}
uses
SysUtils;
const
EPSILON = 1.0e-14;
function Get_E: Extended;
var
recfact: Extended;
n: Integer;
begin
recfact := 1.0;
Result := 2.0;
n := 2;
repeat
recfact /= n;
inc(n);
Result := Result + recfact;
until (recfact < EPSILON);
end;
begin
writeln(format('calc e = %.15f intern e= %.15f', [Get_E,exp(1.0)]));
{$IFDEF WINDOWS}readln;{$ENDIF}
end.