Re: Another conversion to C or Java...



Why do you insist on hurting yourself? Have you not heard of the famous quote about Nutella? :)

Cheers
--
Marco


Marco Minerva wrote:
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

.



Relevant Pages