1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#testmode:repl
# Tests for float, including float constuctor
float(10)
(f = float("12.5"))
float("12.34.5")
float((1, 2))
# variable with method
f.ceil
f.trunc
f.fract
# value with method
12.5.ceil
12.5.trunc
12.5.fract
# Representation and conversion
f = 1337.
f
repr(f)
str(f)
int(f)
#---
#10.0
#12.5
#0.0
#ERR:Line 1, column 1: `list` cannot be converted to float
#13.0
#12.0
#0.5
#13.0
#12.0
#0.5
#1337.0
#"1337.0"
#"1337"
#1337