Nhom moi:sci.math.num-analysis
Từ: "Thomas M. Hermann" <tmh.pub...@gmail.com>
Ngày: Sun, 2 Nov 2008 15:27:16 -0800 (PST)
Địa phương: Thứ Hai 3 Tháng Mười Một 2008 06:27
Tiêu đề: Re: Any way around non-reversibility of floating point ops
On Nov 2, 10:30 am, Peter Seibel <peter.sei...@gmail.com> wrote:
> I've got an algorithm for computing the probability of a candidate in Convert this line to : probs[i] = probs[i] - probs[i] * prob > the presidential election winning a certain number of elector votes > that looks like this (in pseudo-code): > define compute-ev-probabilites (state-probs) > define fold-into (probs votes prob) > if (votes <= i) Convert this line to : probs[i] = probs[i] * (1 + prob) / (1 - > probs[i] = probs[i] + (prob * probs[i - votes]) > So far so good. Now I'd like to add this function which can back out > define back-out (probs votes prob) prob*prob) > Mathematically this works--I've actually implemented this in Common > Is there some obvious way to write this so I can still use floating > -Peter cancel out with those modification. Cheers, Tom H. Bạn phải Đăng nhập trước khi đăng bài
Để đăng bài, trước tiên bạn phải tham gia vào nhóm này.
Vui lòng cập nhật biệt hiệu của bạn trên trang cài đặt đăng ký trước khi đăng.
Bạn không có quyền để đăng bài.
| ||||||||||||||