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 metric
Algebra(3,0,1,()=>{
var A = 1e0123;
var R = 1/(A*(~A)); // results in NaN - not according to IEEE 754.
var S = 1/R; // the S is zero (empty) in the interface but NaN in the console.
var T = 1/0; // works according to IEEE 754 (results in Infinity) - ok!
// print into console
console.log("R: ", R);
console.log("S: ", S);
console.log("T: ", T);
// Produce a graph in 3D
document.body.appendChild(this.graph(()=>{
return [
0xFF0000, R, "R", // our test point
0x00FF00, S, "S",
0x0000FF, T, "T",
];
},{
grid:true, // draw a grid
labels:true, // draw axis labels
lineWidth: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.
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:
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.