FrediFizzx wrote:
I am not sure why you have the g-function as you don't call it in the simulation. I also found out that sign(p(a,e)) as you have it programmed is not quite the same as using the acos() function that I was originally using so a bit of a mystery as to why both ways work.
I call the g-function in the second part (for f = 0 case), but we don't have to. We have an option to call it for the main part also. I have done it this way to retain the connection with the original "complete state" theory behind the simulation: https://arxiv.org/abs/1405.2355. "acos()" is just a way of writing the "Angles", so it is not surprising that both of them work. "sign(p(a,e))" is exactly the function Bell used in his own local model of 1964. But he missed the q(a,e,s) part from the g-function.
FrediFizzx wrote:I'm hung up with trying to program a full arc cosine function for GAViewer. I suspect it is also the difference between the R version and Mathematica version. I need it for GAViewer so that I can get the angles properly for b - a. As you know, arc cosine only works 0 to pi and gives the wrong angles for quadrants 2, 3 and 4 based on cosine values. But knowing both cosine and sine values it is possible to have a full arc cosine function that works from 0 to 2pi correctly. I'm almost there.
.
In Mathematica, or in the GAViewer, you don't have the "function" thing we have in R. May be that is what is missing?
***

