Skip to content

Commit

Permalink
Add hyperbolic functions and logarithms. (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZCG-coder committed Jun 29, 2024
2 parents f0683be + 43feac4 commit 69ac88a
Show file tree
Hide file tree
Showing 56 changed files with 2,266 additions and 100 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,6 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
/Steppable.build/

# MATLAB scripts
*.asv
3 changes: 2 additions & 1 deletion .idea/editor.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ SET(COMPONENTS
division
root
factorial
trig)
trig hyp log)
# NEW_COMPONENT: PATCH Do NOT remove the previous comment.

SET(TARGETS ${COMPONENTS} util)
Expand Down
70 changes: 68 additions & 2 deletions Steppable.sln
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.34301.259
# Visual Studio Version 17
VisualStudioVersion = 17.11.35017.193
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "calc", "calc.vcxproj", "{0A900AAA-AC12-48CF-85CF-8BB0C0130512}"
EndProject
Expand Down Expand Up @@ -71,6 +71,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "baseConvert", "src\baseConv
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "decimalConvert", "src\decimalConvert\decimalConvert.vcxproj", "{55A00CFD-37B4-4618-A8D3-445A05DA759A}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "factorial", "src\factorial\factorial.vcxproj", "{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "root", "src\root\root.vcxproj", "{127594DF-529C-426F-AE9B-C46EC403CDBA}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trig", "src\trig\trig.vcxproj", "{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testRoot", "tests\testRoot.vcxproj", "{09060239-6270-4BE5-BB4E-FDD22EA3C49D}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testTrig", "tests\testTrig.vcxproj", "{7C777575-7A1D-4B2E-8E89-07E25EB676A9}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testFactors", "tests\testFactors.vcxproj", "{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand Down Expand Up @@ -255,6 +267,54 @@ Global
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x64.Build.0 = Release|x64
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x86.ActiveCfg = Release|Win32
{55A00CFD-37B4-4618-A8D3-445A05DA759A}.Release|x86.Build.0 = Release|Win32
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x64.ActiveCfg = Debug|x64
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x64.Build.0 = Debug|x64
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x86.ActiveCfg = Debug|Win32
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Debug|x86.Build.0 = Debug|Win32
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x64.ActiveCfg = Release|x64
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x64.Build.0 = Release|x64
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x86.ActiveCfg = Release|Win32
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB}.Release|x86.Build.0 = Release|Win32
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x64.ActiveCfg = Debug|x64
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x64.Build.0 = Debug|x64
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x86.ActiveCfg = Debug|Win32
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Debug|x86.Build.0 = Debug|Win32
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x64.ActiveCfg = Release|x64
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x64.Build.0 = Release|x64
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x86.ActiveCfg = Release|Win32
{127594DF-529C-426F-AE9B-C46EC403CDBA}.Release|x86.Build.0 = Release|Win32
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x64.ActiveCfg = Debug|x64
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x64.Build.0 = Debug|x64
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x86.ActiveCfg = Debug|Win32
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Debug|x86.Build.0 = Debug|Win32
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x64.ActiveCfg = Release|x64
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x64.Build.0 = Release|x64
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x86.ActiveCfg = Release|Win32
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2}.Release|x86.Build.0 = Release|Win32
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x64.ActiveCfg = Debug|x64
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x64.Build.0 = Debug|x64
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x86.ActiveCfg = Debug|Win32
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Debug|x86.Build.0 = Debug|Win32
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x64.ActiveCfg = Release|x64
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x64.Build.0 = Release|x64
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x86.ActiveCfg = Release|Win32
{09060239-6270-4BE5-BB4E-FDD22EA3C49D}.Release|x86.Build.0 = Release|Win32
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x64.ActiveCfg = Debug|x64
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x64.Build.0 = Debug|x64
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x86.ActiveCfg = Debug|Win32
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Debug|x86.Build.0 = Debug|Win32
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x64.ActiveCfg = Release|x64
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x64.Build.0 = Release|x64
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x86.ActiveCfg = Release|Win32
{7C777575-7A1D-4B2E-8E89-07E25EB676A9}.Release|x86.Build.0 = Release|Win32
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x64.ActiveCfg = Debug|x64
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x64.Build.0 = Debug|x64
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x86.ActiveCfg = Debug|Win32
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Debug|x86.Build.0 = Debug|Win32
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x64.ActiveCfg = Release|x64
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x64.Build.0 = Release|x64
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x86.ActiveCfg = Release|Win32
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -282,6 +342,12 @@ Global
{F74A691E-785E-43F1-9D99-6474918BD7DE} = {B48EC0F0-08F0-4BEE-AE66-BF92513F4A3C}
{00B3E92A-8C55-4D70-8A27-8F0AEBF5872D} = {254B33CA-1687-41C5-9060-FBF4EF09FECD}
{55A00CFD-37B4-4618-A8D3-445A05DA759A} = {254B33CA-1687-41C5-9060-FBF4EF09FECD}
{C6B85BA3-8B2A-4778-BAB9-CF7BE46F12DB} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
{127594DF-529C-426F-AE9B-C46EC403CDBA} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
{2B7A46CF-F3C3-4EAE-91EB-96B8DB2A2CD2} = {FF9F8F23-3D4A-4BA7-A511-24A3A75C2436}
{09060239-6270-4BE5-BB4E-FDD22EA3C49D} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
{7C777575-7A1D-4B2E-8E89-07E25EB676A9} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
{7794DD93-CF26-4EDC-B0DB-A803BB3E65EC} = {FBC7F145-C76B-45D5-8C0C-1C2939FC2519}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0C3C77D4-6690-439D-B991-2C8628BEA398}
Expand Down
8 changes: 4 additions & 4 deletions base.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
17 changes: 13 additions & 4 deletions calc.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,30 @@
<ClCompile Include="src\comparison\comparisonReport.cpp" />
<ClCompile Include="src\division\division.cpp" />
<ClCompile Include="src\division\divisionReport.cpp" />
<ClCompile Include="src\factorial\factorial.cpp" />
<ClCompile Include="src\factorial\factorialReport.cpp" />
<ClCompile Include="src\multiply\multiply.cpp" />
<ClCompile Include="src\multiply\multiplyReport.cpp" />
<ClCompile Include="src\power\power.cpp" />
<ClCompile Include="src\power\powerReport.cpp" />
<ClCompile Include="src\root\root.cpp" />
<ClCompile Include="src\root\rootReport.cpp" />
<ClCompile Include="src\subtract\subtract.cpp" />
<ClCompile Include="src\subtract\subtractReport.cpp" />
<ClCompile Include="src\trig\trig.cpp" />
<ClCompile Include="src\trig\trigReport.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\abs\absReport.hpp" />
<ClInclude Include="src\add\addReport.hpp" />
<ClInclude Include="src\comparison\comparisonReport.hpp" />
<ClInclude Include="src\division\divisionReport.hpp" />
<ClInclude Include="src\factorial\factorialReport.hpp" />
<ClInclude Include="src\multiply\multiplyReport.hpp" />
<ClInclude Include="src\power\powerReport.hpp" />
<ClInclude Include="src\root\rootReport.hpp" />
<ClInclude Include="src\subtract\subtractReport.hpp" />
<ClInclude Include="src\trig\trigReport.hpp" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="util.vcxproj">
Expand All @@ -59,26 +68,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
27 changes: 27 additions & 0 deletions calc.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,24 @@
<ClCompile Include="src\power\powerReport.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\trig\trig.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\trig\trigReport.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\root\root.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\root\rootReport.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\factorial\factorialReport.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="src\factorial\factorial.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\add\addReport.hpp">
Expand All @@ -76,5 +94,14 @@
<ClInclude Include="src\power\powerReport.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\factorial\factorialReport.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\root\rootReport.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="src\trig\trigReport.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
2 changes: 2 additions & 0 deletions include/constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,6 @@ namespace steppable::constants
// -------------------------------------------------------
constexpr const std::string_view& PI_OVER_200 =
"0.01570796326794896619231321691639716312084074699687552942986246296153903203140449499314017412671058534";

constexpr const std::string_view& E = "2.718281828459045090795598298427648842334747314453125";
} // namespace steppable::constants
Loading

0 comments on commit 69ac88a

Please sign in to comment.