[ET Trac] [Einstein Toolkit] #1958: parfiles accept 1.0, 0.0, 1e3 for integer typed parameters
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Fri Sep 23 09:09:12 CDT 2016
#1958: parfiles accept 1.0, 0.0, 1e3 for integer typed parameters
-----------------------+----------------------------------------------------
Reporter: rhaas | Owner:
Type: defect | Status: new
Priority: optional | Milestone:
Component: Cactus | Version: development version
Resolution: | Keywords:
-----------------------+----------------------------------------------------
Comment (by knarf):
I just compiled all of the ET with integerize() being a no-op, i.e., with
the strict check.
Concerning boolean: another example is accepting "yes" and "no". Which
isn't anything like any programming language uses.
The question is indeed, if we should treat 1.0 as being an integer number.
I would approach that independent of C or Fortran. I also don't quite see
1.0 being the problem. I don't see any real use case for 1.0 besides maybe
convenience for par-file scripts. The current format also accepts things
like 1.e6, which is a lot shorter than the same written as usual integer,
and easier to parse by eye.
I don't have a strong opinion either way, but also didn't see any strong
reason for either option yet. We might have one other potential problem.
We might hit problems with small errors making the test ineffective,
especially for large numbers. If we do, and if we officially allow the
current syntax, we would need to find a way around that. In this sense, I
lean towards the proposed strict check. It would always be possible for a
user to get from a float to an int by hand: int(1.0).
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1958#comment:4>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list