Try to avoid the exponentiation operator where possible
Loosely related to issue 142, I have started a branch trying to get rid of the exponentiation expressions (i.e. **
) in Nifty where they are not really needed.
If you can avoid **
, please do. It has a very strange precedence. While it is clear why the expressions mentioned in issue 142 need brackets (once one thinks about it long enough), there are really bizarre cases, like the following from https://gitlab.mpcdf.mpg.de/ift/NIFTy/blob/master/nifty/minimization/line_searching/line_search_strong_wolfe.py#L347
d1[0, 1] = -db ** 2
In Python, this is equivalent to "-(db*db)", although the spaces and general experience suggest otherwise.
In Fortran, the value of this expression would be "db*db". [Edit: sorry, this is incorrect; I blindly trusted information on the internet :(]
So please, whenever you have to use **
, be very explicit with brackets!