Millisecond Forums

Decimal separator inconsistency

https://forums.millisecond.com/Topic32458.aspx

By LTK - 11/12/2021

I'm running a script in which I compute some variables in Inquisit for analysis, and some participants have completed my experiment online, but I'm seeing a few strange things.

The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

The second is that the decimal separators are sometimes periods and sometimes commas. I'm in the Netherlands, which uses comma separators, but my non-European participants seem to have their data entered with period separators. Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script? This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

I attached the data file in question.
By Dave - 11/12/2021

LTK - 11/12/2021
I'm running a script in which I compute some variables in Inquisit for analysis, and some participants have completed my experiment online, but I'm seeing a few strange things.

The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

The second is that the decimal separators are sometimes periods and sometimes commas. I'm in the Netherlands, which uses comma separators, but my non-European participants seem to have their data entered with period separators. Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script? This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

I attached the data file in question.

>  The first is what looks like floating point errors: the variables I compute (which are mainly averages of whole numbers) have values like 0.6500000000000000222 coming out of 13 divided by 20. Annoying, but nothing I can't solve by rounding them off, though it would be nice if I could tell Inquisit to use only 2 decimals for all of my 34 analysis variables.

You could have use the format() function.
https://www.millisecond.com/support/docs/v6/html/language/expressions/functions.htm
https://www.millisecond.com/support/docs/v6/html/language/functions/format.htm

> Does Inquisit record data using the settings of the computer it's running on, rather than the computer that created the script.

Yes.

> This is a lot harder to fix, and I don't know how I can get the data to be saved with only comma separators.

This strikes me as a simple search and replace operation.