Expression Manager: Why is 123456789012345>=9.58 evaluating to false?

Mehr
1 Monat 1 Woche her - 1 Monat 1 Woche her #180525 von JonasHeidelberg
COM_KUNENA_MESSAGE_CREATED_NEW
I am creating a quiz where users should answer questions (e.g. which year was XYZ born) by giving a range (min, max). I then want to check if the true answer was within that range.
When testing it, it seems that LimeSurvey has a problem with large numbers:
100000000000000>=9.58 works (gives true)
130000000000000>=9.58 works (gives true)
123456789012345>=9.58 DOES NOT WORK (gives false) - see attached .lss and attached screenshots.

Any ideas where this is coming from? I can see that the input numbers are stored correctly in the results, just the comparison seems to fail...??? Anything I can do about this? Does anyone know what exactly is triggering this?

Dateianhang:

Dateiname: limesurvey...6986.lss
Dateigröße:36 KB


The following input:

leads to this output:
Anhang:
Last edit: 1 Monat 1 Woche her by JonasHeidelberg. Begründung: rearrange attachements

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

LimeSurvey Partners
Mehr
1 Monat 6 Tage her #180541 von jelo
COM_KUNENA_MESSAGE_REPLIED_NEW
Only took a quick look.
Please separate the calculation of the values from the rest.
When an equation question is containing HTML parts the equation questioncode cannot be used as a variable for EM. The equation variable is no longer a clean number, but often contains HTML fragments. That somestimes work, but often is causing chaos.

So prepare all variables in equation without any textparts.


This here seems to reference itself.

If you still have issues, please state what LimeSurvey version is uses and what PHP version is running LimeSurvey.

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
Anhang:
Folgende Benutzer bedankten sich: DenisChenu

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 6 Tage her - 1 Monat 6 Tage her #180553 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

jelo schrieb: So prepare all variables in equation without any textparts.

Yep, seems to fix the issue
So you believe the true answer for Q3 is between {array1_SQ003_SQMin} and {array1_SQ003_SQMax}? This is {if(((!is_empty(array1_SQ003_SQMax.NAOK)) and (!is_empty(array1_SQ003_SQMin.NAOK))),"true, congratulations","false, I am sorry")}!
This must work too with self.NAOK (and you can report) but since have a workaround :)

Still not work
So you believe the true answer for Q3 is between {array1_SQ003_SQMin} and {array1_SQ003_SQMax}? This is {if(array1_SQ003_SQMin<=18.9 and array1_SQ003_SQMax>=18.9,"true, congratulations","false, I am sorry")}!

Maybe because it's big number ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .
Last edit: 1 Monat 6 Tage her by DenisChenu.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 6 Tage her #180569 von JonasHeidelberg
COM_KUNENA_MESSAGE_REPLIED_NEW
Hi jelo,
I am not sure what you want me to do differently. The actual equation (which gets stored in the database) evaluates to true or false, and only the question which is displayed contains HTML:


From what I understand the self.NAOK should refer to the true/false in the equation, not to the question text. Or am I mistaken?I should stress that for smaller "Max" values all works fine...

I use PHP version 7 and LimeSurvey Version 3.15.8+190130.
Anhang:

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 6 Tage her #180570 von JonasHeidelberg
COM_KUNENA_MESSAGE_REPLIED_NEW
Yes, I only observe this problem with (certain) large numbers.

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Mehr
1 Monat 6 Tage her #180571 von DenisChenu
COM_KUNENA_MESSAGE_REPLIED_NEW

JonasHeidelberg schrieb: Yes, I only observe this problem with (certain) large numbers.

You can report the issue, using self AND replacing self by the equation itself.

With the equation itself : no JS
Without : there are a span wrapper

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand (or search sondages pro).
An error happen ? Before make a new topic : remind the Debug mode .

Bitte Anmelden oder Registrieren um an der Konversation teilzunehmen.

Jetzt loslegen!

Melden Sie sich jetzt an, und erstellen Sie in wenigen Minuten Ihre erste Umfrage.

Account einrichten

Abonnieren Sie unseren Newsletter

Abonnieren Sie unseren Newsletter für alle Neuigkeiten rund um LimeSurvey
captcha