Subject: handling small numbers

From: Tim Menzies <[email-masked]>
Date: Thu, 4 May 2000 09:59:38 -0400 (EDT)

got an error in my prolog code in the 20th decimal place and was wondering
was i can do about it. in the guts of my calcs, i have to do stuff like:

a=b*c/d

where c and d are numbers in the order of 10^-24 and b is a BIG number
and a must be a probability (0..1). thing is, small errors in c and d make
a > 1. my current approach is to code it all as fractions doing gcd and
defer real number calcs till as late as possible, then doing stuff like

(c*d)/(e*f)= c/e * d/f

the rewrite will mean that each stage i will be driving my rations of two
similar small numbers towards 1 BEFORE doing the real number stuff. the
code is kinda cute but i have no gret confidence that it will solve this
problem for more than a restrictive case.

any other ideas anyone?

-- 
[email-masked]; http://www.tim.menzies.com     PH  +1-304-367-8447
NASA, 100 University Dr,Fairmont WV, 26554,USA  FAX +1-304-367-8211
 
"Science is what happens when preconception meets verification."