(sqrt (factorial 100))

From: Edward Huang (s9025804_at_ms5.pccu.edu.tw)
Date: 11/23/03


Date: 23 Nov 2003 09:26:18 -0800

Hi,
I tried (sqrt (factorial 100)) when I wrote a function to determine if
100! is prime. I wrote a function 'factorial' to calculate 100! and
anothor, 'prime', to check if a number x is prime. Originally I have a
list in the function 'prime':

   (setq max (sqrt (factorial 100)))

because 'max' means the maximum times it should be checked from 2 to
sqrt(x), but I was warned of the message:

   '*** - floating point overflow.'

How to avoid the overflow problem? My interpreter is CLISP v2.31.