Multiply

library operator
ID: bb7569d8-1391-41d0-961f-ba4db4abce7b
Multiplies two numbers A and B and emits their product.

Behavior

Test data showing the behavior of Multiply

Positive integers

It returns the product of positive integers.

Input Output
{"a":1,"b":0} 0
{"a":0,"b":4} 0
{"a":2,"b":5} 10
Floats

It copes with floating point numbers.

Input Output
{"a":0.5,"b":0.5} 0.25
{"a":-1.3,"b":0.5} -0.65
{"a":6.2,"b":0} 0
Negative integers

It evaluates the signs correctly.

Input Output
{"a":-2,"b":5} -10
{"a":2,"b":-5} -10
{"a":-2,"b":-5} 10
Null

It returns null if one or both factors are null.

Input Output
{"a":null,"b":0.5} null
{"a":null,"b":null} null
{"a":null,"b":0} null

Implementation

The implementation of Multiply makes use of the following 1 operators.

1
Evaluates an expression.

Used in

The Multiply operator is used by 1 operators.

Emits the product of a stream of numbers.