Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lamellarPC is precision limited (Trac #484) #330

Closed
pkienzle opened this issue Mar 30, 2019 · 4 comments
Closed

lamellarPC is precision limited (Trac #484) #330

pkienzle opened this issue Mar 30, 2019 · 4 comments
Assignees

Comments

@pkienzle
Copy link
Contributor

Adapt the Lamellar PC calculation to use less precision limited math.

That means replacing ww = exp(...) with ww-1 = expm1(...), which can be calculated without loss of precision. Similarly, 1 - cos(x) for cos(x) near zero can be replaced with 2*sin^2^(x).

The alternative is to force lamellarPC to use double or quad precision even if the rest of the calculations are in single precision.

Use compare -longdouble to evaluate a model with quad precision.

Migrated from http://trac.sasview.org/ticket/484

{
    "status": "closed",
    "changetime": "2016-03-20T12:26:27",
    "_ts": "2016-03-20 12:26:27.152604+00:00",
    "description": "Adapt the Lamellar PC calculation to use less precision limited math.\n\nThat means replacing ww = exp(...) with ww-1 = expm1(...), which can be calculated without loss of precision.  Similarly, 1 - cos(x) for cos(x) near zero can be replaced with 2*sin^2^(x).\n\nThe alternative is to force lamellarPC to use double or quad precision even if the rest of the calculations are in single precision.\n\nUse compare -longdouble to evaluate a model with quad precision.",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasModels Redesign",
    "time": "2015-11-25T00:23:44",
    "component": "SasView",
    "summary": "lamellarPC is precision limited",
    "priority": "critical",
    "keywords": "",
    "milestone": "SasView 4.0.0",
    "owner": "richardh",
    "type": "defect"
}
@butlerpd
Copy link
Member

Trac update at 2016/03/06 19:02:19:

  • butler commented:

probably should be part of the core model conversion process. As I understand it this "works" so maybe only critical and not blocker for the release?

  • butler changed priority from "minor" to "critical"

@ajj
Copy link
Member

ajj commented Mar 30, 2019

Trac update at 2016/03/20 12:11:09:

  • ajj changed owner from "" to "richardh"
  • ajj changed status from "new" to "assigned"

@smk78
Copy link
Contributor

smk78 commented Mar 30, 2019

Trac update at 2016/03/20 12:19:52: smk78 commented:

Is this ticket still valid now model has changed?

@ajj
Copy link
Member

ajj commented Mar 30, 2019

Trac update at 2016/03/20 12:26:27:

  • ajj commented:

Forcing double precision. Model is still a bit cranky, but can't be helped.

  • ajj changed resolution from "" to "fixed"
  • ajj changed status from "assigned" to "closed"

@ricleal ricleal transferred this issue from SasView/sasview Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants