Skip to content
Snippets Groups Projects
Commit 22c35569 authored by Arnaud Degroote's avatar Arnaud Degroote
Browse files

[wip/hyper] Add a patch which fix a precision issue in code generation

Correspond to 4447255a1 in upstream.
Bump PKGREVISION
parent 4a030c5d
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
DISTNAME= hyper-${VERSION}
VERSION= 0.9
PKGREVISION= 1
CATEGORIES= supervision
MASTER_SITES= ${MASTER_SITE_OPENROBOTS:=hyper/}
MASTER_REPOSITORY= ${MASTER_REPOSITORY_OPENROBOTS}hyper
......
SHA1 (hyper-0.9.tar.gz) = adf3507649a3cd3afed44b300f99850243daab25
RMD160 (hyper-0.9.tar.gz) = da79fc936a80720d489630163e403ce0439bd4fe
Size (hyper-0.9.tar.gz) = 176663 bytes
SHA1 (patch-aa) = 1d7f8ead0ab7811bfe394dfdd7db0d599cfdb239
[compiler] Force the output in fixed mode for double
Otherwise, they can be truncated and lead to incorrect values
---
src/compiler/ability.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/compiler/ability.cc b/src/compiler/ability.cc
index c87b1d6..1f92140 100644
--- src/compiler/ability.cc
+++ src/compiler/ability.cc
@@ -144,7 +144,8 @@ struct print_initializer_helpers : boost::static_visitor<std::string>
std::string operator () (const Constant<T>& c) const
{
std::ostringstream oss;
- oss << ", " << var_name << "(" << c.value << ")";
+ oss.precision(9);
+ oss << ", " << var_name << "(" << std::fixed << c.value << ")";
return oss.str();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment