MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / SIValue_Subtract

Function SIValue_Subtract

src/value.c:489–496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

487}
488
489SIValue SIValue_Subtract(const SIValue a, const SIValue b) {
490 /* Only construct an integer return if both operands are integers. */
491 if(a.type & b.type & T_INT64) {
492 return SI_LongVal(a.longval - b.longval);
493 }
494 /* Return a double representation. */
495 return SI_DoubleVal(SI_GET_NUMERIC(a) - SI_GET_NUMERIC(b));
496}
497
498SIValue SIValue_Multiply(const SIValue a, const SIValue b) {
499 /* Only construct an integer return if both operands are integers. */

Callers 1

AR_SUBFunction · 0.85

Calls 2

SI_LongValFunction · 0.85
SI_DoubleValFunction · 0.85

Tested by

no test coverage detected