I think there may be a bug in Expression Manager number_format. If you have an equation with result is a number greater than minus1000 or less than 1000, and try to number_format () it displays NAN. So any 1, 2, or 3-digit positive or negative and I get the NAN.

(I would report a bug but my account never works on the bugs site)

Funny I came across this php bug discussion about PHP number_format where Rasmus himself comments and gets in an argument with usersbugs.php.net/bug.php?id=50696

Fred, can you attach a sample survey? I'm not sure how this is implemented in detail at the EM but would like to test before submitting a ticket. Maybe the code is handled by PHP after being parsed by EM and thus the PHP bug causes the problem (just guessing))?!

A little bit off-topic, but I talked with Denis about creating a "format_money" function for EM. This would open up LimeSurvey to the wonderful world of finance. We need something that is like Excel currency masks and formatting.

Start with: -1234567.89
Turn it into: $(1,234,568) -- for example. there could be other

Currently you can write a function in EM to do this but there are a lot of steps. Especially when you can't count on number_format() even.

Also correction from earlier, it is not really a BUG in EM. Just a different expectation of how something will work.

Here is a pertinent quote from that PHP.net bug discussion:

[2010-01-08 23:20 UTC] This email address is being protected from spambots. You need JavaScript enabled to view it.
Wow, a classic case of how not to treat unpaid volunteers who provide
critical pieces of your money-making infrastructure.