cuelang.org/go@v0.10.1/pkg/math/testdata/gen.txtar (about) 1 # generated from the original tests. 2 # Henceforth it may be nicer to group tests into separate files. 3 -- in.cue -- 4 import "math" 5 6 t2: math.Floor(math.Pi) 7 t3: math.Pi(3) 8 t6: math.Jacobi(1000, 2000) 9 t7: math.Jacobi(1000, 201) 10 t8: math.Asin(2.0e400) 11 t16: math.Pow(8, 4) 12 t17: math.Pow10(4) 13 t18: math.Signbit(-4) 14 t23: math.Abs(2.5) 15 t24: math.Abs(-2.2) 16 t25: math.Cbrt(2) 17 t26: math.Copysign(5, -2.2) 18 t27: math.Exp(3) 19 t28: math.Exp2(3.5) 20 t29: math.Log(4) 21 t30: math.Log10(4) 22 t31: math.Log2(5) 23 t32: math.Dim(3, 2.5) 24 t33: math.Dim(5, 7.2) 25 -- out/math -- 26 Errors: 27 t3: cannot call non-function math.Pi (type float): 28 ./in.cue:4:6 29 t6: error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000: 30 ./in.cue:5:6 31 t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up: 32 ./in.cue:7:6 33 ./in.cue:7:16 34 35 Result: 36 t2: 3 37 t3: _|_ // t3: cannot call non-function math.Pi (type float) 38 t6: _|_ // t6: error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000 39 t7: 1 40 t8: _|_ // t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up 41 t16: 4096 42 t17: 10000 43 t18: true 44 t23: 2.5 45 t24: 2.2 46 t25: 1.259921049894873164767210607278228 47 t26: -5 48 t27: 20.08553692318766774092852965458172 49 t28: 11.31370849898476039041350979367758 50 t29: 1.386294361119890618834464242916353 51 t30: 0.6020599913279623904274777894489861 52 t31: 2.321928094887362347870319429489391 53 t32: 0.5 54 t33: 0