(sqrt (factorial 100))
From: Edward Huang (s9025804_at_ms5.pccu.edu.tw)
Date: 11/23/03
- Next message: james anderson: "Re: Why do lisps have stack limits?"
- Previous message: Pascal Bourguignon: "Re: Why do lisps have stack limits?"
- Next in thread: Jeff Greif: "Re: (sqrt (factorial 100))"
- Reply: Jeff Greif: "Re: (sqrt (factorial 100))"
- Reply: Nils Goesche: "Re: (sqrt (factorial 100))"
- Reply: lin8080: "Re: (sqrt (factorial 100))"
- Reply: Adam Warner: "Re: (sqrt (factorial 100))"
- Reply: Jason Sewall: "Re: (sqrt (factorial 100))"
- Reply: larry: "Re: (sqrt (factorial 100))"
- Reply: larry: "Re: (sqrt (factorial 100))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: james anderson: "Re: Why do lisps have stack limits?"
- Previous message: Pascal Bourguignon: "Re: Why do lisps have stack limits?"
- Next in thread: Jeff Greif: "Re: (sqrt (factorial 100))"
- Reply: Jeff Greif: "Re: (sqrt (factorial 100))"
- Reply: Nils Goesche: "Re: (sqrt (factorial 100))"
- Reply: lin8080: "Re: (sqrt (factorial 100))"
- Reply: Adam Warner: "Re: (sqrt (factorial 100))"
- Reply: Jason Sewall: "Re: (sqrt (factorial 100))"
- Reply: larry: "Re: (sqrt (factorial 100))"
- Reply: larry: "Re: (sqrt (factorial 100))"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]