Open
Description
Description
Per the XForms spec and W3 XPath spec, non-numeric or missing inputs in form calculations should evaluate to NaN.
JavaRosa should consistently preserve NaN in these cases to align with the spec. The NaN in submitted data highlights form design issues (e.g., non-required or non-numeric fields) and maintains transparency, though it may appear less aesthetic in the UI.
Proposed Change
Ensure JavaRosa preserves NaN in calculations for missing or non-numeric inputs, matching the XPath spec. This is a low-priority enhancement to maintain spec compliance and avoid masking form design errors.
Additional Notes
This issue was originally discussed in getodk/web-forms#383.