Board index » delphi » What's the command of sin^-1?

What's the command of sin^-1?

Hi,

I'm still in a hurry to know what's the command for sin^-1.
In details, I  use the "Law of sin" to calculate something.
The equation is that :   sinA/a = sinB/b

If I want to find A , then I need to rewrite it and come out this,
sinA =  ((sinB/b)*a)
then If i use calculator, i just press 'the sin with power to -1' button

to get the result of A.

Question
How to get A value by using pascal ?
( pascal only let me use "sin( )" & I don't know the reverse command )

Pls. help me !! I want to solve this problem immediately. Thanks !

Re:What's the command of sin^-1?

Patrick Woo schrieb:

Quote

> Hi,

> I'm still in a hurry to know what's the command for sin^-1.
> In details, I  use the "Law of sin" to calculate something.
> The equation is that :   sinA/a = sinB/b

> If I want to find A , then I need to rewrite it and come out this,
> sinA =  ((sinB/b)*a)
> then If i use calculator, i just press 'the sin with power to -1' button

> to get the result of A.

> Question
> How to get A value by using pascal ?
> ( pascal only let me use "sin( )" & I don't know the reverse command )

> Pls. help me !! I want to solve this problem immediately. Thanks !

http://www.geocities.com/SiliconValley/2926/tp.html
look for chapter "numerics" and John Stocktons inverse sine.

Btw. In school I learned to name it arcus sinus or arcsine in english.

Regards
Franz Glaser
http://members.eunet.at/meg-glaser

Re:What's the command of sin^-1?

{sin^-1 is also known as arcsin}
function arcsin(x:real):real;
begin
arcsin:=arctan(x/sqrt(1-sqr(x)));
end;

--
Eric
homepage: http://www.shsu.edu/~stdemm01
------------------------------------------
Love is the answer; but while you are
waiting for the answer, sex raises some
pretty good questions.
--Woody Allen

Re:What's the command of sin^-1?

In normal Pascal, there is no predefined function such as sin^(-1) (arcsin).
There is only the function arctan, which means tan^(-1). If you can employ
tan in your mathematical problem, be happy.
If not, you need to work with mathematical principles in home brewed
function. The exact definition is very complicated. Mail me if you need it.
Christoph
mailto:c...@gmx.net

Patrick Woo schrieb in Nachricht <3547AFB6.BB19A...@writeme.com>...

Quote
>Hi,

>I'm still in a hurry to know what's the command for sin^-1.
>In details, I  use the "Law of sin" to calculate something.
>The equation is that :   sinA/a = sinB/b

>If I want to find A , then I need to rewrite it and come out this,
>sinA =  ((sinB/b)*a)
>then If i use calculator, i just press 'the sin with power to -1' button

>to get the result of A.

>Question
>How to get A value by using pascal ?
>( pascal only let me use "sin( )" & I don't know the reverse command )

>Pls. help me !! I want to solve this problem immediately. Thanks !

Re:What's the command of sin^-1?

In article <6iqk1h\$...@anews.asam.baynet.de>, Christoph Qu. Lauter
<christoph.lau...@asam.baynet.de> writes

Quote
> you need to work with mathematical principles in home brewed
>function. The exact definition is very complicated. Mail me if you need it.

109. *****
Q: What are the formulas for ArcSin and ArcCos?

A: Arcsin is the inverse function of the sine. Hence y = arcsin(x)
implies x = sin(y). The values of x range from -1 and to 1. The
square root of (1-x^2) will become zero at -1 and 1 which will cause
an error if those special cases are not taken into account. Thus
define
function ArcSin (x : real) : real;
const halfPi = pi/2.0;
begin
if (x < -1.0) or (x > 1.0) then begin
writeln ('ArcSin argument ', x, ' out of range [-1,1]');
halt;
end;
if x = 1.0 then arcsin := halfPi
else if x = -1.0 then arcsin := -halfPi
else arcsin := ArcTan(x/Sqrt(1.0-Sqr(x)));
end; (* arcsin *)

For ArcCos we can use
function ArcCos (x : real) : real;
const halfPi = pi/2.0;
begin
arccos := halfPi - ArcSin(x);
end; (* arccos *)
--------------------------------------------------------------------

--
Pedt Scragg                    <newsmas...@pedt.demon.co.uk>

Never curse the Crocodile's mother before crossing the river

Re:What's the command of sin^-1?

Quote
Patrick Woo wrote:

> Hi,

> I'm still in a hurry to know what's the command for sin^-1.
> In details, I  use the "Law of sin" to calculate something.

Is there any need for a standalone solution without using arctan?
I have a Tschebyscheff polynomial approximation to do that and some
other math functions, accurate to approximately 12 digits. It could be
useful on controllers or other standalone processing equipment.
Tschebyscheff approximations converge quickly.

Regards,
Franz Glaser
http://members.eunet.at/meg-glaser