home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sm30a.zip / FAC.(X) < prev    next >
Text File  |  1993-11-07  |  242b  |  10 lines

  1. #    n! = fac(n), factorial
  2.  
  3. 0! := 1
  4. 1! := 1
  5. inf! := inf
  6. x_ ! := if(x>1, x*(x-1)! )
  7. n_ ! := if(n>170, inf)
  8. #x_ ! := if( numeric==on, gamma(x+1), if(x>1 x*(x-1)! ))
  9. #n_! := if( n>1 and isinteger(n), n*(n-1)!, if(numeric==on, gamma(n+1))
  10.