Closed lcn2 closed 1 year ago
With commit 20ce75a06dd90c22cdc83a9258f96aac5bd76be9 we have added:
Updated comments for those two functions with commit 8edff808268265b4ce378da4cda7199744099232.
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.
With commit b67e20881adf283b79d0bc29bf8df1e622b86cda we have added and tested:
We will address the half functions next.
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.
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.
With commit 5d62e587041563a4aa0323fa32630d28c40645bc we have added these historical trigonometric functions:
With commit c78a89386249916ac1dfad9bdad63d9790b64f02 we have added these historical trigonometric functions:
With commit 26fc3940898611271b50a6817fdf6f2a724c4e71 have added these historical trigonometric functions:
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.
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.
versed trigonometric sine versin(x, [,eps]) = 1 - cos(x)
inverse versed trigonometric sine aversin(x, [,eps]) = acos(1 - x)
coversed trigonometric sine coversin(x, [,eps]) = 1 - sin(x)
inverse coversed trigonometric sine acoversin(x, [,eps]) = asin(1 - x)
versed trigonometric cosine vercos(x, [,eps]) = 1 + cos(x)
inverse versed trigonometric cosine avercos(x, [,eps]) = acos(x - 1)
coversed trigonometric cosine covercos(x, [,eps]) = 1 + sin(x)
inverse coversed trigonometric cosine acovercos(x, [,eps]) = asin(x - 1)
half versed trigonometric sine haversin(x, [,eps]) = versin(x) / 2
inverse half versed trigonometric sine ahaversin(x, [,eps]) = acos(1 - 2x)
half coversed trigonometric sine hacoversin(x, [,eps]) = coversin(x) / 2
inverse half coversed trigonometric sine ahacoversin(x, [,eps]) = asin(1 - 2x)
half versed trigonometric cosine havercos(x, [,eps]) = vercos(x) / 2
inverse half versed trigonometric cosine ahavercos(x, [,eps]) = acos(2x - 1)
half coversed trigonometric cosine hacovercos(x, [eps]) = covercos(x) / 2
inverse half coversed trigonometric cosine ahacovercos(x, [eps]) = asin(2x - 1)
exterior trigonometric secant exsec(x, [,eps]) = sec(x) - 1
inverse exterior trigonometric secant aexsec(x, [,eps]) = asec(x + 1)
exterior trigonometric cosecant excsc(x, [,eps]) = csc(x) - 1
inverse exterior trigonometric cosecant aexcsc(x, [,eps]) = acsc(x + 1)
trigonometric chord of a unit circle crd(x, [,eps]) = 2 * sin(x / 2)
inverse trigonometric chord of a unit circle acrd(x, [,eps]) = 2 * asin(x / 2)
trigonometric cosine plus sine cas(x) = cos(x) + sin(x)
Euler's formula cis(x) = cos(x) + i*sin(x)
References for the above functions