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

math domain error #4

Open
dominic-ks opened this issue Feb 1, 2022 · 0 comments
Open

math domain error #4

dominic-ks opened this issue Feb 1, 2022 · 0 comments

Comments

@dominic-ks
Copy link

Hello,

Firstly thank you for the work you have done here, very useful.

I ran into one issue here which was on various lines where math.pow is used. I'm not a python pro, but it seemed to me that using this method to get the power of a number using a decimal throws the above error and swapping this for the ** method resolves this.

e.g. line 69 is currently:

  • return self.PARA * math.pow((self.get_resistance()/ self.RZERO), -self.PARB)

And I changed this to:

  • return self.PARA * (self.get_resistance()/ self.RZERO)**-self.PARB

I believe this returns the intended value, but of course if this is not correct welcome your comments!

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

1 participant