View Full Version : FATAN and Isomax 0.82
cwkoehler
10-05-05, 10:41 AM
Hello all,
I was curious, does the FATAN function work correctly using version 0.82 on the IsopodX? I see from previous forum threads that there was a problem with the FATAN function within other earlier version of Isomax. Any insight is appreciated.
Thanks
cwkoehler
nmitech
10-05-05, 11:57 AM
YES! It fixed since V0.61.
RMDumse
10-05-05, 01:06 PM
Just for completeness, here is the fix for version .6 and before, also code to give arcsin and arccos.
( FLOAT TOOLS TO FOLLOW
: R>D DR F* ; EEWORD ( RADIANS TO DEGREES
: D>R [ 1E0 DR F/ ] FLITERAL F* ; EEWORD ( DEGREES TO RADIANS
: F**2 FDUP F* ; EEWORD
: FVECSUM F**2 FSWAP F**2 F+ FSQRT ; EEWORD
( FLOAT TRIG WORDS
: ANGCHK
FDUP PI FNEGATE F<
FDUP PI F+ F0= OR IF 2PI F+ THEN
PI FOVER F< IF 2PI F- THEN
; EEWORD
: FATAN2NEW ( F: Y \ X ... F in radians between -pi and +pi
FDUP F0= ( x=0?
IF FDROP FDUP F0= 0= ( y=0?
IF
F0< PI
IF
FNEGATE
THEN
F2/
THEN
EXIT
THEN
FOVER F0< ( y<0)
FDUP F0< ( x<0)
F/ FATAN
IF ( x<0)
PI
IF ( y<0)
F-
ELSE
F+
THEN
ELSE
DROP
THEN
; EEWORD
: FASIN ( F:r1 -- r2 )
1E0 FOVER F**2 ( SINr1 1 SINr1^2
F- FSQRT ( SINr1 1-SINr1^2^.5
FATAN2NEW
; EEWORD
: FACOS ( F:r1 -- r2 )
1E0 FOVER F**2 ( COSr1 1 COSr1^2
F- FSQRT ( COSr1 1-COSr1^2^.5
FSWAP
FATAN2NEW
; EEWORD
cwkoehler
10-06-05, 10:05 AM
thanks gentlemen
vBulletin v3.0.7, Copyright ©2000-2012, Jelsoft Enterprises Ltd.