Using rstan 2.32, I assumed complex numbers should be working but seem to have trouble?
sylstan <- '
functions{
complex times_i(complex z){
return z;
}
}
parameters{
}
'
sm <- stan_model(model_code = sylstan)
Error in stanc(file = file, model_code = model_code, model_name = model_name, :
0
Syntax error in 'string', line 2, column 1 to column 8, parsing error:
Function forward declaration, definition or "}" expected after "functions {".