phetsims / expression-exchange

"Expression Exchange" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

Simplifying negatives doesn't account for negative coefficients #46

Closed phet-steele closed 7 years ago

phet-steele commented 7 years ago
  1. Make a setup on the Variables screen with the following conditions:

The total will read "2" (correct, 1 + (-(-1) = 2)

screen shot 2016-11-16 at 12 17 09 pm
  1. Enable the checkboxes for "all coefficients". The expression will now read: 1 + (-1x)
  2. Enable the checkbox "simplify negatives" (what's it called now?). You will now totally change the equation (bad) but not affect the total (good):
screen shot 2016-11-16 at 12 21 40 pm

Just from reading the above equation, 1 - (-1(-1)) should equal 0, not two. Enabling "variable values" shows that either way you cut this equation, the total should be 0:

screen shot 2016-11-16 at 12 24 48 pm

To be clear, the problem is not that the total remains as 2, but that simplifying negatives in this situation does not properly remove the negative from the "-1" coefficient.

URL: http://www.colorado.edu/physics/phet/dev/html/expression-exchange/1.0.0-dev.17/expression-exchange_en.html Version: 1.0.0-dev.17 2016-11-16 18:45:19 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.87 Safari/537.36 Language: en-US Window: 1921x1000 Pixel Ratio: 2/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 32 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 16) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"845be6b5","branch":"master"},"axon":{"sha":"77064d4b","branch":"master"},"babel":{"sha":"0170b664","branch":"master"},"brand":{"sha":"6d85e08a","branch":"master"},"chipper":{"sha":"ee070b24","branch":"master"},"dot":{"sha":"2765eb4d","branch":"master"},"expression-exchange":{"sha":"a22d88d2","branch":"master"},"joist":{"sha":"9b63704e","branch":"master"},"kite":{"sha":"48cb255e","branch":"master"},"phet-core":{"sha":"5c236a98","branch":"master"},"phetcommon":{"sha":"90e0ebbe","branch":"master"},"query-string-machine":{"sha":"82d5b5ff","branch":"master"},"scenery":{"sha":"5a00aad6","branch":"master"},"scenery-phet":{"sha":"d9489c20","branch":"master"},"sherpa":{"sha":"bc19483f","branch":"master"},"sun":{"sha":"117af165","branch":"master"},"tandem":{"sha":"2419f627","branch":"master"},"vegas":{"sha":"79362da7","branch":"master"},"vibe":{"sha":"3a861dcd","branch":"master"}}

amanda-phet commented 7 years ago

To further clarify the correct behavior, after step 3 above the expression should be 1 – 1x.

jbphet commented 7 years ago

This should now be fixed. Assigning to @phet-steele to verify on master.

phet-steele commented 7 years ago

@jbphet this has been fixed for....awhile. Closing!