Skip to content

Sig fig fuzzy#31

Open
sfiedle1 wants to merge 5 commits intopstaabp:sig-fig-sci-notationfrom
sfiedle1:sig-fig-fuzzy
Open

Sig fig fuzzy#31
sfiedle1 wants to merge 5 commits intopstaabp:sig-fig-sci-notationfrom
sfiedle1:sig-fig-fuzzy

Conversation

@sfiedle1
Copy link
Copy Markdown

Resolves bug with recursive "Real" calls and soft links.

sfiedle1 and others added 5 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
…value being declared acceptable while 122.0 as incorrect (with the analytical value being 123.0).

In principle, a problem author can make problems stricter by tightening the tolerance or setting the parital_credit flag to 0.
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