The Crow Programming Language

Numbers and conversion

1
2
3
4
5
6
7
8
9
10
11
12
13
log[abs[-3]]
log[sqrt[16.0]]
log[floor[2.7]]
log[ceil[2.1]]
log[round[2.5]]
log[min[3, 7]]
log[max[3, 7]]
log[type[42]]
log[type['x']]
log[type[[1, 2]]]
log[int['12'] + 1]
log[float['2.5'] * 2.0]
log[str[7]]

expected output — from the book, verified by crow test --book

3
4
2
3
3
3
7
int
str
array
13
5
7

Reference: spec section 11 (Math, Conversion).