Skip to content

Adds functionality to handle fuzzy real values and partial credit for…#30

Open
sfiedle1 wants to merge 3 commits intopstaabp:sig-fig-sci-notationfrom
sfiedle1:sig-fig-sci-notation
Open

Adds functionality to handle fuzzy real values and partial credit for…#30
sfiedle1 wants to merge 3 commits intopstaabp:sig-fig-sci-notationfrom
sfiedle1:sig-fig-sci-notation

Conversation

@sfiedle1
Copy link

@sfiedle1 sfiedle1 commented Feb 8, 2026

Adds functionality for fuzzy reals and partial scores for incorrect sig figs.

Below is a MWE

DOCUMENT();

loadMacros("PGstandard.pl","PGML.pl",'contextSignificantFigures.pl');
Context('SignificantFigures')->flags->set(tolerance => 0.01,penalty=>0.48);
$a=Real('123.0');
BEGIN_PGML
Enter the value [$a]

[_]{$a}{15}
END_PGML
ENDDOCUMENT();

Note: The below warning appears when the answer is entered in scientific notation. This warning doesn't appear for numbers entered using "E".

PG warning messages
Can't convert a Real Number to a Real Number at line 330 of [PG]/macros/contexts/contextSignificantFigures.pl

sfiedle1 and others added 3 commits February 8, 2026 17:47
… sig fig errors.

Below is a MWE

  DOCUMENT();

  loadMacros("PGstandard.pl","PGML.pl",'contextSignificantFigures.pl');
  Context('SignificantFigures')->flags->set(tolerance => 0.01,penalty=>0.48);
  $a=Real('123.0');
  BEGIN_PGML
  Enter the value [$a]

  [_]{$a}{15}
  END_PGML
  ENDDOCUMENT();

Note: The below warning appears when the answer is entered in scientific notation. This warning doesn't appear for numbers entered using "E".

PG warning messages
    Can't convert a Real Number to a Real Number at line 330 of [PG]/macros/contexts/contextSignificantFigures.pl
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.

1 participant