//num

The //num type accepts only real numbers. They may be rational numbers, integers, positive, or negative. There is no requirement that they be representing, in the implementing language, as floating point or fixed point.

The optional value parameter may provide an exact value to be compared against. If this parameter is given, the schema will only accept values that are numerically equal to the parameter's value.

The optional range parameter may provide a range of values to accept. Providing both range and value is not an error, but the Rx implementation may choose to return a //fail schema if no value could possibly satisfy the combination of the given range and value.

/.meta/num, the schema for //num definitions:

{
  "type": "//rec",
  "required": {
    "type": { "type": "//str", "value": "//num" }
  },
  "optional": {
    "value": { "type": "//num" },
    "range": { "type": "/.meta/range" }
  }
}