itrig Function (ROM Call 0x28A)

timath.h

void itrig (short option, short deg_flag, float *xptr, float *result);

Generic subroutine for calculating inverse trigonometric functions.

itrig is a TIOS subroutine which is used internally for calculating inverse trigonometric functions, i.e. in TIOS functions asin, acos and atan. It calculates the arc sine, the arc cosine or the arc tangent of the floating point value pointed to by xptr, and stores the result in the floating point destination pointed to by result. The result will be in radians if deg_flag is 0, or in degrees if deg_flag is 1 (it seems that these two values are only legal values for deg_flag). Parameter option determines which inverse trigonometric function will be calculated: the arc sine if option = 1, the arc cosine if option = 2 and the arc tangent if option = 4. I don't know whether these values are the only legal values for option, but I believe so.

Note: The parameter xptr is not a pointer to const value. This means that the value pointed to by it may be changed. In normal cases this would not appear, but this need not to be true if the structure pointed to by xptr contains wrong values (for example, arguments out of the function domain, unnormalized values, etc.).


Uses: is_inf, is_nan, is_sinf, is_transfinite, is_uinf_or_nan, sqrt, _bcd_math
Used by: acos, asin, atan, push_to_sphere