正弦 余弦 等函数。

解决方案 »

  1.   

    Cos();
      Sin();uses Math;{ Trigonometric functions }
    function ArcCos(const X: Extended): Extended;  { IN: |X| <= 1  OUT: [0..PI] radians }
    function ArcSin(const X: Extended): Extended;  { IN: |X| <= 1  OUT: [-PI/2..PI/2] radians }{ ArcTan2 calculates ArcTan(Y/X), and returns an angle in the correct quadrant.
      IN: |Y| < 2^64, |X| < 2^64, X <> 0   OUT: [-PI..PI] radians }
    function ArcTan2(const Y, X: Extended): Extended;{ SinCos is 2x faster than calling Sin and Cos separately for the same angle }
    procedure SinCos(const Theta: Extended; var Sin, Cos: Extended) register;
    function Tan(const X: Extended): Extended;
    function Cotan(const X: Extended): Extended;           { 1 / tan(X), X <> 0 }
    function Secant(const X: Extended): Extended;          { 1 / cos(X) }
    function Cosecant(const X: Extended): Extended;        { 1 / sin(X) }
    function Hypot(const X, Y: Extended): Extended;        { Sqrt(X**2 + Y**2) }{ Hyperbolic functions and inverses }
    function Cot(const X: Extended): Extended;             { simply calls Cotan }
    function Sec(const X: Extended): Extended;             { simply calls Secant }
    function Csc(const X: Extended): Extended;             { simply calls Cosecant }
    function Cosh(const X: Extended): Extended;
    function Sinh(const X: Extended): Extended;
    function Tanh(const X: Extended): Extended;
    function CotH(const X: Extended): Extended;
    function SecH(const X: Extended): Extended;
    function CscH(const X: Extended): Extended;
    function ArcCot(const X: Extended): Extended;
    function ArcSec(const X: Extended): Extended;
    function ArcCsc(const X: Extended): Extended;
    function ArcCosh(const X: Extended): Extended;         { IN: X >= 1 }
    function ArcSinh(const X: Extended): Extended;
    function ArcTanh(const X: Extended): Extended;         { IN: |X| <= 1 }
    function ArcCotH(const X: Extended): Extended;
    function ArcSecH(const X: Extended): Extended;
    function ArcCscH(const X: Extended): Extended;
    ....