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
I stumbled over the issue that adding nested models results in a floating point precision loss. When adding a nested model, the _includeSDF is converted to a string through a call to Element::ToString. This ultimately calls Param::GetAsString() which uses the ParamStreamer to write data to a std::ostream. By injecting std::setprecision(std::numeric_limits<T>::max_digits10) in the output stream this precision loss can be prevented.
Kind regards,
Hauke
The text was updated successfully, but these errors were encountered:
I created a pull request for the master branch here: #314
I have a similar fix available for v6.x and it would be great if you could consider that as a merge request as well.
Hi,
I stumbled over the issue that adding nested models results in a floating point precision loss. When adding a nested model, the
_includeSDF
is converted to a string through a call toElement::ToString
. This ultimately callsParam::GetAsString()
which uses the ParamStreamer to write data to astd::ostream
. By injectingstd::setprecision(std::numeric_limits<T>::max_digits10)
in the output stream this precision loss can be prevented.Kind regards,
Hauke
The text was updated successfully, but these errors were encountered: