Skip to content

Refinery/Math: Mantis 48370 numeric bounds - #12357

Merged
thojou merged 1 commit into
ILIAS-eLearning:release_10from
thojou:hotfix/10/48370-numeric-bounds
Nov 10, 2026
Merged

thojou merged 1 commit into
ILIAS-eLearning:release_10from
thojou:hotfix/10/48370-numeric-bounds

Conversation

@thojou

@thojou thojou commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

See https://mantis.ilias.de/view.php?id=48370

Why

A numeric question bound such as 5.4E+24 was stored as 0. KindlyTo float rejected that text, and the request collector replaced the failure with 0. PHP prints the parsed value back as 5.4E+24, so the next save of 54E23 became 0 as well. EvalMath read the plus as addition with the constant e, so the same text scored as about 38.68.

What changed

  • FloatTransformation accepts a decimal mantissa and an exponent sign.
  • EvalMath consumes the plus and evaluates the magnitude as a power of ten.

Scope

  • Covers the parsers used when a numeric question bound is saved and scored.
  • Leaves other formula syntax on the existing EvalMath path.

Blast Radius

Any input that uses KindlyTo float can now send a decimal mantissa or an exponent sign. 7E10 still parses. 1E+2 means 100.

Verification

  • FloatTransformationTest and ilMathTest failed on 5.4E+24 before the fix and passed after it.
  • A direct call stored 5.4E+24 and 5.6E+24. The second parse of the printed form kept both values. 5.4E+24 compared with 100 is rejected.

There is currently no active authority for Math. So maybe you could shepherd the Math changes.

Kind regards,
@thojou

@thojou
thojou requested a review from mjansenDatabay November 2, 2026 13:49
@thojou thojou added bugfix php Pull requests that update Php code labels Nov 2, 2026
See: https://mantis.ilias.de/view.php?id=48370

A numeric question bound such as 5.4E+24 was stored as 0.
KindlyTo float rejected that text, and the request collector
replaced the failure with 0. PHP prints the parsed value back
as 5.4E+24, so the next save of 54E23 became 0 as well.
EvalMath read the plus as addition with the constant e, so the
same text scored as about 38.68.

FloatTransformation now accepts a decimal mantissa and an
exponent sign. EvalMath consumes the plus and evaluates the
magnitude as a power of ten. The ILIAS copyright header stays
first in EvalMath, and the notation tests compare values that
fit the PHP adapter.
@thojou
thojou force-pushed the hotfix/10/48370-numeric-bounds branch from 9367e4a to 432202b Compare November 10, 2026 12:45
@thojou

thojou commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

Hey all,

There is currently no authority assigned to Math. @mjansenDatabay has approved the changes related to Refinary.

Since these changes are required to resolve an issue in Test & Assessment, I will merge them now.

Kind regards,
@thojou

@thojou
thojou merged commit 31b4e3d into ILIAS-eLearning:release_10 Nov 10, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Looking for Shepherd php Pull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants