[{"data":1,"prerenderedAt":46},["ShallowReactive",2],{"integration-node-red-contrib-calc\u002F":3},{"_id":4,"categories":5,"author":8,"description":10,"npmOwners":11,"npmScope":13,"name":4,"ffCertified":14,"downloads":15,"version":17,"updatedAt":18,"maintainers":19,"homepage":22,"bugs":23,"repository":25,"time":28,"lastUpdated":18,"created":29,"license":37,"githubOwner":12,"githubRepo":4,"examples":38,"readme":45},"node-red-contrib-calc",[6,7],"catalogue_utility","catalogue",{"name":9},"Bart Butenaers","A Node-Red node to perform basic mathematical calculations",[12],"bartbutenaers",null,false,{"week":16},8235,"1.0.6","2023-09-30T20:26:57.378Z",[20],{"name":12,"email":21},"bart.butenaers@gmail.com","https:\u002F\u002Fgithub.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc",{"url":24},"https:\u002F\u002Fgithub.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fissues",{"type":26,"url":27},"git","git+https:\u002F\u002Fgithub.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc.git",{"created":29,"1.0.0":30,"modified":18,"1.0.1":31,"1.0.2":32,"1.0.3":33,"1.0.4":34,"1.0.5":35,"1.0.6":36},"2018-12-02T20:56:12.593Z","2018-12-02T20:56:12.711Z","2018-12-05T19:26:58.871Z","2020-07-04T06:10:36.194Z","2020-07-04T06:44:13.977Z","2020-08-18T21:21:10.615Z","2020-08-25T18:17:44.957Z","2023-09-30T20:26:57.178Z","Apache-2.0",[39],{"name":40,"path":41,"url":42,"downloadUrl":43,"flow":44},"basic_flow","examples\u002Fbasic_flow.json","https:\u002F\u002Fgithub.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fblob\u002Fmaster\u002Fexamples\u002Fbasic_flow.json","https:\u002F\u002Fraw.githubusercontent.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fmaster\u002Fexamples\u002Fbasic_flow.json","[{\"id\":\"b6bc5399.8385e\",\"type\":\"calculator\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"inputMsgField\":\"payload\",\"outputMsgField\":\"payload\",\"operation\":\"max\",\"constant\":\"\",\"round\":false,\"decimals\":0,\"x\":640,\"y\":3060,\"wires\":[[\"4c297cba.7585a4\"]]},{\"id\":\"e5a3b930.003428\",\"type\":\"inject\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"topic\":\"\",\"payload\":\"[321,123,333,222,111]\",\"payloadType\":\"json\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"showConfirmation\":false,\"confirmationLabel\":\"\",\"x\":420,\"y\":3060,\"wires\":[[\"b6bc5399.8385e\"]]},{\"id\":\"4c297cba.7585a4\",\"type\":\"debug\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":830,\"y\":3060,\"wires\":[]}]","\u003Ch1 id=\"node-red-contrib-calc\">\u003Ca class=\"header-anchor\" href=\"#node-red-contrib-calc\">node-red-contrib-calc\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>A Node-Red node to perform basic mathematical calculations\u003C\u002Fp>\n\u003Ch2 id=\"install\">\u003Ca class=\"header-anchor\" href=\"#install\">Install\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Run the following npm command in your Node-RED user directory (typically ~\u002F.node-red):\u003C\u002Fp>\n\u003Cpre>\u003Ccode>npm install node-red-contrib-calc\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>For more advanced mathematical operations, please have a look at the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FDeanCording\u002Fnode-red-contrib-statistics\">node-red-contrib-statistics\u003C\u002Fa> node.\u003C\u002Fp>\n\u003Ch2 id=\"support-my-node-red-developments\">\u003Ca class=\"header-anchor\" href=\"#support-my-node-red-developments\">Support my Node-RED developments\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Please buy my wife a coffee to keep her happy, while I am busy developing Node-RED stuff for you ...\u003C\u002Fp>\n\u003Cp>\u003Ca href=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fbartbutenaers\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fwww.buymeacoffee.com\u002Fassets\u002Fimg\u002Fcustom_images\u002Forange_img.png\" alt=\"Buy my wife a coffee\" \u002F>\u003C\u002Fa>\u003C\u002Fp>\n\u003Ch2 id=\"usage\">\u003Ca class=\"header-anchor\" href=\"#usage\">Usage\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Four steps are involved to execute a mathematical calculation via this node:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\n\u003Cp>An input data is send to this node with a number or an array of numbers in the input message.  By default the data will arrive via \u003Ccode>msg.payload\u003C\u002Fcode>, but another input message field can be selected:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fmaster\u002Fimages\u002Fcalc_input.png\" alt=\"Input field\" \u002F>\u003C\u002Fp>\n\u003Cp>How many numbers should be available in the input message, depends on the \u003Cem>operation\u003C\u002Fem> type:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>Most operations require only a \u003Cem>\u003Cstrong>single input number\u003C\u002Fstrong>\u003C\u002Fem>.  For example a single input number \u003Ccode>-3\u003C\u002Fcode> is enough to calculate the absolute value.  All operations like this one will also accept an array of numbers as input data.  In that case \u003Cem>the same operation will be executed on every number in the array\u003C\u002Fem>!  For example the absolute value of array \u003Ccode>[-7, -3, -9, -12]\u003C\u002Fcode> will result in \u003Ccode>[7, 3, 9, 12]\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Some other operations require always an \u003Cem>\u003Cstrong>array of input numbers\u003C\u002Fstrong>\u003C\u002Fem>.  For example an array of minimum 2 input numbers \u003Ccode>[2, 3]\u003C\u002Fcode> is required to multiply, but the result will be a single output number \u003Ccode>6\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>A few operations require a \u003Cem>\u003Cstrong>fixed-length array of input numbers\u003C\u002Fstrong>\u003C\u002Fem>.  For example X to the power of Y requires an array of two input numbers.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>The node will execute the requested operation on the input data.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>If required, the result of the calculation will be rounded to the specified number of decimals (or truncated).\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>The result of the calculation will be stored in the output message.  The result can be a single output number or an array of output numbers.  By default the data will be put in \u003Ccode>msg.payload\u003C\u002Fcode>, but another output message field can be selected:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fmaster\u002Fimages\u002Fcalc_output.png\" alt=\"Output field\" \u002F>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Fol>\n\u003Ch1 id=\"example-flow\">\u003Ca class=\"header-anchor\" href=\"#example-flow\">Example flow\u003C\u002Fa>\u003C\u002Fh1>\n\u003Cp>The following flow shows how to search the maximum number from an array of injected numbers:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fuser-images.githubusercontent.com\u002F14224149\u002F90566608-110cde00-e1a9-11ea-9ce1-4f6964943fcb.png\" alt=\"image\" \u002F>\u003C\u002Fp>\n\u003Cpre>\u003Ccode>[{\"id\":\"b6bc5399.8385e\",\"type\":\"calculator\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"inputMsgField\":\"payload\",\"outputMsgField\":\"payload\",\"operation\":\"max\",\"constant\":\"\",\"round\":false,\"decimals\":0,\"x\":640,\"y\":3060,\"wires\":[[\"4c297cba.7585a4\"]]},{\"id\":\"e5a3b930.003428\",\"type\":\"inject\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"topic\":\"\",\"payload\":\"[321,123,333,222,111]\",\"payloadType\":\"json\",\"repeat\":\"\",\"crontab\":\"\",\"once\":false,\"onceDelay\":0.1,\"showConfirmation\":false,\"confirmationLabel\":\"\",\"x\":420,\"y\":3060,\"wires\":[[\"b6bc5399.8385e\"]]},{\"id\":\"4c297cba.7585a4\",\"type\":\"debug\",\"z\":\"4142483e.06fca8\",\"name\":\"\",\"active\":true,\"tosidebar\":true,\"console\":false,\"tostatus\":false,\"complete\":\"false\",\"x\":830,\"y\":3060,\"wires\":[]}]\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Ch2 id=\"operations\">\u003Ca class=\"header-anchor\" href=\"#operations\">Operations\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Following operations are available:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>\u003Cstrong>Average (avg)\u003C\u002Fstrong>: average of all the numbers in the input array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>2.5\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Maximum (max)\u003C\u002Fstrong>: get the number with the highest value from an array of numbers.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>4\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Minimum (min)\u003C\u002Fstrong>: get the number with the lowest value from an array of numbers.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>1\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Increment (inc)\u003C\u002Fstrong>: add 1 to the number.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4\u003C\u002Fcode>   =&gt; Output = \u003Ccode>5\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[2, 3, 4, 5]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Decrement (dec)\u003C\u002Fstrong>: subtract 1 from the number.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4\u003C\u002Fcode>   =&gt; Output = \u003Ccode>3\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[0, 1, 2, 3]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Integer part (trunc)\u003C\u002Fstrong>: truncate (trunc) the number to the integer part.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4.6\u003C\u002Fcode>   =&gt; Output = \u003Ccode>4\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.3, 2.5, 3.7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[1, 2, 3]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Round upwards (ceil)\u003C\u002Fstrong>: round the number upwards (ceil) to the nearest integer.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4.6\u003C\u002Fcode>   =&gt; Output = \u003Ccode>5\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.3, 2.5, 3.7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[2, 3, 4]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Round downwards (floor)\u003C\u002Fstrong>: round the number downwards (floor) to the nearest integer.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4.6\u003C\u002Fcode>   =&gt; Output = \u003Ccode>4\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.3, 2.5, 3.7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[1, 2, 3]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Nearest integer (round)\u003C\u002Fstrong>: rounds the number to the nearest integer.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>4.6\u003C\u002Fcode>   =&gt; Output = \u003Ccode>5\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.3, 2.5, 3.7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[1, 3, 4]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Round decimal places (rdec)\u003C\u002Fstrong>: round the number at a specified number of decimal places (from an array of two numbers).\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.23456, 3]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[1.235]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Sum (sum)\u003C\u002Fstrong>: sum of the all the numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1, 2, 3, 4]\u003C\u002Fcode>   =&gt; 1 + 2 + 3 + 4  =&gt; Output = \u003Ccode>10\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Subtract (sub)\u003C\u002Fstrong>: subtraction of the all the numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 2, 1]\u003C\u002Fcode>   =&gt; 3 - 2 - 1 =&gt; Output = \u003Ccode>0\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Truncate decimal places (tdec)\u003C\u002Fstrong>: truncate the number at a specified number of decimal places (from an array of two numbers).\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[1.56789, 3]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[1.567]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Multiply (mult)\u003C\u002Fstrong>: multiply all the numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 2, 1]\u003C\u002Fcode>   =&gt; 3 * 2 * 1 =&gt; Output = \u003Ccode>6\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Divide (div)\u003C\u002Fstrong>: division of all the numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 2, 1]\u003C\u002Fcode>   =&gt; 3 : 2 : 1 =&gt; Output = \u003Ccode>1.5\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Modulus (mod)\u003C\u002Fstrong>: get the remainder of the division of the \u003Cem>two\u003C\u002Fem> numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 2]\u003C\u002Fcode>   =&gt; 3 % 2  =&gt; Output = \u003Ccode>1\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Absolute value (abs)\u003C\u002Fstrong>: absolute value (abs) of the number.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>-4\u003C\u002Fcode>   =&gt; Output = \u003Ccode>4\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[-3, -5, -7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[3, 5, 7]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Random (rand)\u003C\u002Fstrong>: a random number between 0 and 1.  The input value will not be checked, since it is not required to calculate the output value.  When the input is an array of N length, then the output will also be an array containing N random numbers.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>x\u003C\u002Fcode>   =&gt; Output = \u003Ccode>0.xxxxx\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[x, x, x]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[0.xxxxx, 0.xxxxx, 0.xxxxx]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Random between min and max (randb)\u003C\u002Fstrong>: a random number between a minimum value and a maximum value, which both need to be specified in the input array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 8]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>3\u003C\u002Fcode> or \u003Ccode>4\u003C\u002Fcode> or \u003Ccode>5\u003C\u002Fcode> or \u003Ccode>6\u003C\u002Fcode> or \u003Ccode>7\u003C\u002Fcode> or \u003Ccode>8\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Random from array (randa)\u003C\u002Fstrong>: a random number picked from an array of possible values.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[3, 5, 8]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>3\u003C\u002Fcode> or \u003Ccode>5\u003C\u002Fcode> or \u003Ccode>8\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Length of array (len)\u003C\u002Fstrong>: the length of the input array.  The input values will not be checked, since it is not required that the array only contains numbers.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[7, \"text\", true, 8]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>4\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Sort ascending (sorta)\u003C\u002Fstrong>: sort the input array (containing numbers) ascending, i.e. from low to high.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[9, 8, 7]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[7, 8, 9]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Sort descending (sortd)\u003C\u002Fstrong>: sort the input array (containing numbers) descending, i.e. from high to low.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[7, 8, 9]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[9, 8, 7]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Create range (range)\u003C\u002Fstrong>: create an array of numbers, between the two numbers (minimum and maximum) in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[2, 8]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[2, 3, 4, 5, 6, 7, 8]\u003C\u002Fcode>\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[2.1, 8.6]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>[2.1, 3.2, 4.2, 5.2, 6.2, 7.2, 8.2]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Get distance (dist)\u003C\u002Fstrong>: get the distance between the numbers in the array, i.e. the range between the maximum and minimum number.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[2, 9, 1, 8, 3]\u003C\u002Fcode>   =&gt; Output = \u003Ccode>8\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>X to the power of y (pow)\u003C\u002Fstrong>: x\u003Csup>y\u003C\u002Fsup> from an array of two numbers.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[2, 3]\u003C\u002Fcode>   =&gt; 2\u003Csup>3\u003C\u002Fsup>  =&gt; Output = \u003Ccode>8\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>E to the power of x (exp)\u003C\u002Fstrong>: value of E\u003Csup>x\u003C\u002Fsup>, where E is Euler's number (approximately 2.7183).\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Cubic root (cbrt)\u003C\u002Fstrong>: cubic root (x\u003Csup>3\u003C\u002Fsup>) of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Natural logarithm (log)\u003C\u002Fstrong>: natural logarithm base E of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Logarithm (log10)\u003C\u002Fstrong>: logarithm base 10 of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Arccosine (acos)\u003C\u002Fstrong>: arccosine (acos) value of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic arccosine (acosh)\u003C\u002Fstrong>: hyperbolic arccosine of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Arcsine (asin)\u003C\u002Fstrong>: arcsine of the number in radians.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic arcsine (asinh)\u003C\u002Fstrong>: hyperbolic arcsine of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Arctangent (atan)\u003C\u002Fstrong>: arctangent of the number, as a numeric value between -PI\u002F2 and PI\u002F2 radians.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic arctangent (atanh)\u003C\u002Fstrong>: hyperbolic arctangent of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Cosine (cos)\u003C\u002Fstrong>: cosine of the number in radians.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic cosine (cosh)\u003C\u002Fstrong>: hyperbolic cosine of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Sine (sin)\u003C\u002Fstrong>: sine of the number in radians.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic sine (sinh)\u003C\u002Fstrong>: hyperbolic sine of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Square root (sqrt)\u003C\u002Fstrong>: square root of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Tangent (tan)\u003C\u002Fstrong>: tangent of an angle.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Hyperbolic tangent (tanh)\u003C\u002Fstrong>: hyperbolic tangent of the number.\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"message-based-operation\">\u003Ca class=\"header-anchor\" href=\"#message-based-operation\">Message based operation\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When no operation is specified in the config screen, the operation needs to be specifiedin the \u003Ccode>msg.operation\u003C\u002Fcode> field of the input message.  In the above list of available operations, the operation code is specified between angle brackets.\u003C\u002Fp>\n\u003Cp>For example to calculate the 'Cubic root' of a number, the \u003Ccode>msg.operation\u003C\u002Fcode> field should contain value \u003Ccode>cbrt\u003C\u002Fcode>.\u003C\u002Fp>\n\u003Ch2 id=\"optional-constant-values\">\u003Ca class=\"header-anchor\" href=\"#optional-constant-values\">(Optional) constant values\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>Almost all operations allow an optional constant to be used:\u003C\u002Fp>\n\u003Cp>\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fbartbutenaers\u002Fnode-red-contrib-calc\u002Fmaster\u002Fimages\u002Fcalc_constant.png\" alt=\"Constant field\" \u002F>\u003C\u002Fp>\n\u003Cp>When a number is entered in this field, it \u003Cem>will automatically be added at the \u003Cstrong>end\u003C\u002Fstrong> of the input array\u003C\u002Fem>. When the input is a number, this node will convert it automatically to an array (containing both the number and the constant value).\u003C\u002Fp>\n\u003Cp>Some examples with constant value \u003Ccode>3\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\n\u003Cp>\u003Cstrong>Round constant number of decimal places\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>1.23456\u003C\u002Fcode>   =&gt;   Internal = \u003Ccode>[1.23456, 3]\u003C\u002Fcode>   =&gt;   Output = \u003Ccode>[1.234]\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>X to a constant power\u003C\u002Fstrong>:\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>2\u003C\u002Fcode>   =&gt;   Internal = \u003Ccode>[2, 3]\u003C\u002Fcode>   =&gt;   Output = \u003Ccode>8\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003Cli>\n\u003Cp>\u003Cstrong>Sum (sum)\u003C\u002Fstrong>: sum of the all the numbers in the array.\u003C\u002Fp>\n\u003Cp>Input = \u003Ccode>[7, 2, 5]\u003C\u002Fcode>   =&gt;   Internal = \u003Ccode>[7, 2, 5, 3]\u003C\u002Fcode>   =&gt;   Output = \u003Ccode>17\u003C\u002Fcode>\u003C\u002Fp>\n\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"round-result-to-decimals\">\u003Ca class=\"header-anchor\" href=\"#round-result-to-decimals\">Round result to ... decimals\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When selected, the output number(s) will be rounded to the specified number of decimals.  This rounding can be applied to the result of any selected operation.\nNote that the \u003Cem>\"Round decimal places\"\u003C\u002Fem> operation can be used instead, when it is only required to round the numeric values in the input message.\u003C\u002Fp>\n\u003Ch2 id=\"truncate-result-to-decimals\">\u003Ca class=\"header-anchor\" href=\"#truncate-result-to-decimals\">Truncate result to ... decimals:\u003C\u002Fa>\u003C\u002Fh2>\n\u003Cp>When selected, the output number(s) will be truncated to the specified number of decimals.  This truncating can be applied to the result of any selected operation.\nNote that the \u003Cem>\"Truncate decimal places\"\u003C\u002Fem> operation can be used instead, when it is only required to truncate the numeric values in the input message.\u003C\u002Fp>\n",1784738654191]