You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Floats can't have keys other than t and v, and their values must be numbers
passing `isFinite` and failing `isNaN`.
expect( OMNode.checkJSON { t : 'f', v : -15.9, x : 'thing' } ) \
.toMatch /Key x not valid in object of type f/
expect( OMNode.checkJSON { t : 'f', v : '-15.9' } ) \
.toMatch /Not a number: -15\.9 of type string/
expect( OMNode.checkJSON { t : 'f', v : Infinity } ) \
.toMatch /OpenMath floats must be finite/
expect( OMNode.checkJSON { t : 'f', v : -Infinity } ) \
.toMatch /OpenMath floats must be finite/
expect( OMNode.checkJSON { t : 'f', v : NaN } ) \
.toMatch /OpenMath floats cannot be NaN/
The file openmath-spec.litcoffee says:
but infinity and NaN are supported both by Javascript and by OpenMath, hence also
openmath-js should support them.
See
https://www.openmath.org/standard/om20-2019-07-01/omstd20.html#sec_xml-desc
https://www.openmath.org/standard/om20-2019-07-01/omstd20.html#sec_compl_xml_encoding_val
https://www.openmath.org/standard/om20-2019-07-01/omstd20.html#chgenc
The text was updated successfully, but these errors were encountered: