Handle inf and nan in parameter file parser

Create issue
Issue #1278 resolved
Erik Schnetter created an issue

The test case in CactusTest/TestPar fails because inf is not recognised as number.

Keyword:

Comments (8)

  1. Roland Haas

    This would be suitable for an easy (prior Perl knowledge) / medium (no Perl knowledge) hackathon task.

  2. Roland Haas

    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.

  3. Steven R. Brandt

    So TestPar.par does contain a test with an inf and call.cc does check for inf and nan. The test passes. As near as I can tell, this ticket ought to be closed.

  4. Roland Haas

    Sure. Steve pointed out (offline communication) that expressions.par in TestPar does indeed contain nan . Somehow git log -G 'nan' does not find it. Closing the ticket since it has already been fixed.

  5. Log in to comment