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

Fix typos, and make Unions report more uncombined sets #306

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Jul 1, 2017

This fixes a couple of typos in AnswerCheckers.pm, makes sure that the derivative of a fraction copies the denominator when squaring it (otherwise the derivative shares a tree node with the original), and fixes an error in isReduced() for Union objects where unions like [0,1) U {1} would be reported as reduced (rather than requiring it to be [0,1]).

The latter can be checked using

Context("Interval")->flags->set(
  reduceUnions => 0,
  reduceSets => 0,
);

($reduced,$reason) = Union("[0,1) U {1}")->isReduced();
TEXT("Reduced = $reduced",$BR,"Reason = $reason");

With the patch, this should report "Reduced = 0, Reason = uncombined sets", while without the patch, it should be "Reduced = 1, Reason = " with no reason.

@mgage
Copy link
Member

mgage commented Jul 7, 2017

Passes the tests.

@mgage mgage merged commit 7bddd8a into openwebwork:develop Jul 7, 2017
@dpvc dpvc deleted the misc-fixes branch July 20, 2017 19:51
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

Successfully merging this pull request may close these issues.

2 participants