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
The function xpath_tree2cbuf() will always express numbers as a floating point type even if it is specified as an integer in the YANG model. A number in an xpath is received as "0" and is converted to "0.000000". Even though they represent the same number, the forms can imply different types in parsing the numbers in some software.
My desired solution is that the number in the output should have exactly the same form as the input. But is it possible also to just document that numbers in xpaths will always be floating point form.
I think that there is also a problem here in the YANG decimal64 type where the number of fractionals digits are specified - my interpretation of this is that a decimal64 should always be expressed with exactly the correct number of fractional digits, so if a decimal64 type has 2 fractional digits specified, like 1.00, then 1.0, 1.000, etc. are invalid forms even if they have the same floating point value. When the parsed number is converted back to a string type, the printf format "%lf" is used. On my system this produces 6 fractional digits, which is also a problem if the decimal64 has more than 6.
The text was updated successfully, but these errors were encountered:
The function xpath_tree2cbuf() will always express numbers as a floating point type even if it is specified as an integer in the YANG model. A number in an xpath is received as "0" and is converted to "0.000000". Even though they represent the same number, the forms can imply different types in parsing the numbers in some software.
My desired solution is that the number in the output should have exactly the same form as the input. But is it possible also to just document that numbers in xpaths will always be floating point form.
I think that there is also a problem here in the YANG decimal64 type where the number of fractionals digits are specified - my interpretation of this is that a decimal64 should always be expressed with exactly the correct number of fractional digits, so if a decimal64 type has 2 fractional digits specified, like 1.00, then 1.0, 1.000, etc. are invalid forms even if they have the same floating point value. When the parsed number is converted back to a string type, the printf format "%lf" is used. On my system this produces 6 fractional digits, which is also a problem if the decimal64 has more than 6.
The text was updated successfully, but these errors were encountered: