You've already forked lazarus-ccr
LazStats: Add tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7925 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
64
applications/lazstats/tests/normalDist/NormalDist_Test.lpi
Normal file
64
applications/lazstats/tests/normalDist/NormalDist_Test.lpi
Normal file
@@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<MainUnitHasScaledStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="NormalDist_Test"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<Units>
|
||||
<Unit>
|
||||
<Filename Value="NormalDist_Test.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="NormalDist_Test"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="..\..\source\units"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions>
|
||||
<Item>
|
||||
<Name Value="EAbort"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
26
applications/lazstats/tests/normalDist/NormalDist_Test.pas
Normal file
26
applications/lazstats/tests/normalDist/NormalDist_Test.pas
Normal file
@@ -0,0 +1,26 @@
|
||||
program NormalDist_Test;
|
||||
|
||||
uses
|
||||
MathUnit;
|
||||
|
||||
const
|
||||
dx = 0.2;
|
||||
Range = 3.0;
|
||||
|
||||
var
|
||||
i: Integer;
|
||||
x, p, z: Double;
|
||||
begin
|
||||
WriteLn('x':20, 'p':20, 'z':20);
|
||||
|
||||
x := -Range;
|
||||
while x <= Range do begin
|
||||
p := NormalDist(x);
|
||||
z := InverseNormaldist(p);
|
||||
WriteLn(x:20:5, p:20:5, z:20:5);
|
||||
x := x + dx;
|
||||
end;
|
||||
|
||||
Readln;
|
||||
end.
|
||||
|
Reference in New Issue
Block a user