Opened 4 years ago

Last modified 4 years ago

#981 new defect

binary_hard_sphere fails for small qr

Reported by: pkienzle Owned by:
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing


The binary hard sphere fails for small values of qr, even in double precision:

sascomp -double binary_hard_sphere 1 0 radius_sm=10

The code uses expressions such as (sin(yy) - x cos(x))/x^3 and 2(cos(ay) - 1)/ay, though not directly. Rearranging the code so that these expressions are replaced by their stable equivalents may be enough.

Change History (2)

comment:1 Changed 4 years ago by pkienzle

Note that the binary_hard_sphere code gives slightly different values if large and small spheres and volume fractions are swapped, but the equations are symmetric so it shouldn't matter which sphere is labelled large and which is labelled small.

comment:2 Changed 4 years ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0
Note: See TracTickets for help on using tickets.