Newsgroups: sci.math.num-analysis
From: "Thomas M. Hermann" <tmh.pub...@gmail.com>
Date: Sun, 2 Nov 2008 15:27:16 -0800 (PST)
Local: Sun, Nov 2 2008 12:27 pm
Subject: 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. You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||