Another conversion to C or Java...
- From: "Marco Minerva" <marco.minerva@xxxxxxxxxx>
- Date: 29 Nov 2005 09:11:40 -0800
Hi all!
Excuse me, but I need another help translating a small piece of Lisp
code to C or Java:
(let ((prod (apply #'* probs)))
(/ prod (+ prod (apply #'* (mapcar #'(lambda (x)
(- 1 x))
probs)))))
Where "probs" is a list of the fifteen individual probabilities, i.e. a
list of 15 numbers between 0 and 1.
It's again from Paul Graham's spam algorithm...
Thanks in advance,
Marco Minerva, marco.minerva@xxxxxxxxxx
.
- Follow-Ups:
- Re: Another conversion to C or Java...
- From: Marco Antoniotti
- Re: Another conversion to C or Java...
- From: Pascal Bourguignon
- Re: Another conversion to C or Java...
- Prev by Date: Re: FORMAT ~<...~:@> PUZZLE
- Next by Date: Re: Reddit Guys on the Pros and Cons of Lisp
- Previous by thread: Reddit Guys on the Pros and Cons of Lisp
- Next by thread: Re: Another conversion to C or Java...
- Index(es):
Relevant Pages
|
|