You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming that this calculator runs on ganja, I came across this behavior:
which is correct according to IEEE 754.
On the other hand,
which is incorrect.
I've done some analysis using ganja coffeeshop to help resolve this bug sooner. Here's a small reproducible example:
// Create a Clifford Algebra with 3,0,1 metricAlgebra(3,0,1,()=>{varA=1e0123;varR=1/(A*(~A));// results in NaN - not according to IEEE 754.varS=1/R;// the S is zero (empty) in the interface but NaN in the console.varT=1/0;// works according to IEEE 754 (results in Infinity) - ok!// print into consoleconsole.log("R: ",R);console.log("S: ",S);console.log("T: ",T);// Produce a graph in 3Ddocument.body.appendChild(this.graph(()=>{return[0xFF0000,R,"R",// our test point0x00FF00,S,"S",0x0000FF,T,"T",];},{grid:true,// draw a gridlabels:true,// draw axis labelslineWidth:3// set the width of the lines connecting the points}));// end of graph});// end of Algebra
In short, ganja seems to follow IEEE 754 (the standard which describes, among many other things, the treatment of the division by zero) when it deals with real numbers, while it produces NaN's when it deals with zero multivectors. One thing I've noticed is that the coffeeshop interface does not display NaN values which (possibly) makes one assume that the values are all zeroes. So, PERHAPS, the reason we're getting zeroes (in the "calculator example" above) is because NaN's get interpreted as empty values and empty values get interpreted as zeroes later... just a guess. HTH.
The text was updated successfully, but these errors were encountered:
Assuming that this calculator runs on ganja, I came across this behavior:
![image](https://user-images.githubusercontent.com/4019314/235443164-e1862221-3bdf-45d1-a637-60bffaa3e4d4.png)
![image](https://user-images.githubusercontent.com/4019314/235443067-073c7648-c237-43c6-ac3e-e67c8440f09b.png)
which is correct according to IEEE 754.
On the other hand,
which is incorrect.
I've done some analysis using ganja coffeeshop to help resolve this bug sooner. Here's a small reproducible example:
In short, ganja seems to follow IEEE 754 (the standard which describes, among many other things, the treatment of the division by zero) when it deals with real numbers, while it produces NaN's when it deals with zero multivectors. One thing I've noticed is that the coffeeshop interface does not display NaN values which (possibly) makes one assume that the values are all zeroes. So, PERHAPS, the reason we're getting zeroes (in the "calculator example" above) is because NaN's get interpreted as empty values and empty values get interpreted as zeroes later... just a guess. HTH.
The text was updated successfully, but these errors were encountered: