-
assigned issue to
- edited description
Handle inf and nan in parameter file parser
The test case in CactusTest/TestPar fails because inf is not recognised as number.
Keyword:
Comments (8)
-
-
@Steven R. Brandt maybe revisit this for piraha?
-
This would be suitable for an easy (prior Perl knowledge) / medium (no Perl knowledge) hackathon task.
-
I don’t see a test failure. Maybe something changed?
-
Not sure if that test ever actually tested for NaNs. At least `git log -G [Nn][Aa][Nn]' does not find anything. There is a test in NaNChecker that had to use some extra code to produce NaNs for it to find in git hash 837d426 "NaNChecker: use internally generated NaNs in test case" of cactusutils .
Should be enough to have a regex looking for
nan
and[+-]inf
where the current regex expects the numeric part I suspect and (possibly) some extra code in the C++ code to convert those to NaN and inf, if that is not automatically done by the routine used to convert real number strings to double values. -
So
TestPar.par
does contain a test with aninf
andcall.cc
does check forinf
andnan
. The test passes. As near as I can tell, this ticket ought to be closed. -
Sure. Steve pointed out (offline communication) that
expressions.par
in TestPar does indeed containnan
. Somehowgit log -G 'nan'
does not find it. Closing the ticket since it has already been fixed.
-
- changed status to resolved
- Log in to comment