Open
Description
I believe there is a typo in the template below:
template transform(string f0, string f1, string f2, string c)
{
import std.array : replace;
enum raw = `_f0 *= _c;
_f0 = copysign(exp(_f0), _c);
_f2 = _c * _f1 * _f1 + _f2;
_f2 *= _c * _f0;
_f1 *= c;
_f1 *= _f0;`;
enum transform = raw.replace("_f0", f0).replace("_f1", f1).replace("_f2", f2).replace("_c", c);
}
Note the line _f1 *= c;
, I believe it should be _f1 *= _c;
.
It happens to work because everywhere it is called the input variable happens to be named 'c' so the replace("_c", c)
isn't strictly necessary in those cases.
Metadata
Metadata
Assignees
Labels
No labels