Exponential · exp
---
config:
flowchart:
useMaxWidth: false
---
flowchart TB
classDef ok fill:#d4edda,stroke:#28a745,color:#000
classDef partial fill:#fff3cd,stroke:#ffc107,color:#000
classDef refused fill:#d4edda,stroke:#28a745,stroke-width:3px,stroke-dasharray: 2 2,color:#000
classDef missing fill:#f8d7da,stroke:#dc3545,color:#000
classDef diverge fill:#cce5ff,stroke:#007bff,color:#000
classDef block fill:#2b3a4a,stroke:#2b3a4a,color:#fff,font-weight:bold
classDef ext fill:#fff,stroke:#666,color:#000,stroke-dasharray: 5 5
O["Exponential · exp<br/>🟢3"]:::ok
subgraph G_ds["Dataset"]
direction LR
v_ds["exp(DS)"]:::ok
end
subgraph G_comp["Component"]
direction LR
v_comp["exp(comp)"]:::ok
end
subgraph G_sc["Scalar"]
direction LR
v_sc["exp(sc)"]:::ok
end
O --- G_ds
O --- G_comp
O --- G_sc
style G_ds fill:#f8f9fa,stroke:#495057,stroke-width:2px
style G_comp fill:#f8f9fa,stroke:#495057,stroke-width:2px,stroke-dasharray: 8 5
style G_sc fill:#f8f9fa,stroke:#495057,stroke-width:2px,stroke-dasharray: 2 3
click v_ds href "#form-ds"
click v_comp href "#form-comp"
click v_sc href "#form-sc"
Types
Takes number · Gives number
Comes from · number — 44 operators in 6 blocks 🟢44
General purpose operators (2) 🟢2
String operators (3) 🟢3
Numeric operators (17) 🟢17
Time operators (9) 🟢9
Aggregate and Analytic operators (10) 🟢10
Data validation operators (3) 🟢3
Comes from · operators that return any type (their input's) — 37 operators in 8 blocks 🟢37
General purpose operators (5) 🟢5
Join operators (4) 🟢4
Time operators (3) 🟢3
Set operators (4) 🟢4
Hierarchical aggregation (1) 🟢1
Aggregate and Analytic operators (8) 🟢8
Conditional operators (3) 🟢3
Goes to · number — 33 operators in 7 blocks 🟢33
General purpose operators (1) 🟢1
Numeric operators (17) 🟢17
Time operators (2) 🟢2
Hierarchical aggregation (1) 🟢1
Aggregate and Analytic operators (8) 🟢8
Data validation operators (2) 🟢2
Definitions (VTL-DL) (2) 🟢2
Goes to · operators that take any scalar — 48 operators in 8 blocks 🟢48
General purpose operators (6) 🟢6
Join operators (4) 🟢4
Comparison operators (11) 🟢11
Set operators (4) 🟢4
Aggregate and Analytic operators (10) 🟢10
Data validation operators (1) 🟢1
Conditional operators (3) 🟢3
Forms
exp(DS) 🟢 · number → number
Manual example 1 🟢 pandas ✅ · DuckDB ✅
- Tests:
expon every measure ofDS_1, which has an Integer and a Number measure.- Manual:
Exponential, Example 1, output verbatim: “The operator exp returns e (base of the natural logarithm) raised to the op-th power.”
- Expected:
Me_15, 8 and 2 give 148.413, 2980.95 and 7.38905;Me_20.7545, 13.45 and 1.87 give 2.126547, 693842.3 and 6.488296, as the page prints them, shortened.
DS_r := exp(DS_1);
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 5 | 0.7545 |
| 10 | B | 8 | 13.45 |
| 11 | A | 2 | 1.87 |
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 148.413 | 2.126547 |
| 10 | B | 2980.95 | 693842.3 |
| 11 | A | 7.38905 | 6.488296 |
Files: script.vtl · input/DS_1.csv · input/DS_1.json · expected/DS_r.csv · expected/DS_r.json · example page ↗
exp(comp) 🟢 · number → number
Manual example 2 🟢 pandas ✅ · DuckDB ✅
- Tests:
expon a component insidecalc, where the result replaces the measureMe_1.- Manual:
Exponential, Example 2, output verbatim: “The operator exp returns e (base of the natural logarithm) raised to the op-th power.”
- Expected:
Me_1 = exp(Me_1)is 148.4131591025766, 2980.9579870417283 and 7.38905609893065;Me_2is unchanged.
DS_r := DS_1 [ calc Me_1 := exp ( Me_1 ) ];
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 5 | 0.7545 |
| 10 | B | 8 | 13.45 |
| 11 | A | 2 | 1.87 |
| Id_1 | Id_2 | Me_1 | Me_2 |
|---|---|---|---|
| 10 | A | 148.4131591025766 | 0.7545 |
| 10 | B | 2980.9579870417283 | 13.45 |
| 11 | A | 7.38905609893065 | 1.87 |
Files: script.vtl · input/DS_1.csv · input/DS_1.json · expected/DS_r.csv · expected/DS_r.json · example page ↗
exp(sc) 🟢 · number → number
Integer operand 🟢 pandas ✅ · DuckDB ✅
- Tests:
expof an integer:exp(SC_1)withSC_1= 5.- Manual:
Exponential: “
exp ( 5 )gives148.41315...”.- Expected:
SC_r = 148.413159, written to six decimals (e^5 = 148.4131591025766...), a Number although the operand is an Integer.
SC_r := exp(SC_1);
| SC_1 |
|---|
| 5 |
Name |
Type |
Value |
|---|---|---|
|
Number |
|
Files: script.vtl · input/scalars.csv · input/scalars.json · expected/scalars.json · example page ↗