Arith Sum+: Unterschied zwischen den Versionen
Cg (Diskussion | Beiträge) |
|||
Zeile 1: | Zeile 1: | ||
== Schema == |
== Schema == |
||
[[Bild:arith_sum+. |
[[Bild:arith_sum+.png]] |
||
This block replaces the [[Arith Sumn| Arith [ SumN ] ]] block. It allows for an arbitrary number of input pins. |
This block replaces the [[Arith Sumn| Arith [ SumN ] ]] block. It allows for an arbitrary number of input pins. |
||
== Operation == |
== Operation == |
||
Zeile 53: | Zeile 53: | ||
Notes: |
Notes: |
||
<BR> |
<BR> |
||
(1) Integers are not limited to a 32bit range. If the result does not fit into a smallInteger, a largeInteger representation with an arbitrary number of digits is automatically |
(1) Integers are not limited to a 32bit range. If the result does not fit into a smallInteger, a largeInteger representation with an arbitrary number of digits is automatically chosen (32, 64, 96, 128... bits). |
||
(2) If the fraction can be reduced to an integral value, an Integer is returned (i.e. 6/3 will be reduced to 2) |
(2) If the fraction can be reduced to an integral value, an Integer is returned (i.e. 6/3 will be reduced to 2) |
Version vom 11. Juni 2017, 17:07 Uhr
Inhaltsverzeichnis
Schema[Bearbeiten]
This block replaces the Arith [ SumN ] block. It allows for an arbitrary number of input pins.
Operation[Bearbeiten]
This block returns the sum of all given numbers, i.e.
sum = number1 + number2 + ... + numberN.
Automatic Type Conversion[Bearbeiten]
The block allows for mixed mode arithmetic. This means that all combinations of Float, Double, Integer, LargeInteger and Fractional numbers are allowed as input.
Depending on the input type(s), the output number is generated as:
in1 | in2 | out | |
Integer | Integer | Integer (1) | |
Integer | Float / Double | Float / Double | |
Integer | Fraction | Fraction (2) | |
Fraction | Fraction | Fraction (2) | |
Fraction | Float / Double | Float / Double | |
Float / Double | Float / Double | Float / Double |
Notes:
(1) Integers are not limited to a 32bit range. If the result does not fit into a smallInteger, a largeInteger representation with an arbitrary number of digits is automatically chosen (32, 64, 96, 128... bits).
(2) If the fraction can be reduced to an integral value, an Integer is returned (i.e. 6/3 will be reduced to 2)
Revisions[Bearbeiten]
This block has been in the Standard Library since 2.3.0.