Hi,
I need someone with more knowledge of mathematics tham me to look at this.
I have a
proposed patch that implements the SecH (hyperbolic secant), CscH (hyperbolic cosecant) and CotH (hyperbolic cotangent) functions.
Based upon
https://en.wikipedia.org/wiki/Hyperbolic_functions#Definitions.
Hope I did not screw that one up.
Now, I'm trying to implement inverse secant (ArcSec), the inverse cosecant (ArcCsc) and inverse cotangent (ArcCot) functions for fpc's math unit.
My knowledge of trigonometry stops with the things I learned until I was 18 years old: Sin, Cos, Tan functions.
From googling, this is what I have come to understand:
ArcSec(X) = ArcCos(1/X)
ArcCsc(X) = ArcSin(1/x)
ArcCot(X) = pi/2 - ArcCot(1/X) = ArcTan(1/X), if X > 0
ArcCot(X) = 3*pi/2 - ArcTan(1/X) = pi + ArcTan(1/X), if X < 0
Since Math unit already implements ArcSin(), ArcCos() and ArcTan(), I could implement these functions as described above, if and only if my understanding is indeed correct.
It also leaves the question what the result of ArcCot(0) should be, or better, what Delphi returns in that case.
And once the above is solved, we also need implementations for
- inverse hyperbolic secant (ArcSecH)
- inverse hyperbolic cosecant (ArcCscH)
- inverse hyperbolic cotangent (ArcCotH)
Any help would be appreciated.
Bart