#1650: piraha parses "-0." incorrectly --------------------+------------------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Keywords: | --------------------+------------------------------------------------------- When encountering
foo::bar = -0.
in parameter files, the piraha parser returns (double)0. instead of (double)-0. it is misses the signed zero that the floating point numbers provide.
This makes it impossible to recover from (older) checkpoints where eg coordbase::xmin is given as -0.
A possible fix is to change line 545 of Call.cc from {{{ ret->ddata = -ret->ddata; }}} to {{{ ret->ddata = std::copysign(ret->ddata, std::signbit(ret->ddata) ? 1. : -1.); }}}