NotEuler
- 58
- 2
I've been playing around with this function of two variables:
xy (eax-eay)/(xeax-yeay )
where a is a positive parameter.
Now, when x and y are very large and close to each other in size, this seems to easily lead to catastrophic cancellation and computational problems.
One thing that seems to help a little is to rewrite as follows:
xy (1-ea(y-x))/(x-yea(y-x) )
I haven't really had to deal with catastrophic cancellation issues in the past. I was wondering if there might be a better way to deal with the problem here?
xy (eax-eay)/(xeax-yeay )
where a is a positive parameter.
Now, when x and y are very large and close to each other in size, this seems to easily lead to catastrophic cancellation and computational problems.
One thing that seems to help a little is to rewrite as follows:
xy (1-ea(y-x))/(x-yea(y-x) )
I haven't really had to deal with catastrophic cancellation issues in the past. I was wondering if there might be a better way to deal with the problem here?