From 96db3c38e9e9c6e4f8c99663a66671add2dea979 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Tue, 20 Apr 2021 09:26:55 -0400 Subject: Correct floor definition --- docs/spec/primitive.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/spec/primitive.html') diff --git a/docs/spec/primitive.html b/docs/spec/primitive.html index a559a85e..fc60460d 100644 --- a/docs/spec/primitive.html +++ b/docs/spec/primitive.html @@ -24,7 +24,7 @@
  • If both arguments to - are characters, the result is the difference of their respective code points.
  • In the first two cases, if the result would not be a valid Unicode code point, then an error results. The remaining cases of + and - (adding two characters; negating a character or subtracting it from a number) are not allowed.

    -

    Additionally, the Floor function returns the largest integer smaller than the argument, or the argument itself if it is ¯∞ or . It's needed because the arithmetic operations give no fixed-time way to determine if a value is an integer. Floor gives an error if the argument is an atom other than a number.

    +

    Additionally, the Floor function returns the largest integer smaller than or equal to the argument, or the argument itself if it is ¯∞ or . It's needed because the arithmetic operations give no fixed-time way to determine if a value is an integer. Floor gives an error if the argument is an atom other than a number.

    Comparison

    Two kinds of comparison are needed to define BQN's primitives: equality comparison and ordered comparison.

    Ordered comparison is simpler and is provided by the dyadic Less than or Equal to () function. This function gives an error if either argument is an operation, so it needs to be defined only for numbers and characters. For numbers it is defined by the number system, and for characters it returns 1 if the left argument's code point is less than that of the right argument. Characters are considered greater than numbers, so that nc is 1 and cn is 0 if c is a character and n is a number.

    -- cgit v1.2.3