This article explains how to use Mass Multiplication to multiply all entered numbers.


On the Grasshopper, it is represented by either of the two above.
Multiply or multiply all input values
By using Mass Multiplication, all input numerical values can be multiplied or summed.

Enter multiple numerical data in the Mass Multiplication(I).
In this case, we input numerical values of 2, 5, 4, and 3.
Then, the Mass Multiplication(I) outputs the numerical value obtained by multiplying all the input numerical values.
In this case, 2 x 5 x 4 x 3 is performed and 120 is output.
The Mass Multiplication(Pr) outputs the numbers multiplied from the top in sequence.
In this case, the first number is 2, the second is 2 x 5 = 10, the third is 10 x 4 = 40, and the fourth is 40 x 3 = 120.
Determining the number of zeros
Applying Mass Multiplication, it is possible to determine if a number of 0’s are included.

Additional Components: (1) Boolean
In the above image, the input numerical value contains 0.
Connect the right terminals of Mass Multiplication to Boolean.
Then the number is treated as a Boolean value.
A Boolean is information that is either true or false.
In Grasshopper, the number 0 is treated as False, while other numbers are treated as True.
Therefore, if a 0 is mixed in with the input number, the output will be a false False, since it will be 0 no matter what it is multiplied by.
To check where the zero occurred, connect a Boolean to the Pr.
In the image above, the third and subsequent values are false because the third value is 0.

We have modified the 0 to make the number 1.
Then there will be no 0 on the multiplication, so it will be output as True.
You can see that the Pr is also all True.
This way, you can also use it to determine if a number contains 0 or not.
Checking if a number contains False
You can also apply the previous method to check if the data contains False.
Grasshopper may output the result in the True or False state.
In that case, you can determine if the data contains False.

Additional components: (1) Integer (2) Boolean
Connect data that contains True or False to a component that stores numeric values such as Integer.
The output will then be 1 for True and 0 for False.
Then, when the Integer is connected to the Mass Multiplication component, it outputs False.
This is because the original data contains one or more false values and 0 is output.
In this case, check the Pr to see where the False is coming from and correct the original data.

When the original data is corrected and becomes True, the numerical output results are all set to 1 and output as True, as shown here.
List of Grasshopper articles using Mass Multiplication component↓
Comment