procedure TForm1.W3Button20Click(Sender: TObject);
var
v : Float;
begin
// The Sine of 30 degrees = 0.5
v := Sin(PI/6); // = 180/6 = 30 degrees
WriteLn('Sin(PI/6) = '+FloatToStr(v));
// The Sine of 60 degrees = 0.5
v := Cos(PI/3); // = 180/3 = 60 degrees
WriteLn('Cos(PI/3) = '+FloatToStr(v));
// The Tangent of 45 degrees = 1.0
v := Tan(PI/4); // = 180/4 = 45 degrees
WriteLn('Tan(PI/4) = '+FloatToStr(v));
// The ArcSin of 0.5 should give 30 degrees
v := ArcSin(0.5);
v := RadToDeg(v); // Convert result to degrees
WriteLn('ArcSin of 0.5 = '+FloatToStr(v)+' degrees');
// The ArcCos of 0.5 should give 60 degrees
v := ArcCos(0.5);
v := RadToDeg(v); // Convert result to degrees
WriteLn('ArcCos of 0.5 = '+FloatToStr(v)+' degrees');
// The ArcTan of PI/2 should give 1.0
v := ArcTan(PI/2);
WriteLn('ArcTan of PI/2 = '+FloatToStr(v));
// The Cotan of PI/4 should give 1.0
v := Cotan(PI/4);
WriteLn('Cotan of PI/4 = '+FloatToStr(v));
// The ArcSin of 0.5 should give 30 degrees
v := ArcSin(0.5);
v := RadToDeg(v); // Convert result to degrees
WriteLn('ArcSin of 0.5 = '+FloatToStr(v)+' degrees');
// The Sine of 30 degrees = 0.5
v := Sin(DegToRad(30));
WriteLn('Sine off 30 degrees = '+FloatToStr(v));
// The ArcSinh of 0.4 should give 22.347377683897445
v := ArcSinh(0.4);
v := RadToDeg(v); // Convert result to degrees
WriteLn('ArcSinh of 0.4 = '+FloatToStr(v));
// The ArcCosh of 25 should give 224.11947549408853
v := ArcCosh(25);
v := RadToDeg(v); // Convert result to degrees
WriteLn('ArcCosh of 25 = '+FloatToStr(v));
// The ArcTanh of 0.4 should give 0.423648930193602
v := ArcTanh(0.4);
WriteLn('ArcTanh of 0.4 = '+FloatToStr(v));
// The Sine of 30 degrees = 0.54785347388804
v := Sinh(PI/6); // = 180/6 = 30 degrees
WriteLn('Sinh(PI/6) = '+FloatToStr(v));
// The Sine of 60 degrees = 1.60028685770239
v := Cosh(PI/3); // = 180/3 = 60 degrees
WriteLn('Cosh(PI/3) = '+FloatToStr(v));
// The Tangent of 45 degrees = 0.655794202632672
v := Tanh(PI/4); // = 180/4 = 45 degrees
WriteLn('Tanh(PI/4) = '+FloatToStr(v));
end;
|