Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

use np.expm1 in singlediode model for exp(x) - 1 #500

Copy link
Copy link
Closed
@mikofski

Description

@mikofski
Issue body actions

Problem
it is possible that at extremely small voltages there may be machine precision error of less than 1 part per million because the single diode model has the term exp(x) - 1 which has an increasing error as x → 0 because exp(x) → 1, so 1 - 1 is a very, very small number close to zero.

Solution
Use np.expm1(x) instead of np.exp(x) - 1 as suggested in this comment

Additional context
#409

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.