This is how floating-point values work -- it's not specific to Bifrost.
Floating-point values cannot represent all decimal values exactly -- there are gaps. In this instance, .370000005 actually is the decimal representation of the closest floating-point value to .37. In the UI, the float value is rounded for display but the string is not.
If you wanted to, you could use the string manipulation nodes to truncate that string to the number of decimal places you want. Rounding is also possible, but a bit trickier. However in either case, the string would no longer be the exact decimal representation of the actual float value that was converted to a string.
Hope that helps,
gray
I beg to differ -- how floats work is sometimes very important to users.
Comparisons are just one example (see Comparing Floating Point Numbers, 2012 Edition). This is why there is an almost_equal node.
The number_to_string node is just one of a set of basic conversion nodes for generic use. One possible use is to store string properties to help with debugging. In such a scenario, knowing that a value is actually 0.370000005 and not 0.37 might be critical.
Cheers,
gray
Can't find what you're looking for? Ask the community or share your knowledge.