Float Spec

Float Spec

Overseed Extension Type

Float Field

field_name: #SpecFloat & {
  precision: numberOfDecimalPlaces
  min: minimum
  max: maximum
}
or in the general from
field_name: #SpecFloat: {
  precision: int
  min: float64 | *1.0
  max: float64 | *10.0
}
  • Notes:
    • min and max default to 1.0 and 10.0 respectively, if not provided.
    • the generated numbers will be in the range [min, max) - min inclusive and max exclusive.

Examples

Float

float_one: #SpecFloat & { precision: 2 } float_two: #SpecFloat & { precision: 4 min: 55 max: 100 }

CSV Example Output

float_onefloat_two
1.8566.525
3.6559.502
6.5271.8041
2.6586.8188

JSON Example Output

[ { "float_one": 1.85, "float_two": 66.525 }, { "float_one": 3.65, "float_two": 59.502 }, { "float_one": 6.52, "float_two": 71.8041 }, { "float_one": 2.65, "float_two": 86.8188 } ]