- // Extract float attributes from both terms and pack them
- // into a single value
- attr = sattr[0] & FLOAT | ((sattr[1] & FLOAT) >> 1);
- attr2 = sattr[0] | sattr[1] & FLOAT; // Returns FLOAT if either of the two numbers are FLOAT
-
- if (attr == (FLOAT | (FLOAT >> 1)))
- {
- // Float / Float
- double * dst = (double *)sval;
- double * src = (double *)(sval + 1);
-
- if (*src == 0)
- return error("divide by zero");
-
- *dst = *dst / *src;
- }
- else if (attr == FLOAT)
- {
- // Float / Int
- double * dst = (double *)sval;
- uint64_t * src = (uint64_t *)(sval + 1);
+ // Get FLOAT attribute, if any
+ attr = (sattr[0] | sattr[1]) & FLOAT;