github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/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 t1: math.Pi 7 t2: math.Floor(math.Pi) 8 t3: math.Pi(3) 9 t6: math.Jacobi(1000, 2000) 10 t7: math.Jacobi(1000, 201) 11 t8: math.Asin(2.0e400) 12 t16: math.Pow(8, 4) 13 t17: math.Pow10(4) 14 t18: math.Signbit(-4) 15 t23: math.Abs(2.5) 16 t24: math.Abs(-2.2) 17 t25: math.Cbrt(2) 18 t26: math.Copysign(5, -2.2) 19 t27: math.Exp(3) 20 t28: math.Exp2(3.5) 21 t29: math.Log(4) 22 t30: math.Log10(4) 23 t31: math.Log2(5) 24 t32: math.Dim(3, 2.5) 25 t33: math.Dim(5, 7.2) 26 -- out/math -- 27 Errors: 28 t3: cannot call non-function math.Pi (type float): 29 ./in.cue:5:6 30 error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000: 31 ./in.cue:6:6 32 t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up: 33 ./in.cue:8:6 34 ./in.cue:8:16 35 36 Result: 37 t1: 3.14159265358979323846264338327950288419716939937510582097494459 38 t2: 3 39 t3: _|_ // t3: cannot call non-function math.Pi (type float) 40 t6: _|_ // error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000 41 t7: 1 42 t8: _|_ // t8: cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up 43 t16: 4096 44 t17: 1e+4 45 t18: true 46 t23: 2.5 47 t24: 2.2 48 t25: 1.25992104989487316476721 49 t26: -5 50 t27: 20.0855369231876677409285 51 t28: 11.3137084989847603904135 52 t29: 1.38629436111989061883446 53 t30: 0.602059991327962390427478 54 t31: 2.32192809488736234787032 55 t32: 0.5 56 t33: 0 57