July 5, 200124 yr Here's a good one for those of you that like trigonometry. I NEED to find the inverse sine of a number, but no "asin" is available... FIELDS: C - NUMBER D - NUMBER CALC_RESULT - CALCULATION (THIS IS WHERE THE PROBLEM IS) The calculation (IF arc sine were available) should be: Round(Degrees(Asin(D / (Sqrt(2) * C))), 1) - please note that Asin does NOT exist The result SHOULD be the inverse sine of field "C" multiplied by the square root of 2 (1.41) divided into field "D", which is converted into degrees then rounded to only 1-tenth of a degree. Example using real values if: C=4.8125 D=3.875 CALC_RESULT=34.7 (SHOULD BE) C (4.8125) times the square root of 2 (1.41) equals 6.8059, divided into 3.875 equals .5694, the inverse sine of which is 34.7. The simple solution is for FM Inc to add arc sine to the functions list, but my trig skills are limited and I do not know a work around until that cold, cold day. [ July 04, 2001: Message edited by: Jesse Gonzales ]
July 6, 200124 yr Author I appreciate the information, but your suggestion doesn't seem to provide the desired result of 34.7. Using the provided suggestion, the following example uses the formulae and real values in my example: =ROUND(DEGREES(ATAN(3.875/(4.8125*SQRT(2)))/(SQRT(1-(3.875/(4.8125*SQRT(2)))))),1) This comes out to 45.2 not the expected 34.7. Did I misunderstand the formula? x should be equal to (D / (C * sqrt(2)) [ July 05, 2001: Message edited by: Jesse Gonzales ]
July 6, 200124 yr Author That did the trick...... Round(Degrees(Atan((D/(Sqrt(2) * C)) / (Sqrt(1 - (D/(Sqrt(2) * C)) ^ 2)))), 1) Thank you!
December 28, 200619 yr I found the following on 07-05-01 Post#12435: Arcsin x = Arctan (x/(sqrt(1-x^2))) This is close, but no cigar. For the record, arcsin x = 2 arctan (x / (1 + sqrt (1 - x^2))) A custom function might consist of //Arcsin function (x) Let ( [ Arcsin = Degrees ( 2 * Atan (x / (1 + (Sqrt ( 1 - x^2)) ) ) ) ] ; Arcsin ) I hope this saves someone some sweat. bests for 07 Steve
December 28, 200619 yr 1. Why not post this in the original thread? 2. Saying "close, but no cigar" is not very helpful in clarifying the issue. Fact is that the quoted formula is correct (if one disregards redundant parentheses). The only problem is that it's undefined for the range extrema, 1 and -1. That could be easily fixed by: Asin ( x ) = Case ( Abs ( x ) = 1 ; x * Pi / 2 ; Atan ( x / Sqrt ( 1 - x^2 ) ) ) This would produce the same result as your method of calculation - which incidentally also suffers from an inflation of parentheses.
Create an account or sign in to comment