Talk:Trigonometric functions

From Rosetta Code

Why are the last four pairs of numbers different for the ada example? The program was to use the same angle in degrees and radians so as long as the function is set for degrees or radians it should give the same number. --Mwn3d 07:14, 8 January 2008 (MST)

There is no error. 45 degrees is the same angle as 0.7854 (Pi/4) radians. A function set for radians cannot return degrees, and vice versa.--Waldorf 21:31, 8 January 2008 (MST)
Sorry. I think I was confused because the last two (arccot) seem to be exactly the same line of code. Am I crazy? --Mwn3d 21:36, 8 January 2008 (MST)
Theyŕe not exactly the same, but youŕe not crazy either. I think the line before New_Line; was intended to be
<code.Put(Item => Arccot(X => Cot(Angle_Radians, Radians_Cycle), Cycle => Radians_Cycle), Aft => 5, Exp => 0);
but what exists at present is not that. --TBH 22:16, 8 January 2008 (MST)

The Java example also seems to not fit the requirements for arcsin, arccos, and arctan. --TBH 11:16, 9 January 2008 (MST)

When I made the task I forgot that the arc functions return angles. Since they don't take an angle as an argument, I changed the Java example recently so that each function would print its answer in radians and degrees (even though they all start with different angles to get their arguments). I tried to make it more like the Ada example.--Mwn3d 11:38, 9 January 2008 (MST)
Ah! I had not noticed the clarified requirements. Now that I understand the requirements, I see that the answers are good for both the Ada and Java examples. The Perl code still needs fixing. The Ada code still has what seems to be an error, as I mentioned yesterday, but it does not affect the output. I've corrected the J code. --TBH 19:30, 9 January 2008 (MST)

odd formatting

I was trying to add code for IDL, but the "pre" tag doesn't seem to work quite like I expected. Can someone clarify?

Mediawiki's way of handling "pre" is broken. Try surrounding the "pre" block with <nowiki>/</nowiki>. --Short Circuit 01:00, 2 May 2008 (MDT)