John Cremona on Thu, 10 Sep 2020 15:06:23 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
gp2c question |
I have a gp function which I am running using gp2c. In the function I have the lines p = 20.0; a = random(p)*2 -1; since I want a to be a random real in the balanced unit internal [-1,1]. (I hope that is correct gp: ?random does not mention the possibility of an argument of type t_REAL, but ??random does.) Both p and are declared in a my() statement as type real with my(p:real, a:real, ...). The second line above causes a warning from gp2c Warning:MCq.gp:9: Assignement to a less precise type: real<-gen a=(random(p)*2)-1 Should I worry about that? And surely the right and left hand sides have the same type anyway? John