--- title: "A (LMATH)" slug: "a-lmath" updated: 2022-09-27T13:25:22Z published: 2022-09-27T13:25:22Z canonical: "docs.datajet.app/a-lmath" --- > ## 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. # A (LMATH) ## LMath: A ## Creates an integer copy of Field A ## Purpose Use this function to: - Turn a decimal field into a integer - Create a copy of an existing numeric field - Create a filtered copy of an existing field - Create a copy of an existing field where null values are mapped to zero ## Return Value | Property | Value | | --- | --- | | **FieldType** | Integer | | **FieldSize** | 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 | | **DataSize** | Short / Integer | ```shell Example Return Value: X...-X e.g. 21, 98754654, -5, -654 ``` ![A_Sample](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/A_Sample.PNG) ## Parameters | 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. *Note: Records not in the filter will still be treated as null, even if [Treat Null as Zero] is true.* | | **Math** **Function** | “p1”: “A” | A | | **A** | “p2”: “NumericFieldName” “p2”: “#N*.N*” | Required. *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 ```json { "method": "BuildBakedField", "project": "JoinDiscreteContinuous", "targetTable": "worldcities", "overwrite": true, "name": "lat_lines", "function": "lmath", "p1": "A", "p2": "lat" } ``` ## Usage Notes Note: no rounding of data occurs when using A(LMath) to convert a decimal to an integer. The integer portion of the decimal number is kept, and the decimal portion is discarded. See Also: - LMath Overview - A(DMath) - CopyDiscrete ## Example | Example | Details | | --- | --- | | **Description** | Obtain integer portion of longitude | | **Input** | - Table: = [worldcities] - Filter:= None - Function: = LMath - **Math Function** **= A** - A:= [worldcities].[lon] - Treat Null as Zero: = false - Name: = lon_lines | | **Sample** | ![A_Example](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/A_Example.PNG) |