curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1546] [Mantis 1582] Equations compute incorrect integer values of real powers of integers #538

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : dfremont

Description :

Raising a number to a real number and asking for the result as a number via an equation yields the wrong result. The problem only arises if the base is a number, not a real number. This is a similar issue to #0001417, but here the generated I6 is missing a conversion instead of having an extra one (see below).

Steps to reproduce :

Foo is a room.

Equation 1 - Malthus
    R = 2^T
where R is a number, T is a real number.

When play begins:
    let R be given by Malthus where T is 6.0;
    say "[R]."

Additional information :

R is assigned using the following I6 expression:

REAL_NUMBER_TY_Pow(NUMBER_TY_to_REAL_NUMBER_TY(2), 1086324736)

This is missing a final call to REAL_NUMBER_TY_to_NUMBER_TY.

imported from: [Mantis 1582] Equations compute incorrect integer values of real powers of integers
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-07T04:59:17+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by graham :
Fixed (and not the same issue as 0001417).