INT(A*B)/B
  • 1 Minute to read
  • Dark
    Light
  • PDF

INT(A*B)/B

  • Dark
    Light
  • PDF

Article summary

DMath: INT(A*B)/B

Multiplies the integer portions of (A and B) together and then divides by full value of B

INT(A*B)/B = ( INT(A) * INT(B) ) / B

where 

INT(A) = integer portion of A  (8.953 -> 8  , 7.18 -> 7,  -5.87 -> -5 )

INT(B) = integer portion of B  (50.553 -> 50  , 12.18 -> 12,  -0.87 -> 0 )

Purpose

Use this function to:
  • Use integer portions when calculating the dividend, but keep full precision for the divisor

Return Value

PropertyValue
FieldTypeDouble
FieldSizeLow / Med / High / Continuous
DataTypeDiscrete / Continuous
DataSizeShort / Integer / LongInteger / Double
Example Return Value: X*.XXXXXX....-X*.XXXXX

e.g.  21.000000, 98754654.123456, -5.000000, -654.320000


Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter recordset will be returned as null.
Math Function“p1”: “INT(A*B)/B”INT(A*B)/B
A“p2”: “NumericFieldName”
“p2”: “#N*.N*”
Required. Numerical input for A
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Integer, Double
  • Fixed Value:  #N*    e.g. #201596,    #-87
  • Fixed Value: #N*.N* e.g. #201596.05,    #-87.98
B“p3”: “NumericFieldName”
“p3”: “#N*.N*”
Required. Numerical input for B
Supports:  
  • DataType: Discrete / Continuous
  • Field Type: Integer, Double
  • Fixed Value:  #N*    e.g. #201596,    #-87
  • Fixed Value: #N*.N* e.g. #201596.05,    #-87.98
Treat Null as Zero"nullIsZero": true
"nullIsZero": false

True/False.
Default = False
If true, then any null values in the input fields will be treated as if they have a value of 0.

JSON Sample


Usage Notes

See Also:   

  • DMATH Overview
  • Mathematical Expression Field
  • (A*B)/C (DMATH)
  • (A*B)/C (LMATH)
  • (A*B) DMATH
  • (A*B) LMATH

Example

ExampleDetails
DescriptionInteger product of AB divided by B
Input
  • Table: = [customer]
  • Filter: = [No Filter]
  • Function: = DMath
  • Math Function = INT(A*B)/B
  • A:= [customer ].[DBL_A]
  • B:= [customer ].[DBL_N_NEG]
  • Name: = DMATH_INT_AB_Over_B
Sample





Was this article helpful?

What's Next