############################## # Initialization DOCUMENT(); # Contains a comma-separated list of macro filename strings. # Each file contains functionality necessary for the mathematical # functions being used in the problem. loadMacros( # REQUIRED: Used for basic question and answer operations. "PGstandard.pl", # REQUIRED: Used for expression parsing. "MathObjects.pl", # Provides greater control over the layout of the problem. "PGML.pl", # Used to provide contextual help for how to type answers. "AnswerFormatHelp.pl", "contextInequalities.pl" ); # Sets up basic problem information. TEXT(beginproblem()); ############################# # Setup Context("Inequalities-Only")->variables->are(x=>"Real"); $xBetween = Compute("2 <= x <= 5"); $xNotEqual = Compute("x != 7/2"); $answer = $xBetween->intersect($xNotEqual); ############################# # Problem Text #-ULETH-# BEGIN_PGML i. Intersection What is [`[$xBetween] \cap [$xNotEqual]`]? [____________________][@ AnswerFormatHelp("inequalities") @]* *Correct Answer(s):* [|2 <= x <= 5 and x != 3.5|] *or* [|5 >= x >= 2 and 3.5 != x|] *Displayed Answer (after the due date):* [`[$answer]`] END_PGML ############################# # Answer Evaluation # Setting this to 1 means that students will receive feedback on whether their # answers are correct. $showPartialCorrectAnswers = 1; ANS($answer->cmp()); ############################# # Solution # Can be used to show the student the solution to the problem. # Similar to BEGIN_PGML, marks the start of the solution text. BEGIN_PGML_SOLUTION # Solution explanation goes here. Layout as you would with the problem text. # Marks the end of the solution text. END_PGML_SOLUTION # Marks the end of the problem document. ENDDOCUMENT();

In theory, this should be giving the answer as 2 <= x <= 5 and x != 3.5. However, the answer that is actually being shown is 2 <= x < 5 and x != 3.5. We're speculating that this is either a problem with the display of the answer or something in the intersect function. Does anyone have any insight on this?