...

Text file src/cuelang.org/go/cue/testdata/benchmarks/decimal.txtar

Documentation: cuelang.org/go/cue/testdata/benchmarks

     1-- stats.txt --
     2Leaks:  0
     3Freed:  11
     4Reused: 8
     5Allocs: 3
     6Retain: 0
     7
     8Unifications: 11
     9Conjuncts:    11
    10Disjuncts:    11
    11
    12-- in.cue --
    13out: [
    14  123.45 + 987.65,
    15  123.45 - 987.65,
    16  123.45 * 987.65,
    17  123.45 / 987.65,
    18
    19  // whole integers
    20  2 + 3,
    21  7 - 1,
    22  5 * 10,
    23  20 / 4,
    24
    25  1 / 3, // fill all digits
    26]
    27-- out/compile --
    28--- in.cue
    29{
    30  out: [
    31    (123.45 + 987.65),
    32    (123.45 - 987.65),
    33    (123.45 * 987.65),
    34    (123.45 / 987.65),
    35    (2 + 3),
    36    (7 - 1),
    37    (5 * 10),
    38    (20 / 4),
    39    (1 / 3),
    40  ]
    41}
    42-- out/eval/stats --
    43Leaks:  0
    44Freed:  11
    45Reused: 8
    46Allocs: 3
    47Retain: 0
    48
    49Unifications: 11
    50Conjuncts:    11
    51Disjuncts:    11
    52-- out/eval --
    53(struct){
    54  out: (#list){
    55    0: (float){ 1111.10 }
    56    1: (float){ -864.20 }
    57    2: (float){ 121925.3925 }
    58    3: (float){ 0.1249936718473143320002025008859414 }
    59    4: (int){ 5 }
    60    5: (int){ 6 }
    61    6: (int){ 50 }
    62    7: (float){ 5.0 }
    63    8: (float){ 0.3333333333333333333333333333333333 }
    64  }
    65}

View as plain text