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

Rounding error found in visual sim #125

Closed
terracoda opened this issue Feb 7, 2018 · 9 comments
Closed

Rounding error found in visual sim #125

terracoda opened this issue Feb 7, 2018 · 9 comments
Assignees

Comments

@terracoda
Copy link
Contributor

terracoda commented Feb 7, 2018

As noted in issue #122,

While exploring edge cases with extreme slider values, I was able to see a zero value for Resistance even though a zero value is not actually possible since the sliders for resistivity, length and area do not have zero values.

This edge case happens when Length is at minimum, and Area is at maximum, and the user explores the Resistivity slider. Values for Resistance range only from 0 to 0.01 ohm, so for a good portion of the resistivity slide, Resistance shows as "resistance = 0.00"

In the description, we might need to say "near zero" rather than zero, and I am not sure exactly how we should fix the visual sim, or if we need to.

@emily-phet or @ariel-phet, could one of comment and assign to appropriate designer?

@ariel-phet
Copy link

@terracoda I think we could easily solve this issue by adding a third decimal place when the value of the resistance is less than 1.00. The sim already handles 4 digits (Length and Resistivity maximum, and Area minimum gives 2000 ohm resistance). We are playing a little fast and loose with significant digits but nobody seems to have minded. This seems like a simple change that could be made.

If this is an acceptable solution, please just assign over to @jessegreenberg.

@ariel-phet ariel-phet assigned terracoda and unassigned ariel-phet and emily-phet Feb 7, 2018
@terracoda
Copy link
Contributor Author

@ariel-phet, if this solution means Resistance won't ever register as 0.000, that sounds good to me.

I will assign to @jessegreenberg. We can then see if an an extra zero will impact the visual layout.

@terracoda
Copy link
Contributor Author

@jessegreenberg, please add a third decimal point when resistance is less than 1.00.

@terracoda
Copy link
Contributor Author

@jessegreenberg, please re-assign to me if you have any design questions. I am un-assigning myself.

@jessegreenberg
Copy link
Contributor

jessegreenberg commented Feb 7, 2018

Change made in the above commit. @terracoda can you review on phettest? It is still possible for 0.000 to show up when R is smallest.

@jessegreenberg
Copy link
Contributor

If we add a fourth decimal place then there will always be a value in the readout.

@terracoda
Copy link
Contributor Author

@ariel-phet and @emily-phet, it looks like we have just enough visual space for another decimal place. I think it would be ideal if the fourth decimal place was also restricted - only added when resistance becomes less than 0.001.

Here's an example edge case: the lowest 7 values for Resistivity where Length is at minimum and Area is at maximum produce values for Resistance lower than 0.000.

screen shot 2018-02-07 at 22 04 28

screen shot 2018-02-07 at 21 54 42

Should another decimal place be added?

@ariel-phet
Copy link

As I mentioned, we don't seem to be sticking to pedantically to significant digit rules, and you can get a 4 digit resistance like 1990. So I think adding a 4th decimal in the less than 0.001 case is fine

An argument could be made for the resistance being "effectively" zero, which would be the other way to go when resistance is very small. But in this case, 0.0001 ohms is a perfectly measurable resistance, so I see no reason not to display it.

@ariel-phet ariel-phet removed their assignment Feb 8, 2018
@jessegreenberg
Copy link
Contributor

Thanks @ariel-phet and @terracoda, changed in the above commit. Closing.

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

4 participants