factorial.txt 3.63 KB
Newer Older
Over_score's avatar
Over_score committed
1 2 3 4 5 6 7 8 9 10 11 12 13
;*************************************************************
;*************************************************************
;**                                                         **
;**                      factorial !                        **
;**                                                         **
;*************************************************************
;*************************************************************
In: FD=0 FI=0 SD=0 RM=0 IM=2compl SS=4 WS=64
Func: fnFactorial



;=======================================
Over_score's avatar
Over_score committed
14
; factorial(Long Integer) --> Long Integer
Over_score's avatar
Over_score committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
;=======================================
In:  AM=DEG SL=0 FI=0 RX=LonI:"45"
Out: EC=0 FI=0 SL=1 RL=LonI:"45" RX=LonI:"119622220865480194561963161495657715064383733760000000000"

In:  AM=DEG SL=0 FI=0 RX=LonI:"0"
Out: EC=0 FI=0 SL=1 RL=LonI:"0" RX=LonI:"1"

In:  AM=DEG SL=0 FI=0 RX=LonI:"-5"
Out: EC=1 FI=0 SL=0 RX=LonI:"-5"



;=======================================
; factorial(Time)
;=======================================



;=======================================
; factorial(Date)
;=======================================



;=======================================
; factorial(String) --> Error24
;=======================================
In:  SL=0 RX=Stri:"String test"
Out: EC=24 SL=0 RX=Stri:"String test"



;=======================================
; factorial(Real16 Matrix)
;=======================================



;=======================================
; factorial(Complex16 Matrix)
;=======================================



;=======================================
; factorial(Short Integer) --> Error24
;=======================================
In:  SL=0 FI=0 RX=ShoI:"5#8"
Out: EC=0 FI=0 SL=1 RL=ShoI:"5#8" RX=ShoI:"170#8"



;=======================================
; factorial(Real34) --> Real34
;=======================================
Over_score's avatar
Over_score committed
70 71
In:  AM=DEG SL=0 FI=0 RX=Real:"45"
Out: EC=0 FI=0 SL=1 RL=Real:"45" RX=Real:"119622220865480194561963161495657715064383733760000000000"
Over_score's avatar
Over_score committed
72

Over_score's avatar
Over_score committed
73 74
In:  AM=DEG SL=0 FI=0 RX=Real:"0"
Out: EC=0 FI=0 SL=1 RL=Real:"0" RX=Real:"1"
Over_score's avatar
Over_score committed
75

Over_score's avatar
Over_score committed
76 77
In:  AM=GRAD SL=0 FI=0 RX=Real:"3.1"
Out: EC=0 FI=0 SL=1 RL=Real:"3.1" RX=Real:"6.8126228630166788679690500676397545100854693541418870153581056"
Over_score's avatar
Over_score committed
78

Over_score's avatar
Over_score committed
79 80
In:  AM=DEG SL=0 FI=0 RX=Real:"-3.1"
Out: EC=0 FI=0 SL=1 RL=Real:"-3.1" RX=Real:"-4.6260982775728110601614949597163670050642371647661176582223839"
Over_score's avatar
Over_score committed
81

Over_score's avatar
Over_score committed
82 83
In:  SL=0 FI=0 RX=Real:"5.32564":DMS
Out: EC=0 FI=0 SL=1 RL=Real:"5.32564":DMS RX=Real:"211.13598684879991116840112854302517382023008855382603631608281"
Over_score's avatar
Over_score committed
84

Over_score's avatar
Over_score committed
85 86
In:  SL=0 FI=0 RX=Real:"-5.32564":GRAD
Out: EC=0 FI=0 SL=1 RL=Real:"-5.32564":GRAD RX=Real:"-0.092823884274579407865808232851777690972248476783570824903801507"
Over_score's avatar
Over_score committed
87 88 89 90 91


;=======================================
; factorial(Complex34) --> Complex34
;=======================================
Over_score's avatar
Over_score committed
92 93
In:  AM=DEG SL=0 FI=0 RX=Cplx:"6.2 i -7.6"
Out: EC=0 FI=1 SL=1 RL=Cplx:"6.2 i -7.6" RX=Cplx:"-26.687204616760923642665367819436466866288560419845141767719036 i -0.6019934556957449319503825702850537615893851945711419210751746"
94

Over_score's avatar
Over_score committed
95 96
In:  AM=DEG SL=0 FI=0 RX=Cplx:"6.2 i 7.6"
Out: EC=0 FI=1 SL=1 RL=Cplx:"6.2 i 7.6" RX=Cplx:"-26.687204616760923642665367819436466866288560419845141767719036 i 0.6019934556957449319503825702850537615893851945711419210751746"
97

Over_score's avatar
Over_score committed
98 99
In:  AM=DEG SL=0 FI=0 RX=Cplx:"-6.2 i -7.6"
Out: EC=0 FI=1 SL=1 RL=Cplx:"-6.2 i -7.6" RX=Cplx:"-9.859410527227041014432008659666200447472029352315118968130094e-11 i 3.2965092001984442686285062033964969106978115374799650717121e-12"
100

Over_score's avatar
Over_score committed
101 102
In:  AM=DEG SL=0 FI=0 RX=Cplx:"-6.2 i 7.6"
Out: EC=0 FI=1 SL=1 RL=Cplx:"-6.2 i 7.6" RX=Cplx:"-9.859410527227041014432008659666200447472029352315118968130094e-11 i -3.2965092001984442686285062033964969106978115374799650717121e-12"