#798: allow calculations in parameter assignments in parameter files --------------------------+------------------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: optional | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
As much as I dislike the sign convention for %, I think it is important to be consistent with C (and Fortran), and to be consistent between / and %.
Here is an idea: - define a function CCTK_INT imod(CCTK_INT, CCTK_INT) that wraps % - define a macro isint(T) ((T)0.1==(T)0.0) - use isint(x) ? imod(x,y) : fmod(x,y)