| # generated from the original tests. |
| # Henceforth it may be nicer to group tests into separate files. |
| -- in.cue -- |
| import "math" |
| |
| t1: math.Pi |
| t2: math.Floor(math.Pi) |
| t3: math.Pi(3) |
| t6: math.Jacobi(1000, 2000) |
| t7: math.Jacobi(1000, 201) |
| t8: math.Asin(2.0e400) |
| t16: math.Pow(8, 4) |
| t17: math.Pow10(4) |
| t18: math.Signbit(-4) |
| t23: math.Abs(2.5) |
| t24: math.Abs(-2.2) |
| t25: math.Cbrt(2) |
| t26: math.Copysign(5, -2.2) |
| t27: math.Exp(3) |
| t28: math.Exp2(3.5) |
| t29: math.Log(4) |
| t30: math.Log10(4) |
| t31: math.Log2(5) |
| t32: math.Dim(3, 2.5) |
| t33: math.Dim(5, 7.2) |
| -- out/math -- |
| Errors: |
| error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000 |
| t3: cannot call non-function math.Pi (type float): |
| ./in.cue:5:5 |
| cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up: |
| ./in.cue:8:5 |
| |
| Result: |
| (_|_){ |
| // [eval] |
| t1: (float){ 3.14159265358979323846264338327950288419716939937510582097494459 } |
| t2: (int){ 3 } |
| t3: (_|_){ |
| // [eval] t3: cannot call non-function math.Pi (type float): |
| // ./in.cue:5:5 |
| } |
| t6: (_|_){ |
| // [eval] error in call to math.Jacobi: big: invalid 2nd argument to Int.Jacobi: need odd integer but got 2000 |
| } |
| t7: (int){ 1 } |
| t8: (_|_){ |
| // [eval] cannot use 2.0E+400 (type float) as float64 in argument 0 to math.Asin: value was rounded up: |
| // ./in.cue:8:5 |
| } |
| t16: (float){ 4096 } |
| t17: (float){ 1E+4 } |
| t18: (bool){ true } |
| t23: (float){ 2.5 } |
| t24: (float){ 2.2 } |
| t25: (float){ 1.25992104989487316476721 } |
| t26: (float){ -5 } |
| t27: (float){ 20.0855369231876677409285 } |
| t28: (float){ 11.3137084989847603904135 } |
| t29: (float){ 1.38629436111989061883446 } |
| t30: (float){ 0.602059991327962390427478 } |
| t31: (float){ 2.32192809488736234787032 } |
| t32: (float){ 0.5 } |
| t33: (float){ 0 } |
| } |