Board index » delphi » Sin Cos Tan and other trigonometry function problem

Sin Cos Tan and other trigonometry function problem

My CPP Builder 6 Enterprise doesn't seem to understand how to calculate Sin
Cos Tan ArcSin ArcCos and whatever. When I try it it give me an answer by
the answer is completely different from the result I get from the windows
calculator.

Does anyone have experience with this kind of bug, and maybe a clue on how I
can fix it.

 

Re:Sin Cos Tan and other trigonometry function problem


Quote
"Erixma" <eriksorense...@hotmail.com> wrote in message

news:3e639db8@newsgroups.borland.com...

Quote
> My CPP Builder 6 Enterprise doesn't seem to understand how to calculate
Sin
> Cos Tan ArcSin ArcCos and whatever. When I try it it give me an answer by
> the answer is completely different from the result I get from the windows
> calculator.
> Does anyone have experience with this kind of bug, and maybe a clue on how
I
> can fix it.

I bet "the bug" is that you don't pay attention to units you are passing
angles to those function.
I suggest that you'll find out what degrees, radians and grads are and what
units those functions use.
Quick tip :
  If your Windows calc gives 1 for sin of 90 (degrees),
   BCB for SinCos of 90 gives  sin = 0.893996663 and cos = -0.4480736161.

Best regards,
Holy Punk.

P.S. It's always better to make sure that there is a bug, then create a
hoax.

Re:Sin Cos Tan and other trigonometry function problem


Quote
"Erixma" <eriksorense...@hotmail.com> writes:

Your question is about C++ Builder, while this newsgroup is about Borland C++.

Please direct your browser at http://www.borland.com/newsgroups and read the
newsgroup descriptions and guidelines. This will help you find the appropriate
newsgroup for your question.

Re:Sin Cos Tan and other trigonometry function problem


Quote
"Erixma" <eriksorense...@hotmail.com> wrote in message

news:3e639db8@newsgroups.borland.com...

Quote
> My CPP Builder 6 Enterprise doesn't seem to understand how to calculate
Sin
> Cos Tan ArcSin ArcCos and whatever. When I try it it give me an answer by
> the answer is completely different from the result I get from the windows
> calculator.

> Does anyone have experience with this kind of bug, and maybe a clue on how
I
> can fix it.

The arguments to the trigonometric functions are not given in degrees, but
in radians. 180 degrees = pi radians, where pi is the ratio between the
circumference of a circle and its diameter, i.e. approximately
3.141592653589793238462643383...

Similarly, the results of the inverse trigonometric functions are also given
in radians.

HTH,
Daniel Pfeffer

Other Threads