lcn2 / calc

C-style arbitrary precision calculator
http://www.isthe.com/chongo/tech/comp/calc/index.html
Other
357 stars 51 forks source link

Enhancement: add somewhat useful and historical trigonometric functions #99

Closed lcn2 closed 1 year ago

lcn2 commented 1 year ago

Add builtins for a number of trigonometric functions that are somewhat useful and historical trigonometric functions.

Input on builtin function names welcome

The names of these functions vary from reference to reference.

We welcome comments and suggestions regarding the name of these bulletin functions. It is not too late for us to rename these proposed or coded builtin functions.

Proposed new built-in functions

Below you will find the description of the new built-in functions followed by the proposed built-in function name = how we will calculate the value of the function.

References for the above functions

lcn2 commented 1 year ago

With commit 20ce75a06dd90c22cdc83a9258f96aac5bd76be9 we have added:

UPDATE 0

Updated comments for those two functions with commit 8edff808268265b4ce378da4cda7199744099232.

lcn2 commented 1 year ago

With commit ea5b5e0b53fee869a3abfd64a7216bc46831f9d6 we have added:

We now have a general plan for how to implement the rest of the functions listed in this enhancement.

lcn2 commented 1 year ago

With commit b67e20881adf283b79d0bc29bf8df1e622b86cda we have added and tested:

We will address the half functions next.

lcn2 commented 1 year ago

With commit bf730f551827b5aac080b21a8c31936c014c89d0 we have improved the testing and libcalc interfaces to tan, cot, sec, csc. We needed to improve the libcalc interface and testing of these functions in order to build a improved regression test suite for the functions described in this issue #99.

lcn2 commented 1 year ago

With commit db80afb8431721cbc7049f597b468621f8c3f96e the improvements to the calc error reporting system have been completed. Now we can build a better trig function test suite for testing trig identities as well as values for existing and pending trig functions.

lcn2 commented 1 year ago

With commit 5d62e587041563a4aa0323fa32630d28c40645bc we have added these historical trigonometric functions:

lcn2 commented 1 year ago

With commit c78a89386249916ac1dfad9bdad63d9790b64f02 we have added these historical trigonometric functions:

lcn2 commented 1 year ago

With commit 26fc3940898611271b50a6817fdf6f2a724c4e71 have added these historical trigonometric functions:

lcn2 commented 1 year ago

With commit 2c4abcd2b7145e4a35016ad4d9d8cd26979001f3 the last of the pending historical trigonometric functions have been added:

With this commit, we will close this issue.

We plan to go over a number of the recent changes since 2023 Aug 18 (since commit 8055bf07c213abcb129de08d0f0f36215749ef12) before considering releasing the code as calc v2.15.0.