--- title: "DMath Overview" slug: "dmathfunction-1" updated: 2021-10-21T11:04:23Z published: 2021-10-21T11:04:23Z canonical: "docs.datajet.app/dmathfunction-1" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # DMath Overview ## DMATH Functions ## Functions that work on numeric fields and create fields with decimal precision ## Purpose Use DMATH functions to: - Perform efficient mathematical manipulations on numeric data - Perform floating point math functions ## Return Value | Property | Value | Notes | | --- | --- | --- | | **FieldType** | Double | DMath functions always return a double (decimal) field type with 6 figure precision | | **FieldSize** | Med / High / Continuous | Med - Up to 65,630 unique values High - up to 1,000,000 unique values Continuous - greater than 1,000,000 unique values | | **DataType** | Discrete / Continuous | Discrete, unless number of unique values > 1,000,000 | | **DataSize** | Short / Integer / Double | Short - Up to 65,630 unique values Integer - up to 1,000,000 unique values Double - greater than 1,000,000 unique values | ```shell Example Return Value: -n*.nnnnnn....n*.nnnnnn e.g. -509.000000......90876.123456 ``` Displaying DataType[Double] - Fields of DataType Double (decimals/floating points) will be displayed in the data view without decimals if all decimal values are .000000 - Decimal precision is always displayed in the Quick Profiler Dividing by zero - Dividing by zero will produce a null ## Parameters ### Data View ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/OVERVIEW_Sample.PNG)Various "Double" Data fields displayed in data View ### Quick Profiler and Tree view ### ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/OVERVIEW_QuickProfile.PNG) ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DMATH_OVERVIEW_Treeview.PNG) ## Parameters ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/DMATH_OVERVIEW_Dialog.PNG) | Parameter | JSON | Description | | --- | --- | --- | | **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”: “” | Select the DMATH function from the drop-down list. Specifies the function to use. | | **A - F** | “p2-6”: “NumericFieldName” “p2-6”: “#N*.N*” | Fields to use for the values A-F. Alternatively, a field can be replaced with a Fixed Value. Fixed values must be preceded by the hash symbol (#). *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. If any of the source fields contain a null the result will be null, unless “Treat Null As Zero” is selected, in which case all field values of null will be assumed to be zero. | | Name | "name" : "FieldName" | Required. The name of the field to create. | ## JSON Sample ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1634649251882.png) ## Usage Notes DMath manipulations that are not covered through built in DMath functions (baked fields) may still be achievable using Mathematical Expression fields. Mathematical Expression Fields - Flexible - May be slower to process than DMath functions - If calculation time on an expression field is an issue, and a corresponding DMath function is available, considering switching to DMath See Also: - [Field and Table Names](/v1/docs/generaltemplate) - {TODO: Field and Data Types} - {TODO: Engineering How To} ##