Numbers in langur are decimal floating point. Langur uses Mike Cowlishaw's decimal C library, via the Go wrapper library github.com/rin01/decnum. Conceivably, it should be possible to use the DFPAL library in the same manner.

number literals

Numbers in base 10 may be specified without qualification, such as 100 or 123.456.

Number literals may use underscores for visual clarity (such as 3_000_000), but cannot start with an underscore.

E-notation may be used, but always requires a + or - after the e.

Rounding defaults to round-half-even. Later revisions will likely allow you to specify a different rounding mode.

number literals with basex notation

Numbers may use basex notation, such as 16xFF or 2x1010_0010 or -4x123.

Any base from 2 to 36 may be used, using the ASCII alphabet for digits higher than 9.

At this time, basex notation is only available for integers.

math operators

+ add
- subtract
x multiply
/ divide
\ integer divide
// remainder (not "modulus")
^ exponent (right-associative)
^/ root (right-associative)

Also see the operators page.

constants

The following constants are available by using the keyword.

pi Archimedes' constant
phi the Golden Ratio
e Euler's number
n2 natural logarithm of 2
n10 natural logarithm of 10

So, to calculate the circumference of a circle with radius of 7, you could use the following.

2 x pi x 7 # result == 43.98229715025710533847700736591304