Transform - Numbers: Arithmetic

The Arithmetic template appears in the template list when a numeric field of type float32, float64, int8, int16, int32, int64uint8, uint16, uint32, or uint6, has been picked in the Transform pane.   The template computes basic arithmetic operations.

 

 

Arithmetic

Basic arithmetic operations, automatically providing choice of a second parameter, specified in the Value box and typically allowing a field, a specific value, or an expression, for operations that use an additional parameter.   Save the result into the specified Result destination using the specified numeric type.

 

  • absolute value (abs) - Compute the absolute value of the source field number.  Absolute value leaves positive numbers unchanged and converts negative numbers into their positive equivalents.   
  • add (+) - Add the Value to the source field number.
  • cube - Compute the cube of the source field number.
  • cube root (cbrt) - Compute the cube root of the source field number.
  • divide (/) - Divide the source field number by the Value.
  • divide integral (div) - Divide the source field number by the Value and discard any fractional part.
  • divide remainder (mod) - A classic modulo operation (the remainder (of a congruence) function): Divide the source field number by the Value and retain only the fractional part as a non-fractional whole number.
  • error (erf) - Compute the error function (also called erf(z) ) of the source field number.  
  • error complement (erfc) - Compute the complementary error function (also called erfc(z) ) of the source field number.
  • exponent (exp) - The exponential function: Compute e to the power of the source field number.   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • exponent binary (exp2) - Also known as the power of 2: Compute 2 to the power of the source field number.  If the source field has values 1, 2, 3,... the result of a binary exponentiation will be 2, 4, 8,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • exponent decimal (exp10) - Also known as the power of 10: Compute 10 to the power of the source field number.  If the source field has values 1, 2, 3,... the result of a decimal exponentiation will be 10, 100, 1000,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   
  • gamma (tgamma) - Compute the gamma function of the source field number.  
  • gamma logarithm (lgamma) - Compute the natural logarithm of the gamma function of the source field number. 
  • logarithm (log) - Compute the base e logarithm (also called the natural logarithm) of the source field number.
  • logarithm binary (log2) - Compute the base 2 logarithm (also called the binary logarithm) of the source field number.
  • logarithm decimal (log10) - Compute the base 10 logarithm (also called the common logarithm) of the source field number.
  • multiply (*) - Multiply the source field number by the Value number.
  • power (pow) - Compute the source field to the power of the specified Value.  A power of 1 is the source field number unchanged, a power of 2 is the source field number squared, and a power of 3 is the source field number cubed.
  • reciprocal - One divided by the source field number.  The reciprocal is also the source field number to the power of -1, another way of saying the same thing. The reciprocal of zero is undefined, and thus returns a NULL.
  • sign (sign) - Report if the source field number is positive (return 1) or negative (return -1).   The sign of zero is 0.
  • sign invert - Multiply the source field number by -1, thus inverting the sign of the number.  
  • square - Compute the square of the source field number (the number multiplied by itself).
  • square root (sqrt) - Compute the square root of the source field number.
  • subtract (-) -  Subtract the Value from the source field number.
  • subtract from (-) - Subtract the source field number from the Value.

 

Launch the template by choosing a numeric field and then double-clicking the Arithmetic template.  When the template launches we can specify options.

 

 

Arithmetic : absolute value (abs)

Compute the absolute value of the source field number and save into the Result destination.  Absolute value leaves positive numbers unchanged and converts negative numbers into their positive equivalents.   

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose absolute value (abs) as the Operation.

 

For the Result destination, we choose New Field and then enter Absolute value of Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Absolute value of Numbers and populates it with the absolute value of numbers in the Numbers field.

 

Arithmetic : add (+)

Add the Value to the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose add (+) as the Operation.   We enter 100 in the Value box.

 

For the Result destination, we choose New Field and then enter Addition as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Addition and populates it with the sum of 100 plus the number in the Numbers field.

 

In the example above we added the same value, 100, to each of the values in the Numbers field.  Instead of using the same, specific number, we can choose another field or write an Expression in the Value box,  to use in the addition.

 

Suppose our example table has two fields, with a Fractions field in addition to the Numbers field.  We will add the Fractions field to the Numbers field.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose add (+) as the Operation.   We choose Fractions from the pull down menu in the Value box.

 

For the Result destination, we choose New Field and then enter Addition as the name of the new field to add to the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Addition and populates it with the sum of the numbers in the Numbers and the Fractions field.

 

We can also use an Expression in the Value box, to use in the addition.

 

Suppose we would like to add a random number from 0 to 99 to each of the Numbers, as we might do if the numbers represented a latitude or longitude and we wanted to obfuscate the precise number.   In our example table, we turn on the mfd_id field to remind us it is available.  

 

(Hidden fields can be used in expressions, so we do not need to turn it on, but for illustrations it is nice to see all the fields we will use in an expression.)

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose add (+) as the Operation.   

 

In the pull down menu for the Value box we choose Expression, and then we enter the following expression:

 

(TABLE CALL ValueSequenceRandomInt(1, 100, [mfd_id]))

 

That expression uses the value of the mfd_id field for each record as a seed to generate a random number from 0 to 99.

 

For the Result destination, we choose New Field and then enter Addition as the name of the new field to add to the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Addition and populates it with the sum of the numbers in the Numbers and a random number from 0 to 99.

 

 For a different way of creating random numbers using transforms, see the Transform - Numbers: Random  template.

 

Arithmetic : cube

Compute the cube of the source field number and save into the Result destination.

 

Arithmetic : cube root (cbrt)

Compute the cube root of the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose cube root (cbrt) as the Operation.

 

For the Result destination, we choose New Field and then enter Cube root of Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Cube root of Numbers and populates it with the cube root of numbers in the Numbers field.

 

Arithmetic : divide (/)

Divide the source field number by the Value and save into the Result destination.

 

We start with a table with two fields of type float64, a Numbers field and a Random field that has been populated with random numbers.  We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose divide (/) as the Operation.   We choose Random from the pull down menu in the Value box.

 

For the Result destination, we choose New Field and then enter Division as the name of the new field to add to the table.  We could use whatever name we like, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Division and populates it with the result in each record of the Numbers values divided by the Random values.  

 

Arithmetic : divide integral (div)

Divide the source field number by the Value and discard any fractional part and save into the Result destination.

 

We start with a table with two fields of type float64, a Numbers field and a Random field that has been populated with random numbers.  We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose divide integral (div) as the Operation.   We choose Random from the pull down menu in the Value box.

 

For the Result destination, we choose New Field and then enter Division Int as the name of the new field to add to the table.  We could use whatever name we like, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Division Int and populates it with the result in each record of the Numbers values divided by the Random values, keeping only the whole integer portion of the number and discarding any fractional decimal part.

 

Arithmetic : divide remainder (mod)

A classic modulo operation (the remainder (of a congruence) function): Divide the source field number by the Value and retain only the fractional part as a non-fractional whole number and save into the Result destination.  Another way to express the same thing:  Take what is left over by the integral division of the source field by the given divisor value and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose divide remainder (mod) as the Operation.   In the Value box we choose Value, and then enter 10 as the value.

 

For the Result destination, we choose New Field and then enter Division Mod as the name of the new field to add to the table.  We could use whatever name we like, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Division Mod and populates it with the result of a modulo 10 operation on each Numbers value.  

 

In the above we can see that 1474 can be integrally divided by 10, that is evenly divided, 147 times, leaving a remainder of 4.  The remainder of 4 is what appears in the Division Mod field.    Likewise, the value 14019 can be integrally divided 1401 times by 10, leaving a remainder of 9, which is what appears in the Division Mod field for that row.

Extract Fractional Parts

The divide remainder (mod) operation is also used to extract fractional parts from numbers.   

 

For example, we can use the divide remainder (mod) operation with a Value of 1 to extract only the decimal fraction portion of a number and save it to the Result destination.

 

Suppose our example table has only a Fractions field.  We will extract the fractional part of the Fractions field.

 

With the focus on the table window, in the Transform pane we choose the Fractions field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose divide remainder (mod) as the Operation.   In the Value box we choose Value, and then enter 1 as the value.

 

For the Result destination, we choose New Field and then enter Fractional part as the name of the new field to add to the table.  We could use whatever name we like, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Fractional part and populates it with the result of a modulo 1 operation on each Fractions value, which has the desired effect of extracting just the decimal fractional part from each Fractions number.

 

We can extend that same idea to get only that portion of the decimal fractional part that we want.   For example, we can use divide remainder (mod) with a Value of 0.01 to get only that decimal fractional part beyond the first two decimal digit positions to the right of the decimal point.

 

 

With the focus on the table window, in the Transform pane we choose the Fractions field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose divide remainder (mod) as the Operation.   In the Value box we choose Value, and then enter .01 as the value.

 

For the Result destination, we choose New Field and then enter Fractional part after 2 as the name of the new field to add to the table.  We could use whatever name we like, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Fractional part after 2 and populates it with the result of a modulo .01 operation on each Fractions value.   Using .01 for the Value has the desired effect of extracting just the decimal fractional part from each Fractions number that comes after the first two decimal positions to the right of the decimal point.

 

Arithmetic : error (erf)

Compute the error function (also called erf(z) ) of the source field number and save into the Result destination. 

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose error (erf) as the Operation.

 

For the Result destination, we choose New Field and then enter Erf of Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Erf of Numbers and populates it with the error function of numbers in the Numbers field.

 

Arithmetic : error complement (erfc)

Compute the complementary error function (also called erfc(z) ) of the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose error complement (erfc) as the Operation.

 

For the Result destination, we choose New Field and then enter Erfc of Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Erf of Numbers and populates it with the error function of numbers in the Numbers field.

 

Arithmetic : exponent (exp)

The exponential function: Compute e to the power of the source field number and save into the Result destination.   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose exponent (exp) as the Operation.

 

For the Result destination, we choose New Field and then enter Exp of Series as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Exp of Series and populates it with e to the power of the number in the Series field.

 

Arithmetic : exponent binary (exp2)

Also known as the power of 2: Compute 2 to the power of the source field number and save into the Result destination.  If the source field has values 1, 2, 3,... the result of a binary exponentiation will be 2, 4, 8,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose exponent binary (exp2) as the Operation.

 

For the Result destination, we choose New Field and then enter Exp2 of Series as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Exp2 of Series and populates it with 2 to the power of the number in the Series field.

 

Arithmetic : exponent decimal (exp10)

Also known as the power of 10: Compute 10 to the power of the source field number and save into the Result destination.  If the source field has values 1, 2, 3,... the result of a decimal exponentiation will be 10, 100, 1000,....   For anything but relatively small numbers in the source field such exponentiation results in numbers larger than can be represented in most types and thus returns a NULL.   

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose exponent decimal (exp10) as the Operation.

 

For the Result destination, we choose New Field and then enter Exp10 of Series as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Exp10 of Series and populates it with 10 to the power of the number in the Series field.

 

Arithmetic : gamma (tgamma)

Compute the gamma function of the source field number and save into the Result destination.   For larger  numbers in the source field the gamma function results in numbers larger than can be represented in most types and thus returns a NULL.   

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose gamma (tgamma) as the Operation.

 

For the Result destination, we choose New Field and then enter Tgamma of Series as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Tgamma of Series and populates it with the gamma function of the number in the Series field.

 

Arithmetic : gamma logarithm (lgamma)

Compute the natural logarithm of the gamma function of the source field number and save into the Result destination.  Also known as a log-gamma function.  

 

We start with a table with a single Small Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Small Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose gamma logarithm (lgamma) as the Operation.

 

For the Result destination, we choose New Field and then enter Lgamma of Small Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Small Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Lgamma of Small Numbers and populates it with the gamma logarithm of the number in the Small Numbers field.

 

Arithmetic : logarithm (log)

Compute the base e logarithm (also called the natural logarithm) of the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose logarithm (log) as the Operation.

 

For the Result destination, we choose New Field and then enter Logarithm as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Logarithm and populates it with the natural logarithm of numbers in the Numbers field.

 

Arithmetic : logarithm binary (log2)

Compute the base 2 logarithm (also called the binary logarithm) of the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose logarithm binary (log2) as the Operation.

 

For the Result destination, we choose New Field and then enter Binary logarithm as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Binary logarithm and populates it with the base 2 logarithm of numbers in the Numbers field.

 

Arithmetic : logarithm decimal (log10)

Compute the base 10 logarithm (also called the common logarithm) of the source field number and save into the Result destination.

 

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose logarithm decimal (log10) as the Operation.

 

For the Result destination, we choose New Field and then enter Decimal logarithm as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Decimal logarithm and populates it with the base 10 logarithm of numbers in the Numbers field.

 

Arithmetic : multiply (*)

Multiply the source field number by the Value number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose multiply (*) as the Operation.   We enter 100 in the Value box.

 

For the Result destination, we choose New Field and then enter Multiplication as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Multiplication and populates it with 100 times the number in the Numbers field.

 

In the example above we multiplied the same value, 100, with each of the values in the Numbers field.  Instead of using the same, specific number, we can choose another field or write an Expression in the Value box, to use in the multiplication.

 

Suppose our example table has two fields, with a Fractions field in addition to the Numbers field.  We will multiply the Numbers field by the Fractions field.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose multiply (*) as the Operation.   We choose Fractions from the pull down menu in the Value box.

 

For the Result destination, we choose New Field and then enter Multiplication as the name of the new field to add to the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Multiplication and populates it with the product of the numbers in the Numbers and the Fractions field.

 

Arithmetic : power (pow)

Compute the source field to the power of the specified Value and save into the Result destination.  A power of 1 is the source field number unchanged, a power of 2 is the source field number squared, a power of 3 is the source field number cubed, and so on.

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose power (pow) as the Operation.   

 

We enter 4 in the Value box.  Instead of a fixed value, as with other transform templates we could choose a field in the Value box, or we could choose Expression in the pull down menu for the Value box to use a value created by an SQL expression.

 

For the Result destination, we choose New Field and then enter Power of 4 as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Power of 4 and populates it with numbers in the Series field taken to the power of 4.   From the results we can see that 12 to the power of 4 is 20736.

 

Arithmetic : reciprocal

Compute 1 divided by the source field number and save into the Result destination. The reciprocal is also the source field number to the power of -1, another way of saying the same thing. The reciprocal of zero is undefined, and thus returns a NULL.

 

We start with a table with a single Series field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Series field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose reciprocal as the Operation.   

 

For the Result destination, we choose New Field and then enter Reciprocal of Series as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Series field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Reciprocal of Series and populates it with the reciprocal of numbers in the Series field.   From the results we can see that 1/11 is 0.0909... and that 1/10 is, as expected, 0.1.  

 

Arithmetic : sign (sign)

Report if the source field number is positive (return 1) or negative (return -1) and save into the Result destination.   The sign of zero is 0.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose sign (sign) as the Operation.

 

For the Result destination, we choose New Field and then enter Signs as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Signs and populates it with 1, -1, or 0 to show the sign of the numbers in the Numbers field.

 

Arithmetic : sign invert

Multiply the source field number by -1, thus inverting the sign of the number, and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose sign invert as the Operation.

 

For the Result destination, we choose New Field and then enter Inverted as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Inverted and populates it with the product of -1 and the numbers in the Numbers field.

 

Arithmetic : square

Compute the square of the source field number (the number multiplied by itself) and save into the Result destination.

 

Arithmetic : square root (sqrt)

Compute the square root of the source field number.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose square root (sqrt) as the Operation.

 

For the Result destination, we choose New Field and then enter Square root as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.  

 

 

The template creates a new float64 type field called Square root and populates it with the square roots of the numbers in the Numbers field.

 

Arithmetic : subtract (-)

 Subtract the Value from the source field number and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose subtract (-) as the Operation.   We enter 100 in the Value box.

 

For the Result destination, we choose New Field and then enter Subtraction as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Subtraction and populates it with the number in the Numbers field minus 100.

 

In the example above we subtracted the same value, 100, from each of the values in the Numbers field.  Instead of using the same, specific number, we can choose another field or write an Expression in the Value box,  to use in the subtraction.

 

Suppose our example table has two fields, with a Fractions field in addition to the Numbers field.  We will add the Fractions field to the Numbers field.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose subtract (-) as the Operation.   We choose Fractions from the pull down menu in the Value box.

 

For the Result destination, we choose New Field and then enter Addition as the name of the new field to add to the table.

 

Press Transform.

 

 

The template creates a new float64 type field called Subtraction and populates it with the numbers in the Numbers field minus the numbers in the Fractions field.

 

Arithmetic : subtract from (-)

Subtract the source field number from the Value and save into the Result destination.

 

We start with a table with a single Numbers field of type float64.   We have used the Layers pane to hide the mfd_id field, for a simpler illustration.

 

We will subtract the Numbers value from 5000.

 

 

With the focus on the table window, in the Transform pane we choose the Numbers field and then the Arithmetic template.

 

 

In the Arithmetic template, we choose subtract from (-) as the Operation.   We enter 5000 in the Value box.

 

For the Result destination, we choose New Field and then enter 5000 minus Numbers as the name of the new field to add to the table.  We could use whatever name we want, but it is wise to use names that remind us of what they are supposed to be.   We leave the Result type at the default float64.

 

If we preferred, we could have chosen Same Field to write the result back to the Numbers field, updating it "in place," or we could have chosen some other existing numeric field in the table.

 

Press Transform.

 

 

The template creates a new float64 type field called 5000 minus Numbers and populates it with 5000 minus the number in the Numbers field.

 

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Numeric Vectors

 

Transform - Numbers

 

Transform - Numbers: Bit Logic

 

Transform - Numbers: Copy

 

Transform - Numbers: Expression

 

Transform - Numbers: Hyperbolic

 

Transform - Numbers: Limit

 

Transform - Numbers: Random

 

Transform - Numbers: Round

 

Transform - Numbers: Special

 

Transform - Numbers: Trigonometric