[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Exponential calculation
From: |
Kevin Channon |
Subject: |
Re: [Help-gsl] Exponential calculation |
Date: |
Wed, 11 Feb 2009 13:19:00 +0000 |
Hi Ashish,
> Is there any known mathematical method to calculate : exponential( -
> val), when val is too small number like -100
You don't need gsl for this, just use the standard c library math.h (or
cmath in c++)
printf("%g\n", exp(-100));
returns the correct answer of 3.7e-44
There might be some penalty in terms of speed and accuracy, I don't
know, but it does return a value that should be at least in the ballpark
>
> If there is any such instance during probability density function
> calculation when exp( - x2/ 2) is calculated, How to handle such events?
You might need to clarify this a bit more, I'm not sure that I understand
what you're asking
Cheers,
Kevin
--
Kevin Channon
School of Chemistry
University of Bristol
UK