Skip to content

Commit 69ac88a

Browse files
authored
Add hyperbolic functions and logarithms. (#38)
2 parents f0683be + 43feac4 commit 69ac88a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+2266
-100
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,6 @@ cython_debug/
227227
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
228228
#.idea/
229229
/Steppable.build/
230+
231+
# MATLAB scripts
232+
*.asv

.idea/editor.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ SET(COMPONENTS
100100
division
101101
root
102102
factorial
103-
trig)
103+
trig hyp log)
104104
# NEW_COMPONENT: PATCH Do NOT remove the previous comment.
105105

106106
SET(TARGETS ${COMPONENTS} util)

Steppable.sln

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Microsoft Visual Studio Solution File, Format Version 12.00
2-
# Visual Studio Version 16
3-
VisualStudioVersion = 16.0.34301.259
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.11.35017.193
44
MinimumVisualStudioVersion = 10.0.40219.1
55
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calc", "calc.vcxproj", "{0A900AAA-AC12-48CF-85CF-8BB0C0130512}"
66
EndProject
@@ -71,6 +71,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baseConvert", "src\baseConv
7171
EndProject
7272
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decimalConvert", "src\decimalConvert\decimalConvert.vcxproj", "{55A00CFD-37B4-4618-A8D3-445A05DA759A}"
7373
EndProject
74+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "factorial", "src\factorial\factorial.vcxproj", "{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}"
75+
EndProject
76+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "root", "src\root\root.vcxproj", "{127594DF-529C-426F-AE9B-C46EC403CDBA}"
77+
EndProject
78+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trig", "src\trig\trig.vcxproj", "{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}"
79+
EndProject
80+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRoot", "tests\testRoot.vcxproj", "{09060239-6270-4BE5-BB4E-FDD22EA3C49D}"
81+
EndProject
82+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testTrig", "tests\testTrig.vcxproj", "{7C777575-7A1D-4B2E-8E89-07E25EB676A9}"
83+
EndProject
84+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testFactors", "tests\testFactors.vcxproj", "{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}"
85+
EndProject
7486
Global
7587
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7688
Debug|x64 = Debug|x64
@@ -255,6 +267,54 @@ Global
255267
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x64.Build.0 = Release|x64
256268
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x86.ActiveCfg = Release|Win32
257269
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x86.Build.0 = Release|Win32
270+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x64.ActiveCfg = Debug|x64
271+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x64.Build.0 = Debug|x64
272+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x86.ActiveCfg = Debug|Win32
273+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x86.Build.0 = Debug|Win32
274+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x64.ActiveCfg = Release|x64
275+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x64.Build.0 = Release|x64
276+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x86.ActiveCfg = Release|Win32
277+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x86.Build.0 = Release|Win32
278+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x64.ActiveCfg = Debug|x64
279+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x64.Build.0 = Debug|x64
280+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x86.ActiveCfg = Debug|Win32
281+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x86.Build.0 = Debug|Win32
282+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x64.ActiveCfg = Release|x64
283+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x64.Build.0 = Release|x64
284+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x86.ActiveCfg = Release|Win32
285+
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x86.Build.0 = Release|Win32
286+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x64.ActiveCfg = Debug|x64
287+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x64.Build.0 = Debug|x64
288+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x86.ActiveCfg = Debug|Win32
289+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x86.Build.0 = Debug|Win32
290+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x64.ActiveCfg = Release|x64
291+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x64.Build.0 = Release|x64
292+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x86.ActiveCfg = Release|Win32
293+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x86.Build.0 = Release|Win32
294+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x64.ActiveCfg = Debug|x64
295+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x64.Build.0 = Debug|x64
296+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x86.ActiveCfg = Debug|Win32
297+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x86.Build.0 = Debug|Win32
298+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x64.ActiveCfg = Release|x64
299+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x64.Build.0 = Release|x64
300+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x86.ActiveCfg = Release|Win32
301+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x86.Build.0 = Release|Win32
302+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x64.ActiveCfg = Debug|x64
303+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x64.Build.0 = Debug|x64
304+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x86.ActiveCfg = Debug|Win32
305+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x86.Build.0 = Debug|Win32
306+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x64.ActiveCfg = Release|x64
307+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x64.Build.0 = Release|x64
308+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x86.ActiveCfg = Release|Win32
309+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x86.Build.0 = Release|Win32
310+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x64.ActiveCfg = Debug|x64
311+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x64.Build.0 = Debug|x64
312+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x86.ActiveCfg = Debug|Win32
313+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x86.Build.0 = Debug|Win32
314+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x64.ActiveCfg = Release|x64
315+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x64.Build.0 = Release|x64
316+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x86.ActiveCfg = Release|Win32
317+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x86.Build.0 = Release|Win32
258318
EndGlobalSection
259319
GlobalSection(SolutionProperties) = preSolution
260320
HideSolutionNode = FALSE
@@ -282,6 +342,12 @@ Global
282342
{F74A691E-785E-43F1-9D99-6474918BD7DE} = {B48EC0F0-08F0-4BEE-AE66-BF92513F4A3C}
283343
{00B3E92A-8C55-4D70-8A27-8F0AEBF5872D} = {254B33CA-1687-41C5-9060-FBF4EF09FECD}
284344
{55A00CFD-37B4-4618-A8D3-445A05DA759A} = {254B33CA-1687-41C5-9060-FBF4EF09FECD}
345+
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
346+
{127594DF-529C-426F-AE9B-C46EC403CDBA} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
347+
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
348+
{09060239-6270-4BE5-BB4E-FDD22EA3C49D} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
349+
{7C777575-7A1D-4B2E-8E89-07E25EB676A9} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
350+
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
285351
EndGlobalSection
286352
GlobalSection(ExtensibilityGlobals) = postSolution
287353
SolutionGuid = {0C3C77D4-6690-439D-B991-2C8628BEA398}

base.vcxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@
2929
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
3030
<ConfigurationType>StaticLibrary</ConfigurationType>
3131
<UseDebugLibraries>true</UseDebugLibraries>
32-
<PlatformToolset>v142</PlatformToolset>
32+
<PlatformToolset>v143</PlatformToolset>
3333
<CharacterSet>Unicode</CharacterSet>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3636
<ConfigurationType>StaticLibrary</ConfigurationType>
3737
<UseDebugLibraries>false</UseDebugLibraries>
38-
<PlatformToolset>v142</PlatformToolset>
38+
<PlatformToolset>v143</PlatformToolset>
3939
<WholeProgramOptimization>true</WholeProgramOptimization>
4040
<CharacterSet>Unicode</CharacterSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4343
<ConfigurationType>StaticLibrary</ConfigurationType>
4444
<UseDebugLibraries>true</UseDebugLibraries>
45-
<PlatformToolset>v142</PlatformToolset>
45+
<PlatformToolset>v143</PlatformToolset>
4646
<CharacterSet>Unicode</CharacterSet>
4747
</PropertyGroup>
4848
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4949
<ConfigurationType>StaticLibrary</ConfigurationType>
5050
<UseDebugLibraries>false</UseDebugLibraries>
51-
<PlatformToolset>v142</PlatformToolset>
51+
<PlatformToolset>v143</PlatformToolset>
5252
<WholeProgramOptimization>true</WholeProgramOptimization>
5353
<CharacterSet>Unicode</CharacterSet>
5454
</PropertyGroup>

calc.vcxproj

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,30 @@
2727
<ClCompile Include="src\comparison\comparisonReport.cpp" />
2828
<ClCompile Include="src\division\division.cpp" />
2929
<ClCompile Include="src\division\divisionReport.cpp" />
30+
<ClCompile Include="src\factorial\factorial.cpp" />
31+
<ClCompile Include="src\factorial\factorialReport.cpp" />
3032
<ClCompile Include="src\multiply\multiply.cpp" />
3133
<ClCompile Include="src\multiply\multiplyReport.cpp" />
3234
<ClCompile Include="src\power\power.cpp" />
3335
<ClCompile Include="src\power\powerReport.cpp" />
36+
<ClCompile Include="src\root\root.cpp" />
37+
<ClCompile Include="src\root\rootReport.cpp" />
3438
<ClCompile Include="src\subtract\subtract.cpp" />
3539
<ClCompile Include="src\subtract\subtractReport.cpp" />
40+
<ClCompile Include="src\trig\trig.cpp" />
41+
<ClCompile Include="src\trig\trigReport.cpp" />
3642
</ItemGroup>
3743
<ItemGroup>
3844
<ClInclude Include="src\abs\absReport.hpp" />
3945
<ClInclude Include="src\add\addReport.hpp" />
4046
<ClInclude Include="src\comparison\comparisonReport.hpp" />
4147
<ClInclude Include="src\division\divisionReport.hpp" />
48+
<ClInclude Include="src\factorial\factorialReport.hpp" />
4249
<ClInclude Include="src\multiply\multiplyReport.hpp" />
4350
<ClInclude Include="src\power\powerReport.hpp" />
51+
<ClInclude Include="src\root\rootReport.hpp" />
4452
<ClInclude Include="src\subtract\subtractReport.hpp" />
53+
<ClInclude Include="src\trig\trigReport.hpp" />
4554
</ItemGroup>
4655
<ItemGroup>
4756
<ProjectReference Include="util.vcxproj">
@@ -59,26 +68,26 @@
5968
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
6069
<ConfigurationType>StaticLibrary</ConfigurationType>
6170
<UseDebugLibraries>true</UseDebugLibraries>
62-
<PlatformToolset>v142</PlatformToolset>
71+
<PlatformToolset>v143</PlatformToolset>
6372
<CharacterSet>Unicode</CharacterSet>
6473
</PropertyGroup>
6574
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
6675
<ConfigurationType>StaticLibrary</ConfigurationType>
6776
<UseDebugLibraries>false</UseDebugLibraries>
68-
<PlatformToolset>v142</PlatformToolset>
77+
<PlatformToolset>v143</PlatformToolset>
6978
<WholeProgramOptimization>true</WholeProgramOptimization>
7079
<CharacterSet>Unicode</CharacterSet>
7180
</PropertyGroup>
7281
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
7382
<ConfigurationType>StaticLibrary</ConfigurationType>
7483
<UseDebugLibraries>true</UseDebugLibraries>
75-
<PlatformToolset>v142</PlatformToolset>
84+
<PlatformToolset>v143</PlatformToolset>
7685
<CharacterSet>Unicode</CharacterSet>
7786
</PropertyGroup>
7887
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
7988
<ConfigurationType>StaticLibrary</ConfigurationType>
8089
<UseDebugLibraries>false</UseDebugLibraries>
81-
<PlatformToolset>v142</PlatformToolset>
90+
<PlatformToolset>v143</PlatformToolset>
8291
<WholeProgramOptimization>true</WholeProgramOptimization>
8392
<CharacterSet>Unicode</CharacterSet>
8493
</PropertyGroup>

calc.vcxproj.filters

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@
5353
<ClCompile Include="src\power\powerReport.cpp">
5454
<Filter>Source Files</Filter>
5555
</ClCompile>
56+
<ClCompile Include="src\trig\trig.cpp">
57+
<Filter>Source Files</Filter>
58+
</ClCompile>
59+
<ClCompile Include="src\trig\trigReport.cpp">
60+
<Filter>Source Files</Filter>
61+
</ClCompile>
62+
<ClCompile Include="src\root\root.cpp">
63+
<Filter>Source Files</Filter>
64+
</ClCompile>
65+
<ClCompile Include="src\root\rootReport.cpp">
66+
<Filter>Source Files</Filter>
67+
</ClCompile>
68+
<ClCompile Include="src\factorial\factorialReport.cpp">
69+
<Filter>Source Files</Filter>
70+
</ClCompile>
71+
<ClCompile Include="src\factorial\factorial.cpp">
72+
<Filter>Source Files</Filter>
73+
</ClCompile>
5674
</ItemGroup>
5775
<ItemGroup>
5876
<ClInclude Include="src\add\addReport.hpp">
@@ -76,5 +94,14 @@
7694
<ClInclude Include="src\power\powerReport.hpp">
7795
<Filter>Header Files</Filter>
7896
</ClInclude>
97+
<ClInclude Include="src\factorial\factorialReport.hpp">
98+
<Filter>Header Files</Filter>
99+
</ClInclude>
100+
<ClInclude Include="src\root\rootReport.hpp">
101+
<Filter>Header Files</Filter>
102+
</ClInclude>
103+
<ClInclude Include="src\trig\trigReport.hpp">
104+
<Filter>Header Files</Filter>
105+
</ClInclude>
79106
</ItemGroup>
80107
</Project>

include/constants.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,6 @@ namespace steppable::constants
8484
// -------------------------------------------------------
8585
constexpr const std::string_view& PI_OVER_200 =
8686
"0.01570796326794896619231321691639716312084074699687552942986246296153903203140449499314017412671058534";
87+
88+
constexpr const std::string_view& E = "2.718281828459045090795598298427648842334747314453125";
8789
} // namespace steppable::constants

0 commit comments

Comments
 (0)