fable 3.1.51 → 3.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/README.md +87 -2
  2. package/dist/fable.js +7 -5
  3. package/dist/fable.js.map +1 -1
  4. package/dist/fable.min.js +1 -1
  5. package/dist/fable.min.js.map +1 -1
  6. package/docs/.nojekyll +0 -0
  7. package/docs/README.md +95 -0
  8. package/docs/_sidebar.md +42 -0
  9. package/docs/architecture.md +326 -0
  10. package/docs/cover.md +11 -0
  11. package/docs/index.html +51 -0
  12. package/docs/services/README.md +76 -0
  13. package/docs/services/anticipate.md +331 -0
  14. package/docs/services/csv-parser.md +152 -0
  15. package/docs/services/data-format.md +277 -0
  16. package/docs/services/data-generation.md +142 -0
  17. package/docs/services/dates.md +216 -0
  18. package/docs/services/environment-data.md +44 -0
  19. package/docs/services/expression-parser-functions/README.md +178 -0
  20. package/docs/services/expression-parser-functions/abs.md +84 -0
  21. package/docs/services/expression-parser-functions/aggregationhistogram.md +83 -0
  22. package/docs/services/expression-parser-functions/aggregationhistogrambyobject.md +64 -0
  23. package/docs/services/expression-parser-functions/arrayconcat.md +64 -0
  24. package/docs/services/expression-parser-functions/avg.md +81 -0
  25. package/docs/services/expression-parser-functions/bucketset.md +69 -0
  26. package/docs/services/expression-parser-functions/ceil.md +70 -0
  27. package/docs/services/expression-parser-functions/cleanvaluearray.md +66 -0
  28. package/docs/services/expression-parser-functions/cleanvalueobject.md +68 -0
  29. package/docs/services/expression-parser-functions/compare.md +72 -0
  30. package/docs/services/expression-parser-functions/concat.md +73 -0
  31. package/docs/services/expression-parser-functions/concatraw.md +73 -0
  32. package/docs/services/expression-parser-functions/cos.md +75 -0
  33. package/docs/services/expression-parser-functions/count.md +73 -0
  34. package/docs/services/expression-parser-functions/countset.md +65 -0
  35. package/docs/services/expression-parser-functions/countsetelements.md +63 -0
  36. package/docs/services/expression-parser-functions/createarrayfromabsolutevalues.md +63 -0
  37. package/docs/services/expression-parser-functions/createvalueobjectbyhashes.md +69 -0
  38. package/docs/services/expression-parser-functions/cumulativesummation.md +96 -0
  39. package/docs/services/expression-parser-functions/dateadddays.md +79 -0
  40. package/docs/services/expression-parser-functions/dateaddhours.md +74 -0
  41. package/docs/services/expression-parser-functions/dateaddmilliseconds.md +65 -0
  42. package/docs/services/expression-parser-functions/dateaddminutes.md +72 -0
  43. package/docs/services/expression-parser-functions/dateaddmonths.md +74 -0
  44. package/docs/services/expression-parser-functions/dateaddseconds.md +66 -0
  45. package/docs/services/expression-parser-functions/dateaddweeks.md +73 -0
  46. package/docs/services/expression-parser-functions/dateaddyears.md +74 -0
  47. package/docs/services/expression-parser-functions/datedaydifference.md +84 -0
  48. package/docs/services/expression-parser-functions/datefromparts.md +81 -0
  49. package/docs/services/expression-parser-functions/datehourdifference.md +64 -0
  50. package/docs/services/expression-parser-functions/datemathadd.md +72 -0
  51. package/docs/services/expression-parser-functions/datemilliseconddifference.md +64 -0
  52. package/docs/services/expression-parser-functions/dateminutedifference.md +64 -0
  53. package/docs/services/expression-parser-functions/datemonthdifference.md +66 -0
  54. package/docs/services/expression-parser-functions/dateseconddifference.md +64 -0
  55. package/docs/services/expression-parser-functions/dateweekdifference.md +65 -0
  56. package/docs/services/expression-parser-functions/dateyeardifference.md +64 -0
  57. package/docs/services/expression-parser-functions/distributionhistogram.md +96 -0
  58. package/docs/services/expression-parser-functions/distributionhistogrambyobject.md +64 -0
  59. package/docs/services/expression-parser-functions/entryinset.md +72 -0
  60. package/docs/services/expression-parser-functions/euler.md +77 -0
  61. package/docs/services/expression-parser-functions/exp.md +74 -0
  62. package/docs/services/expression-parser-functions/findfirstvaluebyexactmatch.md +67 -0
  63. package/docs/services/expression-parser-functions/findfirstvaluebystringincludes.md +67 -0
  64. package/docs/services/expression-parser-functions/flatten.md +76 -0
  65. package/docs/services/expression-parser-functions/floor.md +70 -0
  66. package/docs/services/expression-parser-functions/gaussianelimination.md +75 -0
  67. package/docs/services/expression-parser-functions/generatearrayofobjectsfromsets.md +70 -0
  68. package/docs/services/expression-parser-functions/getvalue.md +90 -0
  69. package/docs/services/expression-parser-functions/getvaluearray.md +64 -0
  70. package/docs/services/expression-parser-functions/getvalueobject.md +67 -0
  71. package/docs/services/expression-parser-functions/if.md +109 -0
  72. package/docs/services/expression-parser-functions/iterativeseries.md +107 -0
  73. package/docs/services/expression-parser-functions/join.md +75 -0
  74. package/docs/services/expression-parser-functions/joinraw.md +64 -0
  75. package/docs/services/expression-parser-functions/largestinset.md +63 -0
  76. package/docs/services/expression-parser-functions/leastsquares.md +66 -0
  77. package/docs/services/expression-parser-functions/linest.md +58 -0
  78. package/docs/services/expression-parser-functions/log.md +74 -0
  79. package/docs/services/expression-parser-functions/match.md +71 -0
  80. package/docs/services/expression-parser-functions/matrixinverse.md +67 -0
  81. package/docs/services/expression-parser-functions/matrixmultiply.md +71 -0
  82. package/docs/services/expression-parser-functions/matrixtranspose.md +72 -0
  83. package/docs/services/expression-parser-functions/matrixvectormultiply.md +69 -0
  84. package/docs/services/expression-parser-functions/max.md +73 -0
  85. package/docs/services/expression-parser-functions/mean.md +63 -0
  86. package/docs/services/expression-parser-functions/median.md +79 -0
  87. package/docs/services/expression-parser-functions/min.md +73 -0
  88. package/docs/services/expression-parser-functions/mode.md +66 -0
  89. package/docs/services/expression-parser-functions/objectkeystoarray.md +66 -0
  90. package/docs/services/expression-parser-functions/objectvaluessortbyexternalobjectarray.md +65 -0
  91. package/docs/services/expression-parser-functions/objectvaluestoarray.md +67 -0
  92. package/docs/services/expression-parser-functions/percent.md +75 -0
  93. package/docs/services/expression-parser-functions/pi.md +77 -0
  94. package/docs/services/expression-parser-functions/polynomialregression.md +69 -0
  95. package/docs/services/expression-parser-functions/predict.md +71 -0
  96. package/docs/services/expression-parser-functions/rad.md +85 -0
  97. package/docs/services/expression-parser-functions/randomfloat.md +63 -0
  98. package/docs/services/expression-parser-functions/randomfloatbetween.md +72 -0
  99. package/docs/services/expression-parser-functions/randomfloatupto.md +65 -0
  100. package/docs/services/expression-parser-functions/randominteger.md +56 -0
  101. package/docs/services/expression-parser-functions/randomintegerbetween.md +72 -0
  102. package/docs/services/expression-parser-functions/randomintegerupto.md +64 -0
  103. package/docs/services/expression-parser-functions/resolvehtmlentities.md +64 -0
  104. package/docs/services/expression-parser-functions/round.md +111 -0
  105. package/docs/services/expression-parser-functions/setconcatenate.md +64 -0
  106. package/docs/services/expression-parser-functions/sin.md +83 -0
  107. package/docs/services/expression-parser-functions/slice.md +80 -0
  108. package/docs/services/expression-parser-functions/smallestinset.md +63 -0
  109. package/docs/services/expression-parser-functions/sorthistogram.md +70 -0
  110. package/docs/services/expression-parser-functions/sorthistogrambykeys.md +69 -0
  111. package/docs/services/expression-parser-functions/sortset.md +75 -0
  112. package/docs/services/expression-parser-functions/sqrt.md +85 -0
  113. package/docs/services/expression-parser-functions/stdev.md +81 -0
  114. package/docs/services/expression-parser-functions/stdeva.md +58 -0
  115. package/docs/services/expression-parser-functions/stdevp.md +83 -0
  116. package/docs/services/expression-parser-functions/stringcountsegments.md +66 -0
  117. package/docs/services/expression-parser-functions/stringgetsegments.md +74 -0
  118. package/docs/services/expression-parser-functions/subtractingsummation.md +66 -0
  119. package/docs/services/expression-parser-functions/sum.md +78 -0
  120. package/docs/services/expression-parser-functions/tan.md +78 -0
  121. package/docs/services/expression-parser-functions/tofixed.md +75 -0
  122. package/docs/services/expression-parser-functions/var.md +67 -0
  123. package/docs/services/expression-parser-functions/vara.md +58 -0
  124. package/docs/services/expression-parser-functions/varp.md +66 -0
  125. package/docs/services/expression-parser-functions/when.md +98 -0
  126. package/docs/services/expression-parser.md +314 -0
  127. package/docs/services/file-persistence.md +279 -0
  128. package/docs/services/logging.md +237 -0
  129. package/docs/services/logic.md +166 -0
  130. package/docs/services/manifest.md +256 -0
  131. package/docs/services/math.md +279 -0
  132. package/docs/services/meta-template.md +268 -0
  133. package/docs/services/object-cache.md +171 -0
  134. package/docs/services/operation.md +207 -0
  135. package/docs/services/progress-time.md +167 -0
  136. package/docs/services/progress-tracker-set.md +222 -0
  137. package/docs/services/rest-client.md +296 -0
  138. package/docs/services/settings-manager.md +265 -0
  139. package/docs/services/template.md +233 -0
  140. package/docs/services/utility.md +304 -0
  141. package/docs/services/uuid.md +162 -0
  142. package/package.json +1 -1
  143. package/source/services/Fable-Service-DataFormat.js +1 -0
  144. package/source/services/Fable-Service-ExpressionParser/Fable-Service-ExpressionParser-ValueMarshal.js +6 -4
  145. package/test/ExpressionParser_tests.js +3 -0
@@ -0,0 +1,85 @@
1
+ # sqrt
2
+
3
+ Calculates the square root of a number with arbitrary precision.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sqrt(value)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `value` | Number/String | The value to calculate the square root of |
16
+
17
+ ## Returns
18
+
19
+ String - The square root of the input value with arbitrary precision.
20
+
21
+ ## Description
22
+
23
+ The `sqrt` function computes the square root of a numeric value. It uses arbitrary precision arithmetic, so results are accurate for very large or very precise numbers.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = sqrt(16)
31
+ // Result: "4"
32
+
33
+ Result = sqrt(2)
34
+ // Result: "1.41421356237309504880168872420969807856967187537694..."
35
+
36
+ Result = sqrt(100)
37
+ // Result: "10"
38
+ ```
39
+
40
+ ### In Complex Expressions
41
+
42
+ ```expression
43
+ // Pythagorean theorem: c = sqrt(a² + b²)
44
+ Hypotenuse = sqrt(X^2 + Y^2)
45
+ // With X=3, Y=4: Result: "5"
46
+
47
+ // Distance formula
48
+ Distance = sqrt((X2 - X1)^2 + (Y2 - Y1)^2)
49
+ ```
50
+
51
+ ### With Variables
52
+
53
+ ```expression
54
+ Result = sqrt(100 * (C + 30)) + sin(Depth - Width) / 10
55
+ // With C=-13, Depth=100.203, Width=10.5
56
+ // Result: "41.32965489638783839821"
57
+ ```
58
+
59
+ ### Nested in Other Functions
60
+
61
+ ```expression
62
+ Result = 1.5 * sqrt(8 * 2.423782342^2) / 10
63
+ // Result: "1.02832375808904701855"
64
+
65
+ Result = 1 * sqrt(16)
66
+ // Result: "4"
67
+ ```
68
+
69
+ ## Use Cases
70
+
71
+ - **Geometry calculations**: Computing diagonals, distances, and hypotenuses
72
+ - **Statistical analysis**: Used in standard deviation calculations
73
+ - **Physics formulas**: Many physics equations involve square roots
74
+ - **Financial calculations**: Volatility and other risk metrics
75
+
76
+ ## Related Functions
77
+
78
+ - [abs](./abs.md) - Absolute value
79
+ - [pow](./pow.md) - Power/exponentiation (use `^` operator)
80
+
81
+ ## Notes
82
+
83
+ - Returns arbitrary precision results as strings
84
+ - Input can be a number or a numeric string
85
+ - Works with the Math service's `sqrtPrecise` method internally
@@ -0,0 +1,81 @@
1
+ # stdev / stdeva
2
+
3
+ Calculates the sample standard deviation of a set of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdev(array)
9
+ stdeva(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | An array of numeric values |
17
+
18
+ ## Returns
19
+
20
+ String - The sample standard deviation.
21
+
22
+ ## Description
23
+
24
+ The `stdev` and `stdeva` functions calculate the sample standard deviation, which measures how spread out the values are from the mean. Sample standard deviation divides by (n-1) rather than n, providing an unbiased estimate when working with a sample of a larger population.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ StDev = STDEV(Values)
32
+ // With Values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
33
+ // Result: approximately "3.3166"
34
+ ```
35
+
36
+ ### Financial Risk Analysis
37
+
38
+ ```expression
39
+ // Calculate volatility of returns
40
+ Volatility = STDEV(DailyReturns)
41
+ ```
42
+
43
+ ### Quality Control
44
+
45
+ ```expression
46
+ // Measure variation in measurements
47
+ ProcessVariation = STDEV(Measurements)
48
+ ```
49
+
50
+ ## Formula
51
+
52
+ Sample Standard Deviation (s):
53
+ ```
54
+ s = sqrt(Σ(xi - x̄)² / (n - 1))
55
+ ```
56
+
57
+ Where:
58
+ - xi = each value
59
+ - x̄ = mean of all values
60
+ - n = number of values
61
+
62
+ ## Use Cases
63
+
64
+ - **Finance**: Measuring volatility and risk
65
+ - **Quality control**: Process variation analysis
66
+ - **Research**: Data variability measurement
67
+ - **Statistics**: Confidence intervals, hypothesis testing
68
+
69
+ ## Related Functions
70
+
71
+ - [stdevp](./stdevp.md) - Population standard deviation
72
+ - [var](./var.md) - Sample variance
73
+ - [varp](./varp.md) - Population variance
74
+ - [avg](./avg.md) / [mean](./mean.md) - Average
75
+
76
+ ## Notes
77
+
78
+ - `stdev` and `stdeva` are aliases
79
+ - Uses (n-1) in denominator (Bessel's correction)
80
+ - For population data, use [stdevp](./stdevp.md) instead
81
+ - Works with the Math service's `standardDeviationPrecise` method
@@ -0,0 +1,58 @@
1
+ # stdeva
2
+
3
+ Calculates standard deviation including text and boolean values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdeva(value1, value2, ...)
9
+ stdeva(array)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `values` | Any | Values including numbers, text, and booleans |
17
+
18
+ ## Returns
19
+
20
+ String - The standard deviation including converted text/boolean values.
21
+
22
+ ## Description
23
+
24
+ The `stdeva` function calculates sample standard deviation while treating text as 0 and boolean TRUE as 1, FALSE as 0. This is similar to Excel's STDEVA function.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STDEVA(1, 2, true, false, "text")
32
+ // Text = 0, true = 1, false = 0
33
+ ```
34
+
35
+ ### With Mixed Data
36
+
37
+ ```expression
38
+ StdDev = STDEVA(MixedDataArray)
39
+ ```
40
+
41
+ ## Use Cases
42
+
43
+ - **Mixed data**: Standard deviation with non-numeric values
44
+ - **Spreadsheet compatibility**: Excel-like behavior
45
+ - **Survey data**: Handle mixed responses
46
+
47
+ ## Related Functions
48
+
49
+ - [stdev](./stdev.md) - Numeric-only standard deviation
50
+ - [stdevp](./stdevp.md) - Population standard deviation
51
+ - [vara](./vara.md) - Variance with text/boolean
52
+
53
+ ## Notes
54
+
55
+ - Text values treated as 0
56
+ - TRUE = 1, FALSE = 0
57
+ - Uses sample formula (n-1)
58
+ - Uses the Math service's `stdevaPrecise` method
@@ -0,0 +1,83 @@
1
+ # stdevp
2
+
3
+ Calculates the population standard deviation of a set of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stdevp(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | An array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ String - The population standard deviation.
20
+
21
+ ## Description
22
+
23
+ The `stdevp` function calculates the population standard deviation, which measures how spread out the values are from the mean. Population standard deviation divides by n (not n-1), and is used when you have data for the entire population, not just a sample.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ StDevP = STDEVP(Values)
31
+ // With Values = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
32
+ // Result: approximately "3.1623"
33
+ ```
34
+
35
+ ### Comparing Sample vs Population
36
+
37
+ ```expression
38
+ // Sample standard deviation (divides by n-1)
39
+ SampleStDev = STDEV(Values) // ≈ 3.3166
40
+
41
+ // Population standard deviation (divides by n)
42
+ PopStDev = STDEVP(Values) // ≈ 3.1623
43
+ ```
44
+
45
+ ## Formula
46
+
47
+ Population Standard Deviation (σ):
48
+ ```
49
+ σ = sqrt(Σ(xi - μ)² / n)
50
+ ```
51
+
52
+ Where:
53
+ - xi = each value
54
+ - μ = population mean
55
+ - n = population size
56
+
57
+ ## When to Use STDEVP vs STDEV
58
+
59
+ | Use STDEVP when... | Use STDEV when... |
60
+ |-------------------|-------------------|
61
+ | You have the entire population | You have a sample |
62
+ | Census data | Survey data |
63
+ | All possible outcomes | Subset of outcomes |
64
+
65
+ ## Use Cases
66
+
67
+ - **Census data**: When you have measurements from everyone
68
+ - **Theoretical analysis**: Known distributions
69
+ - **Complete datasets**: When no inference is needed
70
+
71
+ ## Related Functions
72
+
73
+ - [stdev](./stdev.md) - Sample standard deviation
74
+ - [var](./var.md) - Sample variance
75
+ - [varp](./varp.md) - Population variance
76
+ - [avg](./avg.md) / [mean](./mean.md) - Average
77
+
78
+ ## Notes
79
+
80
+ - Uses n in denominator (no Bessel's correction)
81
+ - Results are slightly smaller than sample standard deviation
82
+ - For sample data, use [stdev](./stdev.md) instead
83
+ - Works with the Math service's `populationStandardDeviationPrecise` method
@@ -0,0 +1,66 @@
1
+ # stringcountsegments
2
+
3
+ Counts the number of segments in a string when split by a delimiter.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stringcountsegments(text, delimiter)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `text` | String | The string to count segments in |
16
+ | `delimiter` | String | The delimiter to split by |
17
+
18
+ ## Returns
19
+
20
+ String - The number of segments.
21
+
22
+ ## Description
23
+
24
+ The `stringcountsegments` function splits a string by a delimiter and returns the count of resulting segments.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STRINGCOUNTSEGMENTS("a,b,c,d,e", ",")
32
+ // Result: "5"
33
+ ```
34
+
35
+ ### Path Segments
36
+
37
+ ```expression
38
+ PathDepth = STRINGCOUNTSEGMENTS("/home/user/documents", "/")
39
+ // Result: "4" (empty first segment + 3 folders)
40
+ ```
41
+
42
+ ### Word Count
43
+
44
+ ```expression
45
+ WordCount = STRINGCOUNTSEGMENTS("Hello World Everyone", " ")
46
+ // Result: "3"
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Validation**: Check expected number of parts
52
+ - **Path analysis**: Count path segments
53
+ - **Data parsing**: Validate delimited data
54
+ - **Text analysis**: Count words or phrases
55
+
56
+ ## Related Functions
57
+
58
+ - [stringgetsegments](./stringgetsegments.md) - Get the actual segments
59
+ - [concat](./concat.md) - Combine strings
60
+ - [join](./join.md) - Join with delimiter
61
+
62
+ ## Notes
63
+
64
+ - Returns count as string
65
+ - Empty string returns "1" (one empty segment)
66
+ - Uses the Utility service
@@ -0,0 +1,74 @@
1
+ # stringgetsegments
2
+
3
+ Splits a string into segments by a delimiter.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ stringgetsegments(text, delimiter)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `text` | String | The string to split |
16
+ | `delimiter` | String | The delimiter to split by |
17
+
18
+ ## Returns
19
+
20
+ Array - Array of string segments.
21
+
22
+ ## Description
23
+
24
+ The `stringgetsegments` function splits a string by a specified delimiter and returns an array of the resulting segments.
25
+
26
+ ## Examples
27
+
28
+ ### Basic Usage
29
+
30
+ ```expression
31
+ Result = STRINGGETSEGMENTS("a,b,c,d,e", ",")
32
+ // Result: ["a", "b", "c", "d", "e"]
33
+ ```
34
+
35
+ ### Path Parsing
36
+
37
+ ```expression
38
+ PathParts = STRINGGETSEGMENTS("/home/user/documents", "/")
39
+ // Result: ["", "home", "user", "documents"]
40
+ ```
41
+
42
+ ### Data Extraction
43
+
44
+ ```expression
45
+ Fields = STRINGGETSEGMENTS(CSVLine, ",")
46
+ // Returns array of field values
47
+ ```
48
+
49
+ ### Get Specific Segment
50
+
51
+ ```expression
52
+ // Get second segment
53
+ Segments = STRINGGETSEGMENTS(Data, ",")
54
+ SecondItem = Segments[1]
55
+ ```
56
+
57
+ ## Use Cases
58
+
59
+ - **CSV parsing**: Split delimited lines
60
+ - **Path processing**: Extract path components
61
+ - **Data parsing**: Split structured strings
62
+ - **Text processing**: Tokenize text
63
+
64
+ ## Related Functions
65
+
66
+ - [stringcountsegments](./stringcountsegments.md) - Count segments
67
+ - [join](./join.md) - Reverse operation (join segments)
68
+ - [slice](./slice.md) - Get subset of segments
69
+
70
+ ## Notes
71
+
72
+ - Returns array of strings
73
+ - Empty between delimiters creates empty string
74
+ - Uses the Utility service
@@ -0,0 +1,66 @@
1
+ # subtractingsummation
2
+
3
+ Generates a subtracting running total from an array of values.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ subtractingsummation(array)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `array` | Array | Array of numeric values |
16
+
17
+ ## Returns
18
+
19
+ Array - Array of running differences.
20
+
21
+ ## Description
22
+
23
+ The `subtractingsummation` function creates an array where each element is the result of subtracting subsequent values from a running total. This is the opposite of cumulative summation.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = SUBTRACTINGSUMMATION([100, 20, 30, 10])
31
+ // Result: [100, 80, 50, 40]
32
+ // 100, 100-20=80, 80-30=50, 50-10=40
33
+ ```
34
+
35
+ ### Budget Tracking
36
+
37
+ ```expression
38
+ // Start with budget, subtract expenses
39
+ RemainingBudget = SUBTRACTINGSUMMATION([1000, 250, 150, 75, 200])
40
+ // Shows remaining after each expense
41
+ ```
42
+
43
+ ### Inventory Depletion
44
+
45
+ ```expression
46
+ InventoryLevels = SUBTRACTINGSUMMATION([500, 50, 30, 100, 25])
47
+ ```
48
+
49
+ ## Use Cases
50
+
51
+ - **Budget tracking**: Remaining funds after expenses
52
+ - **Inventory**: Stock levels after withdrawals
53
+ - **Resource depletion**: Tracking consumption
54
+ - **Countdown**: Decreasing totals
55
+
56
+ ## Related Functions
57
+
58
+ - [cumulativesummation](./cumulativesummation.md) - Running total (adding)
59
+ - [sum](./sum.md) - Simple sum
60
+ - [iterativeseries](./iterativeseries.md) - Custom iterative calculation
61
+
62
+ ## Notes
63
+
64
+ - First element is starting value
65
+ - Each subsequent element subtracts from running total
66
+ - Uses the Math service's `subtractingSummation` method
@@ -0,0 +1,78 @@
1
+ # sum
2
+
3
+ Calculates the sum of all values in a set.
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ sum(array)
9
+ sum(value1, value2, ...)
10
+ ```
11
+
12
+ ## Parameters
13
+
14
+ | Parameter | Type | Description |
15
+ |-----------|------|-------------|
16
+ | `array` | Array | An array of numeric values |
17
+ | `values` | Numbers | Individual values to sum |
18
+
19
+ ## Returns
20
+
21
+ String - The sum of all values with arbitrary precision.
22
+
23
+ ## Description
24
+
25
+ The `sum` function adds up all numeric values in an array or set of arguments. It uses arbitrary precision arithmetic for accurate calculations.
26
+
27
+ ## Examples
28
+
29
+ ### Basic Array Sum
30
+
31
+ ```expression
32
+ TotalCost = SUM(ItemCosts)
33
+ // With ItemCosts = [100, 200, 50, 45, 5]
34
+ // Result: "400"
35
+ ```
36
+
37
+ ### Sum with Flattened Arrays
38
+
39
+ ```expression
40
+ // Sum population from nested data
41
+ PopSum = sum(flatten(AppData.Cities[].population))
42
+ // Sums all population values from the Cities array
43
+ ```
44
+
45
+ ### Sum of Histogram Values
46
+
47
+ ```expression
48
+ // Sum aggregated values
49
+ Total = SUM(FLATTEN(AppData.DestinationObject.AggregationResult))
50
+ ```
51
+
52
+ ### Combining with Other Functions
53
+
54
+ ```expression
55
+ // Sum a computed series
56
+ IntegratedSeries = SUM(FLATTEN(AppData.SeriesFromCoefficients))
57
+ ```
58
+
59
+ ## Use Cases
60
+
61
+ - **Financial totals**: Sum of transactions, costs, revenues
62
+ - **Inventory**: Total quantity of items
63
+ - **Statistics**: First step in many statistical calculations
64
+ - **Aggregation**: Combining values from multiple sources
65
+
66
+ ## Related Functions
67
+
68
+ - [avg](./avg.md) / [mean](./mean.md) - Calculate average
69
+ - [count](./count.md) - Count elements
70
+ - [min](./min.md) / [max](./max.md) - Find extremes
71
+ - [cumulativesummation](./cumulativesummation.md) - Running total
72
+
73
+ ## Notes
74
+
75
+ - Uses arbitrary precision arithmetic
76
+ - Returns "0" for empty arrays
77
+ - Non-numeric values may be treated as 0
78
+ - Works with the Math service's `sumPrecise` method
@@ -0,0 +1,78 @@
1
+ # tan
2
+
3
+ Calculates the tangent of an angle (in radians).
4
+
5
+ ## Syntax
6
+
7
+ ```
8
+ tan(radians)
9
+ ```
10
+
11
+ ## Parameters
12
+
13
+ | Parameter | Type | Description |
14
+ |-----------|------|-------------|
15
+ | `radians` | Number/String | The angle in radians |
16
+
17
+ ## Returns
18
+
19
+ String - The tangent of the angle.
20
+
21
+ ## Description
22
+
23
+ The `tan` function calculates the tangent of an angle, which equals sin(angle)/cos(angle). The input must be in radians. Use the `rad()` function to convert degrees to radians if needed.
24
+
25
+ ## Examples
26
+
27
+ ### Basic Usage
28
+
29
+ ```expression
30
+ Result = tan(0)
31
+ // Result: "0"
32
+
33
+ Result = tan(0.7853981633974483) // π/4 (45 degrees)
34
+ // Result: "1" (approximately)
35
+ ```
36
+
37
+ ### Converting from Degrees
38
+
39
+ ```expression
40
+ // Tangent of 45 degrees
41
+ Result = tan(rad(45))
42
+ // Result: "1"
43
+
44
+ // Tangent of 30 degrees
45
+ Result = tan(rad(30))
46
+ // Result: "0.5773502691896257"
47
+ ```
48
+
49
+ ### Slope Calculations
50
+
51
+ ```expression
52
+ // Calculate slope from angle
53
+ Slope = tan(rad(AngleDegrees))
54
+
55
+ // Rise over run
56
+ Rise = Run * tan(Angle)
57
+ ```
58
+
59
+ ## Use Cases
60
+
61
+ - **Trigonometry**: Slope and angle calculations
62
+ - **Surveying**: Elevation changes
63
+ - **Physics**: Incline problems
64
+ - **Graphics**: Perspective calculations
65
+
66
+ ## Related Functions
67
+
68
+ - [sin](./sin.md) - Sine
69
+ - [cos](./cos.md) - Cosine
70
+ - [rad](./rad.md) - Convert degrees to radians
71
+ - [pi](./pi.md) - Pi constant
72
+
73
+ ## Notes
74
+
75
+ - Input must be in radians, not degrees
76
+ - Use `rad(degrees)` to convert from degrees
77
+ - Tangent is undefined at 90°, 270°, etc. (π/2, 3π/2, ...)
78
+ - Uses JavaScript's `Math.tan()` internally