Open
Conversation
… compared more thoroughly. Now we always check that the expressions evaluate the same with all variables bound to -1, 0, and 1. We also check more randomly-chosen values: 28 instead of 12.
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
Contributor
🗄️ Schema Change: No Changes ✅ |
Contributor
🛠️ Item Splitting: No Changes ✅ |
Contributor
|
Size Change: +100 B (+0.02%) Total Size: 499 kB 📦 View Changed
ℹ️ View Unchanged
|
Contributor
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (821b13d) and published it to npm. You Example: pnpm add @khanacademy/perseus@PR3503If you are working in Khan Academy's frontend, you can run the below command. ./dev/tools/bump_perseus_version.ts -t PR3503If you are working in Khan Academy's webapp, you can run the below command. ./dev/tools/bump_perseus_version.js -t PR3503 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Content creators reported a bug in an expression widget where the correct
answer was
-x / sqrt(1-x^2). You could put anything in the numerator and youranswer would (usually) be marked correct.
The bug happened because of the nondeterministic (and not very thorough) way
that we compared expressions. Previously, we selected 12 random variable
bindings and checked that the two expressions evaluated the same for all of
them. Some effort was made to cover different orders of magnitude, but simple
values like
-1,0, and1were not always checked.This meant that for expressions with a restricted domain, like
-x / sqrt(1 - x^2)(which is only defined in the interval[-1, 1]), we might check onlyvariable bindings for which the expression was not defined.
Expressions are now compared more thoroughly. Now we always check that the
expressions evaluate the same with all variables bound to -1, 0, and 1. We also
check more randomly-chosen values: 28 instead of 12.
Summary:
Issue: LEMS-4042
Test plan:
The expression in this article should be scored correctly:
https://www.khanacademy.org/devadmin/content/articles/arc-length-of-function-graphs-examples/x615e6443