Ubidots Developer Guides
Help Center
API Reference
Data API
Community
Search…
Welcome to our Dev Guides
⚡️ Getting Started
What is Ubidots?
Devices, Variables, and Dots
Technical FAQs
Business FAQs
🧩
Integration Guides
Industrial IoT
Cellular
LoRaWAN
Sigfox
Dev Kits
Weather
Tools
🤖
UbiFunctions
Getting Started
Runtimes
Invocation
Advanced
Examples
Specs and Limits
📈
SYNTHETIC VARIABLES
Getting started
Native expressions
Specs and limits
Examples
Mathematical
Date range
Rolling
Special functions
Powered By
GitBook
Mathematical
x
x
x
and
y
y
y
represent variables as
time series or
dots
Syntax
Example
Output
c
e
i
l
(
x
)
ceil(x)
ce
i
l
(
x
)
c
e
i
l
(
[
1.2
,
2
,
3.7
]
)
ceil([1.2, 2, 3.7])
ce
i
l
([
1.2
,
2
,
3.7
])
[
2
,
2
,
4
]
[2,2,4]
[
2
,
2
,
4
]
r
o
u
n
d
(
x
,
n
)
round(x, n)
ro
u
n
d
(
x
,
n
)
r
o
u
n
d
(
[
1.22222
,
2.9994332
]
,
3
)
round([1.22222, 2.9994332], 3)
ro
u
n
d
([
1.22222
,
2.9994332
]
,
3
)
[
1.222
,
2.999
]
[1.222, 2.999]
[
1.222
,
2.999
]
s
i
n
(
x
)
sin(x)
s
in
(
x
)
s
i
n
(
[
0
,
90
]
)
sin([0, 90])
s
in
([
0
,
90
])
[
0
,
0.893
[0, 0.893
[
0
,
0.893
c
o
s
(
x
)
cos(x)
cos
(
x
)
c
o
s
(
[
0
,
90
]
)
cos([0, 90])
cos
([
0
,
90
])
[
1
,
−
0.448
]
[1, -0.448]
[
1
,
−
0.448
]
t
a
n
(
x
)
tan(x)
t
an
(
x
)
t
a
n
(
[
0
,
90
]
)
tan([0, 90])
t
an
([
0
,
90
])
[
0
,
−
1.995
]
[0, -1.995]
[
0
,
−
1.995
]
a
r
c
s
i
n
(
x
)
arcsin(x)
a
rcs
in
(
x
)
a
r
c
s
i
n
(
[
0
,
90
]
)
arcsin([0, 90])
a
rcs
in
([
0
,
90
])
[
0
]
[0]
[
0
]
a
r
c
c
o
s
(
x
)
arccos(x)
a
rccos
(
x
)
a
r
c
c
o
s
(
[
0
,
90
]
)
arccos([0, 90])
a
rccos
([
0
,
90
])
[
1.570
]
[1.570]
[
1.570
]
a
r
c
t
a
n
(
x
)
arctan(x)
a
rc
t
an
(
x
)
a
r
c
t
a
n
(
[
0
,
90
]
)
arctan([0, 90])
a
rc
t
an
([
0
,
90
])
[
0
]
[0]
[
0
]
a
r
c
t
a
n
2
(
x
,
y
)
arctan2(x, y)
a
rc
t
an
2
(
x
,
y
)
Assuming that the variables are sampled every minute.
a
r
c
t
a
n
2
(
[
1
,
2
]
,
[
0.1
,
1
]
)
arctan2([1, 2], [0.1, 1])
a
rc
t
an
2
([
1
,
2
]
,
[
0.1
,
1
])
[
1.471127
,
1.1071
]
[1.471127, 1.1071]
[
1.471127
,
1.1071
]
s
i
n
h
(
x
)
sinh(x)
s
inh
(
x
)
s
i
n
h
(
[
0
,
90
]
)
sinh([0, 90])
s
inh
([
0
,
90
])
[
0
,
6.1020
e
x
p
38
]
[0, 6.1020exp38]
[
0
,
6.1020
e
x
p
38
]
c
o
s
h
(
x
)
cosh(x)
cos
h
(
x
)
c
o
s
h
(
[
0
,
90
]
)
cosh([0, 90])
cos
h
([
0
,
90
])
[
1
,
6.1020
e
x
p
38
]
[1, 6.1020exp38]
[
1
,
6.1020
e
x
p
38
]
t
a
n
h
(
x
)
tanh(x)
t
anh
(
x
)
t
a
n
h
(
[
0
,
90
]
)
tanh([0, 90])
t
anh
([
0
,
90
])
[
0
,
1
]
[0, 1]
[
0
,
1
]
a
r
c
s
i
n
h
(
x
)
arcsinh(x)
a
rcs
inh
(
x
)
a
r
c
s
i
n
h
(
[
0
,
90
]
)
arcsinh([0, 90])
a
rcs
inh
([
0
,
90
])
[
0
,
5.19
]
[0, 5.19]
[
0
,
5.19
]
a
r
c
c
o
s
h
(
x
)
arccosh(x)
a
rccos
h
(
x
)
a
r
c
c
o
s
h
(
[
0
,
90
]
)
arccosh([0, 90])
a
rccos
h
([
0
,
90
])
[
5.192
]
[5.192]
[
5.192
]
a
r
c
t
a
n
h
(
x
)
arctanh(x)
a
rc
t
anh
(
x
)
a
r
c
t
a
n
h
(
[
0
,
90
]
)
arctanh([0, 90])
a
rc
t
anh
([
0
,
90
])
[
0
]
[0]
[
0
]
e
x
p
(
x
)
exp(x)
e
x
p
(
x
)
e
x
p
(
[
−
1
,
0
,
1
,
2
]
)
exp([-1, 0, 1, 2])
e
x
p
([
−
1
,
0
,
1
,
2
])
[
0.367
,
1.0
,
2.718
,
7.389
]
[0.367, 1.0, 2.718, 7.389]
[
0.367
,
1.0
,
2.718
,
7.389
]
l
o
g
(
x
,
b
a
s
e
)
log(x, base)
l
o
g
(
x
,
ba
se
)
l
o
g
(
[
1
,
2
]
)
log([1, 2])
l
o
g
([
1
,
2
])
[
0
,
0.693
]
[0, 0.693]
[
0
,
0.693
]
a
b
s
(
x
)
abs(x)
ab
s
(
x
)
a
b
s
(
[
−
1
,
0
,
1
,
2
]
)
abs([-1, 0, 1, 2])
ab
s
([
−
1
,
0
,
1
,
2
])
[
1
,
0
,
1
,
2
]
[1, 0, 1 ,2]
[
1
,
0
,
1
,
2
]
s
q
r
t
(
x
)
sqrt(x)
s
q
r
t
(
x
)
s
q
r
t
[
1
,
4
]
sqrt[1,4]
s
q
r
t
[
1
,
4
]
[
1
,
2
]
[1,2]
[
1
,
2
]
SYNTHETIC VARIABLES - Previous
Examples
Next
Date range
Last modified
2mo ago
Copy link